From 0fa66561b3bf2010ad16a4c7a5eb53b4dcafbed3 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 7 Jun 2023 23:12:28 -0700 Subject: [PATCH 01/36] Adds section for required property type writing --- .../codegen/DefaultCodegen.java | 21 ++++++++++++++----- .../codegen/model/CodegenSchema.java | 13 +++++++++++- .../components/schemas/_helper_getschemas.hbs | 6 +++++- .../_helper_required_properties_type.hbs | 14 +++++++++++++ 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index b2b3a53092a..cbb13093126 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -2265,6 +2265,8 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ setSchemaLocationInfo(null, sourceJsonPath, currentJsonPath, property); HashMap requiredAndOptionalProperties = new HashMap<>(); property.properties = getProperties(((Schema) p).getProperties(), sourceJsonPath, currentJsonPath, requiredAndOptionalProperties); + LinkedHashSet required = p.getRequired() == null ? new LinkedHashSet<>() + : new LinkedHashSet<>(((Schema) p).getRequired()); List oneOfs = ((Schema) p).getOneOf(); if (oneOfs != null && !oneOfs.isEmpty()) { property.oneOf = getComposedProperties(oneOfs, "oneOf", sourceJsonPath, currentJsonPath); @@ -2286,6 +2288,8 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ property.allOf = getComposedProperties(allOfs, "allOf", sourceJsonPath, currentJsonPath); } property.additionalProperties = getAdditionalProperties(p, sourceJsonPath, currentJsonPath); + // ideally requiredProperties would come before properties + property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath); // end of properties that need to be ordered to set correct camelCase jsonPathPieces if (currentJsonPath != null) { @@ -2352,10 +2356,7 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ } } property.patternInfo = getPatternInfo(p.getPattern()); - LinkedHashSet required = p.getRequired() == null ? new LinkedHashSet<>() - : new LinkedHashSet<>(((Schema) p).getRequired()); property.optionalProperties = getOptionalProperties(property.properties, required); - property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties); property.example = toExampleValue(p); if (addSchemaImportsFromV3SpecLocations && sourceJsonPath != null && sourceJsonPath.equals(currentJsonPath)) { @@ -4352,7 +4353,7 @@ public CodegenKey getKey(String key, String keyType, String sourceJsonPath) { ); } - protected LinkedHashMap getRequiredProperties(LinkedHashSet required, LinkedHashMap properties, CodegenSchema additionalProperties, HashMap requiredAndOptionalProperties) { + protected LinkedHashMapWithContext getRequiredProperties(LinkedHashSet required, LinkedHashMap properties, CodegenSchema additionalProperties, HashMap requiredAndOptionalProperties, String sourceJsonPath) { if (required.isEmpty()) { return null; } @@ -4363,7 +4364,8 @@ protected LinkedHashMap getRequiredProperties(LinkedH - baseName stores original name (can be invalid in a programming language) - nameInSnakeCase can store valid name for a programming language */ - LinkedHashMap requiredProperties = new LinkedHashMap<>(); + LinkedHashMapWithContext requiredProperties = new LinkedHashMapWithContext<>(); + boolean allAreInline = true; for (String requiredPropertyName: required) { // required property is defined in properties, value is that CodegenSchema if (properties != null && requiredAndOptionalProperties.containsKey(requiredPropertyName)) { @@ -4372,6 +4374,9 @@ protected LinkedHashMap getRequiredProperties(LinkedH CodegenSchema prop = properties.get(key); if (prop != null) { requiredProperties.put(key, prop); + if (prop.refInfo != null) { + allAreInline = false; + } } else { throw new RuntimeException("Property " + requiredPropertyName + " is missing from getVars"); } @@ -4394,6 +4399,9 @@ protected LinkedHashMap getRequiredProperties(LinkedH } else { // additionalProperties is schema prop = additionalProperties; + if (prop.refInfo != null) { + allAreInline = false; + } } CodegenKey key = getKey(requiredPropertyName, "schemas"); requiredProperties.put(key, prop); @@ -4401,6 +4409,9 @@ protected LinkedHashMap getRequiredProperties(LinkedH } } } + requiredProperties.setAllAreInline(allAreInline); + CodegenKey jsonPathPiece = getKey("requiredProperties", "schemaProperty", sourceJsonPath); + requiredProperties.setJsonPathPiece(jsonPathPiece); return requiredProperties; } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index 73abe3441cd..26a151026f2 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -44,7 +44,7 @@ public class CodegenSchema { public Boolean uniqueItems; public Integer maxProperties; public Integer minProperties; - public LinkedHashMap requiredProperties; // used to store required info + public LinkedHashMapWithContext requiredProperties; // used to store required info public LinkedHashMap enumValueToName; // enum info public String type; public ArrayListWithContext allOf = null; @@ -221,6 +221,17 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } + if (requiredProperties != null) { + CodegenSchema extraSchema = new CodegenSchema(); + extraSchema.instanceType = "requiredPropertiesType"; + extraSchema.requiredProperties = requiredProperties; + if (requiredProperties.allAreInline()) { + schemasBeforeImports.add(extraSchema); + } else { + schemasAfterImports.add(extraSchema); + } + } + if (refInfo != null && level > 0) { // do not add ref to schemas return; diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index bdd628ed31f..b60579d1246 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -15,9 +15,13 @@ {{#eq instanceType "propertiesType" }} {{> components/schemas/_helper_properties_type }} {{else}} - {{#eq instanceType "importsType" }} + {{#eq instanceType "requiredPropertiesType" }} +{{> components/schemas/_helper_required_properties_type }} + {{else}} + {{#eq instanceType "importsType" }} {{> _helper_imports }} + {{/eq}} {{/eq}} {{/eq}} {{/eq}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs new file mode 100644 index 00000000000..8bf6cc82b23 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs @@ -0,0 +1,14 @@ +{{requiredProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( + '{{requiredProperties.jsonPathPiece.camelCase}}', + { + {{#each requiredProperties}} + {{#if this}} + {{#if refInfo.refClass}} + "{{{@key.original}}}": typing.Type[{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}], + {{else}} + "{{{@key.original}}}": typing.Type[{{jsonPathPiece.camelCase}}], + {{/if}} + {{/if}} + {{/each}} + } +) From 4b2f51b9e2a9ba10c103c66dc5c143a24cb8d975 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 7 Jun 2023 23:32:31 -0700 Subject: [PATCH 02/36] Adds required property classes --- .../_helper_required_properties_type.hbs | 21 ++++-- .../python/.openapi-generator/VERSION | 2 +- .../schema/abstract_step_message.py | 65 +++++++++++++++++++ .../petstore_api/components/schema/animal.py | 9 +++ .../petstore_api/components/schema/apple.py | 9 +++ .../components/schema/apple_req.py | 9 +++ .../petstore_api/components/schema/banana.py | 11 ++++ .../components/schema/banana_req.py | 11 ++++ .../components/schema/basque_pig.py | 9 +++ .../components/schema/category.py | 9 +++ .../components/schema/danish_pig.py | 9 +++ .../components/schema/enum_test.py | 9 +++ .../components/schema/format_test.py | 24 +++++++ .../components/schema/grandparent_animal.py | 9 +++ .../json_patch_request_add_replace_test.py | 34 ++++++++++ .../schema/json_patch_request_move_copy.py | 17 +++++ .../schema/json_patch_request_remove.py | 13 ++++ .../petstore_api/components/schema/money.py | 13 ++++ .../petstore_api/components/schema/name.py | 10 +++ .../schema/no_additional_properties.py | 10 +++ .../schema/obj_with_required_props.py | 9 +++ .../schema/obj_with_required_props_base.py | 9 +++ ...ject_model_with_arg_and_args_properties.py | 13 ++++ ..._with_req_test_prop_from_unset_add_prop.py | 33 ++++++++++ .../object_with_difficultly_named_props.py | 9 +++ ...ect_with_invalid_named_refed_properties.py | 15 +++++ .../src/petstore_api/components/schema/pet.py | 14 ++++ .../schema/quadrilateral_interface.py | 13 ++++ .../req_props_from_explicit_add_props.py | 13 ++++ .../schema/req_props_from_true_add_props.py | 47 ++++++++++++++ .../schema/req_props_from_unset_add_props.py | 61 +++++++++++++++++ .../components/schema/triangle_interface.py | 13 ++++ .../petstore_api/components/schema/whale.py | 9 +++ .../petstore_api/components/schema/zebra.py | 9 +++ .../schema.py | 25 +++++++ .../schema.py | 13 ++++ .../content/multipart_form_data/schema.py | 11 ++++ .../content/multipart_form_data/schema.py | 11 ++++ .../paths/foo/get/servers/server_1.py | 9 +++ .../pet_find_by_status/servers/server_1.py | 9 +++ .../src/petstore_api/servers/server_0.py | 13 ++++ .../src/petstore_api/servers/server_1.py | 9 +++ 42 files changed, 665 insertions(+), 5 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs index 8bf6cc82b23..84bbc3f59e2 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs @@ -2,13 +2,26 @@ '{{requiredProperties.jsonPathPiece.camelCase}}', { {{#each requiredProperties}} - {{#if this}} + {{#with this}} {{#if refInfo.refClass}} - "{{{@key.original}}}": typing.Type[{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}], + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], {{else}} - "{{{@key.original}}}": typing.Type[{{jsonPathPiece.camelCase}}], + {{#if jsonPathPiece}} + "{{@key.original}}": typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} + ], + {{else}} + "{{@key.original}}": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], + {{/if}} {{/if}} - {{/if}} + {{/with}} {{/each}} } ) diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 4a36342fcab..717311e32e3 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0 +unset \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 6a6a4c1177a..1f07cf48a07 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -17,6 +17,71 @@ "discriminator": typing.Type[Discriminator], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "description": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "discriminator": typing.Union[ + Discriminator[str], + str + ], + "sequenceNumber": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class AbstractStepMessage( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 2128bb708fb..b44f02b9a4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -31,6 +31,15 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "className": typing.Union[ + ClassName[str], + str + ], + } +) class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index afc3a527f33..42826efc3cc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -48,6 +48,15 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "cultivar": typing.Union[ + Cultivar[str], + str + ], + } +) class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 90f0c4a5fef..fb62ca9a0c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -20,6 +20,15 @@ "mealy": typing.Type[Mealy], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "cultivar": typing.Union[ + Cultivar[str], + str + ], + } +) class AppleReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index f3b3a37b31d..4c510289a5f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -17,6 +17,17 @@ "lengthCm": typing.Type[LengthCm], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "lengthCm": typing.Union[ + LengthCm[decimal.Decimal], + decimal.Decimal, + int, + float + ], + } +) class Banana( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 13fcf17415f..bad68bde08f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -20,6 +20,17 @@ "sweet": typing.Type[Sweet], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "lengthCm": typing.Union[ + LengthCm[decimal.Decimal], + decimal.Decimal, + int, + float + ], + } +) class BananaReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 5c10c0d3885..975c96d3d57 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -37,6 +37,15 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "className": typing.Union[ + ClassName[str], + str + ], + } +) class BasquePig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 7d0ea441e94..da56fd647eb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -31,6 +31,15 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "name": typing.Union[ + Name[str], + str + ], + } +) class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index af4be54d3eb..ef38eb3b8b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -37,6 +37,15 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "className": typing.Union[ + ClassName[str], + str + ], + } +) class DanishPig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index d4a927fc1c3..00bf98b5c7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -126,6 +126,15 @@ def POSITIVE_1_PT_1(cls) -> EnumNumber[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1_PT_2(cls) -> EnumNumber[decimal.Decimal]: return cls(-1.2) # type: ignore +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "enum_string_required": typing.Union[ + EnumStringRequired[str], + str + ], + } +) class EnumTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index f4d36455f76..6efe7bb927c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -225,6 +225,30 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "byte": typing.Union[ + Byte[str], + str + ], + "date": typing.Union[ + Date[str], + str, + datetime.date + ], + "number": typing.Union[ + Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "password": typing.Union[ + Password[str], + str + ], + } +) class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index a30a98afe56..7d0b323a769 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -17,6 +17,15 @@ "pet_type": typing.Type[PetType], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "pet_type": typing.Union[ + PetType[str], + str + ], + } +) class GrandparentAnimal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index c8dcc208f34..b6782e9f2ec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -52,6 +52,40 @@ def TEST(cls) -> Op[str]: "op": typing.Type[Op], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "op": typing.Union[ + Op[str], + str + ], + "path": typing.Union[ + Path[str], + str + ], + "value": typing.Union[ + Value[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class JSONPatchRequestAddReplaceTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index fe4db5efa04..602aa77b474 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -47,6 +47,23 @@ def COPY(cls) -> Op[str]: "op": typing.Type[Op], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "from": typing.Union[ + _From[str], + str + ], + "op": typing.Union[ + Op[str], + str + ], + "path": typing.Union[ + Path[str], + str + ], + } +) class JSONPatchRequestMoveCopy( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index 4111ebeb238..3abb2e27a27 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -40,6 +40,19 @@ def REMOVE(cls) -> Op[str]: "op": typing.Type[Op], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "op": typing.Union[ + Op[str], + str + ], + "path": typing.Union[ + Path[str], + str + ], + } +) class JSONPatchRequestRemove( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index f7e8622f426..4bf7f22bee3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -106,3 +106,16 @@ def __new__( "currency": typing.Type[currency.Currency], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "amount": typing.Union[ + Amount[str], + str + ], + currency: typing.Union[ + currency.Currency[str], + str + ], + } +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index df87cc9c1dd..ad960e5050f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -21,6 +21,16 @@ "property": typing.Type[_Property], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "name": typing.Union[ + Name[decimal.Decimal], + decimal.Decimal, + int + ], + } +) class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index edb6b032e3d..deb1f911baf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -20,6 +20,16 @@ "petId": typing.Type[PetId], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "id": typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + } +) class NoAdditionalProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index da03021b6ba..7ba7f634e71 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -17,6 +17,15 @@ "a": typing.Type[A], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "a": typing.Union[ + A[str], + str + ], + } +) class ObjWithRequiredProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 590dd9a243a..0c3ba18c14d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -17,6 +17,15 @@ "b": typing.Type[B], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "b": typing.Union[ + B[str], + str + ], + } +) class ObjWithRequiredPropsBase( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index ead4af0d999..0a67417f066 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -19,6 +19,19 @@ "args": typing.Type[Args], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "arg": typing.Union[ + Arg[str], + str + ], + "args": typing.Union[ + Args[str], + str + ], + } +) class ObjectModelWithArgAndArgsProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 130b8c010df..a4897c6691a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -17,6 +17,39 @@ "name": typing.Type[Name], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "test": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 42af75085ad..979a36a7173 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -21,6 +21,15 @@ "123Number": typing.Type[_123Number], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "123-list": typing.Union[ + _123List[str], + str + ], + } +) class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 85868d2ac42..a631bea8f11 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -88,3 +88,18 @@ def __new__( "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + !reference: typing.Union[ + array_with_validations_in_items.ArrayWithValidationsInItems[tuple], + list, + tuple + ], + from: typing.Union[ + from_schema.FromSchema[frozendict.frozendict], + dict, + frozendict.frozendict + ], + } +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 678ac329d03..f8dafc36d46 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -117,6 +117,20 @@ def PENDING(cls) -> Status[str]: @schemas.classproperty def SOLD(cls) -> Status[str]: return cls("sold") # type: ignore +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "name": typing.Union[ + Name[str], + str + ], + "photoUrls": typing.Union[ + PhotoUrls[tuple], + list, + tuple + ], + } +) class Pet( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index e8dda113f19..78716b9fe47 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -39,6 +39,19 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "quadrilateralType": typing.Union[ + QuadrilateralType[str], + str + ], + "shapeType": typing.Union[ + ShapeType[str], + str + ], + } +) class QuadrilateralInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 87c82485378..7a9a166a057 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -11,6 +11,19 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "invalid-name": typing.Union[ + AdditionalProperties[str], + str + ], + "validName": typing.Union[ + AdditionalProperties[str], + str + ], + } +) class ReqPropsFromExplicitAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index e9478b50876..0f9c2185239 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -11,6 +11,53 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "invalid-name": typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "validName": typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class ReqPropsFromTrueAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index fc4a9f2f3f7..fab8660ad1c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,6 +10,67 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "invalid-name": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "validName": typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class ReqPropsFromUnsetAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index a36dd2c77ab..d0773f67fa9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -39,6 +39,19 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "shapeType": typing.Union[ + ShapeType[str], + str + ], + "triangleType": typing.Union[ + TriangleType[str], + str + ], + } +) class TriangleInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 842454e632d..59bb535af73 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -41,6 +41,15 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "className": typing.Union[ + ClassName[str], + str + ], + } +) class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index f1292e9be9c..75d562dedbd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -70,6 +70,15 @@ def ZEBRA(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "className": typing.Union[ + ClassName[str], + str + ], + } +) class Zebra( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 8b9bda5cf17..4adfef479b7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -166,6 +166,31 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "byte": typing.Union[ + Byte[str], + str + ], + "double": typing.Union[ + Double[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "number": typing.Union[ + Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "pattern_without_delimiter": typing.Union[ + PatternWithoutDelimiter[str], + str + ], + } +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 545e1f9972a..a948f3848c7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,6 +19,19 @@ "param2": typing.Type[Param2], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "param": typing.Union[ + Param[str], + str + ], + "param2": typing.Union[ + Param2[str], + str + ], + } +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index c589a9cef9a..fd62613dda6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,17 @@ "requiredFile": typing.Type[RequiredFile], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "requiredFile": typing.Union[ + RequiredFile[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 8e2d921ec18..0065ef269fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,17 @@ "file": typing.Type[File], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "file": typing.Union[ + File[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + } +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index d72b6fd42af..5d48e661682 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -40,6 +40,15 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "version": typing.Union[ + Version[str], + str + ], + } +) class Variables( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index d72b6fd42af..5d48e661682 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -40,6 +40,15 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "version": typing.Union[ + Version[str], + str + ], + } +) class Variables( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index a2e2a01424c..4c4239f2785 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -73,6 +73,19 @@ def POSITIVE_8080(cls) -> Port[str]: "port": typing.Type[Port], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "port": typing.Union[ + Port[str], + str + ], + "server": typing.Union[ + Server[str], + str + ], + } +) class Variables( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index cbf5b71e965..4b3ddebb44a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -40,6 +40,15 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) +RequiredProperties = typing_extensions.TypedDict( + 'RequiredProperties', + { + "version": typing.Union[ + Version[str], + str + ], + } +) class Variables( From b87ae9dac54624d5afcefd69d499f2a63f298808 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 00:00:03 -0700 Subject: [PATCH 03/36] Adds template adjustment for optional properties --- .../codegen/DefaultCodegen.java | 16 +++++++++--- .../codegen/model/CodegenSchema.java | 5 ++-- .../components/schemas/_helper_getschemas.hbs | 2 +- .../_helper_required_properties_type.hbs | 25 +++++++++++++++++++ 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index cbb13093126..6cc8ffd764e 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -2290,6 +2290,7 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ property.additionalProperties = getAdditionalProperties(p, sourceJsonPath, currentJsonPath); // ideally requiredProperties would come before properties property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath); + property.optionalProperties = getOptionalProperties(property.properties, required, sourceJsonPath); // end of properties that need to be ordered to set correct camelCase jsonPathPieces if (currentJsonPath != null) { @@ -2356,7 +2357,6 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ } } property.patternInfo = getPatternInfo(p.getPattern()); - property.optionalProperties = getOptionalProperties(property.properties, required); property.example = toExampleValue(p); if (addSchemaImportsFromV3SpecLocations && sourceJsonPath != null && sourceJsonPath.equals(currentJsonPath)) { @@ -3296,26 +3296,34 @@ protected LinkedHashMapWithContext getProperties(Map< * @param required a set of required properties' name * @return the optional properties */ - protected LinkedHashMap getOptionalProperties(LinkedHashMap properties, Set required) { + protected LinkedHashMapWithContext getOptionalProperties(LinkedHashMapWithContext properties, Set required, String sourceJsonPath) { if (properties == null) { return null; } - if (required.size() == properties.size()) { + boolean allPropertiesAreRequired = (required.size() == properties.size()); + if (allPropertiesAreRequired) { return null; } if (required.isEmpty()) { return properties; } - LinkedHashMap optionalProperties = new LinkedHashMap<>(); + LinkedHashMapWithContext optionalProperties = new LinkedHashMapWithContext<>(); + boolean allAreInline = true; for (Map.Entry entry : properties.entrySet()) { final CodegenKey key = entry.getKey(); if (required.contains(key.original)) { continue; } final CodegenSchema prop = entry.getValue(); + if (prop.refInfo != null) { + allAreInline = false; + } optionalProperties.put(key, prop); } + optionalProperties.setAllAreInline(allAreInline); + CodegenKey jsonPathPiece = getKey("optionalProperties", "schemaProperty", sourceJsonPath); + optionalProperties.setJsonPathPiece(jsonPathPiece); return optionalProperties; } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index 26a151026f2..da63ca09d5b 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -84,7 +84,7 @@ public class CodegenSchema { public TreeSet imports; public CodegenKey jsonPathPiece; public String unescapedDescription; - public LinkedHashMap optionalProperties; + public LinkedHashMapWithContext optionalProperties; public boolean schemaIsFromAdditionalProperties; public HashMap testCases = new HashMap<>(); /** @@ -221,9 +221,10 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } + // todo break them up into separate pieces, required, optional, and combined (if needed) if (requiredProperties != null) { CodegenSchema extraSchema = new CodegenSchema(); - extraSchema.instanceType = "requiredPropertiesType"; + extraSchema.instanceType = "propertiesInputType"; extraSchema.requiredProperties = requiredProperties; if (requiredProperties.allAreInline()) { schemasBeforeImports.add(extraSchema); diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index b60579d1246..f50fdad5243 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -15,7 +15,7 @@ {{#eq instanceType "propertiesType" }} {{> components/schemas/_helper_properties_type }} {{else}} - {{#eq instanceType "requiredPropertiesType" }} + {{#eq instanceType "propertiesInputType" }} {{> components/schemas/_helper_required_properties_type }} {{else}} {{#eq instanceType "importsType" }} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs index 84bbc3f59e2..0fa70ae0b2b 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs @@ -1,3 +1,4 @@ +{{#if requiredProperties}} {{requiredProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( '{{requiredProperties.jsonPathPiece.camelCase}}', { @@ -25,3 +26,27 @@ {{/each}} } ) + +{{/if}} +{#if optionalProperties}} +{{optionalProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( + '{{optionalProperties.jsonPathPiece.camelCase}}', + { + {{#each optionalProperties}} + {{#with this}} + {{#if refInfo.refClass}} + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=true }} + ], + {{else}} + "{{@key.original}}": typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=true }} + ], + {{/if}} + {{/with}} + {{/each}} + }, + total=False +) + +{{/if}} \ No newline at end of file From 5352f73858ba4312fe5a77bda2c79f6895695f34 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 09:53:57 -0700 Subject: [PATCH 04/36] Adds template to write optional properties typeddict --- .../codegen/DefaultCodegen.java | 48 ++++++++++++++++--- .../codegen/model/CodegenSchema.java | 13 ++++- .../model/LinkedHashMapWithContext.java | 1 + .../components/schemas/_helper_getschemas.hbs | 8 +++- .../_helper_optional_properties_type.hbs | 19 ++++++++ .../_helper_required_properties_type.hbs | 25 ---------- 6 files changed, 78 insertions(+), 36 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index 6cc8ffd764e..5f5b82a8b79 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -3300,14 +3300,17 @@ protected LinkedHashMapWithContext getOptionalPropert if (properties == null) { return null; } - boolean allPropertiesAreRequired = (required.size() == properties.size()); - if (allPropertiesAreRequired) { - return null; - } if (required.isEmpty()) { - return properties; + // all properties optional and there is no required + LinkedHashMapWithContext optionalProperties = new LinkedHashMapWithContext<>(); + optionalProperties.putAll(properties); + optionalProperties.setAllAreInline(properties.allAreInline()); + CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); + optionalProperties.setJsonPathPiece(jsonPathPiece); + return optionalProperties; } + // required exists and it can come from addProps or props LinkedHashMapWithContext optionalProperties = new LinkedHashMapWithContext<>(); boolean allAreInline = true; for (Map.Entry entry : properties.entrySet()) { @@ -3321,8 +3324,12 @@ protected LinkedHashMapWithContext getOptionalPropert } optionalProperties.put(key, prop); } + if (optionalProperties.isEmpty()) { + // no optional props, all required properties came from props + return null; + } optionalProperties.setAllAreInline(allAreInline); - CodegenKey jsonPathPiece = getKey("optionalProperties", "schemaProperty", sourceJsonPath); + CodegenKey jsonPathPiece = getKey("OptionalDictInput", "schemaProperty", sourceJsonPath); optionalProperties.setJsonPathPiece(jsonPathPiece); return optionalProperties; } @@ -4366,12 +4373,24 @@ protected LinkedHashMapWithContext getRequiredPropert return null; } /* + requiredProperties use cases: + - no required properties: null or empty list + - requiredProperties + optionalProperties (properties must exist) + - requiredProperties + no optionalProperties + - 1. requiredPropsWithDefAllFromProp - required all come from properties + - 2. requiredPropsWithDefAllFromAddProp - required all come from addProp and there is no properties + - 3. required consume all properties and remainder from addProps this should be called after vars and additionalProperties are set Features added by storing codegenProperty values: - refClass stores reference to additionalProperties definition - baseName stores original name (can be invalid in a programming language) - nameInSnakeCase can store valid name for a programming language */ + boolean requiredPropsWithDefAllFromProp = true; + boolean requiredPropsWithDefAllFromAddProp = true; + int propReqProps = 0; + int addPropReqProps = 0; + int reqPropsWithDef = 0; LinkedHashMapWithContext requiredProperties = new LinkedHashMapWithContext<>(); boolean allAreInline = true; for (String requiredPropertyName: required) { @@ -4381,7 +4400,10 @@ protected LinkedHashMapWithContext getRequiredPropert // get cp from property CodegenSchema prop = properties.get(key); if (prop != null) { + requiredPropsWithDefAllFromAddProp = false; requiredProperties.put(key, prop); + reqPropsWithDef++; + propReqProps++; if (prop.refInfo != null) { allAreInline = false; } @@ -4397,6 +4419,9 @@ protected LinkedHashMapWithContext getRequiredPropert // required property is not defined in properties if (supportsAdditionalPropertiesWithComposedSchema && !disallowAdditionalPropertiesIfNotPresent) { CodegenSchema prop; + requiredPropsWithDefAllFromProp = false; + reqPropsWithDef++; + addPropReqProps++; if (additionalProperties == null) { // additionalProperties is null // there is NO schema definition for this so the json paths are null @@ -4417,8 +4442,17 @@ protected LinkedHashMapWithContext getRequiredPropert } } } + String keyName; + boolean onlyReqPropsCase1 = (requiredPropsWithDefAllFromProp && properties != null && requiredProperties.size() == properties.size()); + boolean onlyReqPropsCase2 = (requiredPropsWithDefAllFromAddProp && properties == null); + boolean onlyReqPropsCase3 = (propReqProps != 0 && addPropReqProps != 0 && propReqProps + addPropReqProps == reqPropsWithDef && requiredProperties.size() == properties.size()); + if (onlyReqPropsCase1 || onlyReqPropsCase2 || onlyReqPropsCase3) { + keyName = "DictInput"; + } else { + keyName = "RequiredDictInput"; + } requiredProperties.setAllAreInline(allAreInline); - CodegenKey jsonPathPiece = getKey("requiredProperties", "schemaProperty", sourceJsonPath); + CodegenKey jsonPathPiece = getKey(keyName, "schemaProperty", sourceJsonPath); requiredProperties.setJsonPathPiece(jsonPathPiece); return requiredProperties; } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index da63ca09d5b..ce1e1d64053 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -221,10 +221,9 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } - // todo break them up into separate pieces, required, optional, and combined (if needed) if (requiredProperties != null) { CodegenSchema extraSchema = new CodegenSchema(); - extraSchema.instanceType = "propertiesInputType"; + extraSchema.instanceType = "requiredPropertiesInputType"; extraSchema.requiredProperties = requiredProperties; if (requiredProperties.allAreInline()) { schemasBeforeImports.add(extraSchema); @@ -232,6 +231,16 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } + if (optionalProperties != null) { + CodegenSchema extraSchema = new CodegenSchema(); + extraSchema.instanceType = "optionalPropertiesInputType"; + extraSchema.optionalProperties = optionalProperties; + if (optionalProperties.allAreInline()) { + schemasBeforeImports.add(extraSchema); + } else { + schemasAfterImports.add(extraSchema); + } + } if (refInfo != null && level > 0) { // do not add ref to schemas diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/LinkedHashMapWithContext.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/LinkedHashMapWithContext.java index 2fe794d2bb8..b088b8674ec 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/LinkedHashMapWithContext.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/LinkedHashMapWithContext.java @@ -5,6 +5,7 @@ public class LinkedHashMapWithContext extends LinkedHashMap implements InlineContext { private boolean internalallAreInline = false; private CodegenKey internalJsonPathPiece = null; + public boolean allAreInline() { return internalallAreInline; } diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index f50fdad5243..c5d95a900c0 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -15,12 +15,16 @@ {{#eq instanceType "propertiesType" }} {{> components/schemas/_helper_properties_type }} {{else}} - {{#eq instanceType "propertiesInputType" }} + {{#eq instanceType "requiredPropertiesInputType" }} {{> components/schemas/_helper_required_properties_type }} {{else}} - {{#eq instanceType "importsType" }} + {{#eq instanceType "optionalPropertiesInputType" }} +{{> components/schemas/_helper_optional_properties_type }} + {{else}} + {{#eq instanceType "importsType" }} {{> _helper_imports }} + {{/eq}} {{/eq}} {{/eq}} {{/eq}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs new file mode 100644 index 00000000000..34abf0bdc23 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs @@ -0,0 +1,19 @@ +{{optionalProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( + '{{optionalProperties.jsonPathPiece.camelCase}}', + { + {{#each optionalProperties}} + {{#with this}} + {{#if refInfo.refClass}} + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=true }} + ], + {{else}} + "{{@key.original}}": typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=true }} + ], + {{/if}} + {{/with}} + {{/each}} + }, + total=False +) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs index 0fa70ae0b2b..84bbc3f59e2 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs @@ -1,4 +1,3 @@ -{{#if requiredProperties}} {{requiredProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( '{{requiredProperties.jsonPathPiece.camelCase}}', { @@ -26,27 +25,3 @@ {{/each}} } ) - -{{/if}} -{#if optionalProperties}} -{{optionalProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( - '{{optionalProperties.jsonPathPiece.camelCase}}', - { - {{#each optionalProperties}} - {{#with this}} - {{#if refInfo.refClass}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=true }} - ], - {{else}} - "{{@key.original}}": typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=true }} - ], - {{/if}} - {{/with}} - {{/each}} - }, - total=False -) - -{{/if}} \ No newline at end of file From 288c248ecfda781ea9d40540905fd39d21c1dfd0 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 10:52:25 -0700 Subject: [PATCH 05/36] Successfully generates required and optional typeddicts --- .../codegen/DefaultCodegen.java | 6 +- .../_helper_optional_properties_type.hbs | 4 +- .../_helper_required_properties_type.hbs | 6 +- ..._with_req_test_prop_from_unset_add_prop.md | 1 + .../components/schema/_200_response.py | 17 ++ .../petstore_api/components/schema/_return.py | 12 ++ .../schema/abstract_step_message.py | 4 +- .../schema/additional_properties_class.py | 70 ++++++ .../petstore_api/components/schema/animal.py | 15 +- .../components/schema/any_type_and_format.py | 204 ++++++++++++++++++ .../components/schema/api_response.py | 22 ++ .../petstore_api/components/schema/apple.py | 15 +- .../components/schema/apple_req.py | 15 +- .../schema/array_of_array_of_number_only.py | 12 ++ .../components/schema/array_of_number_only.py | 12 ++ .../components/schema/array_test.py | 24 +++ .../petstore_api/components/schema/banana.py | 4 +- .../components/schema/banana_req.py | 15 +- .../components/schema/basque_pig.py | 4 +- .../components/schema/capitalization.py | 36 ++++ .../src/petstore_api/components/schema/cat.py | 11 + .../components/schema/category.py | 16 +- .../components/schema/child_cat.py | 11 + .../components/schema/class_model.py | 11 + .../petstore_api/components/schema/client.py | 11 + .../schema/complex_quadrilateral.py | 11 + .../components/schema/danish_pig.py | 4 +- .../src/petstore_api/components/schema/dog.py | 11 + .../petstore_api/components/schema/drawing.py | 78 +++++++ .../components/schema/enum_arrays.py | 17 ++ .../components/schema/enum_test.py | 60 +++++- .../components/schema/equilateral_triangle.py | 11 + .../petstore_api/components/schema/file.py | 11 + .../schema/file_schema_test_class.py | 18 ++ .../src/petstore_api/components/schema/foo.py | 11 + .../components/schema/format_test.py | 113 +++++++++- .../components/schema/from_schema.py | 17 ++ .../petstore_api/components/schema/fruit.py | 11 + .../components/schema/gm_fruit.py | 11 + .../components/schema/grandparent_animal.py | 4 +- .../components/schema/has_only_read_only.py | 16 ++ .../components/schema/health_check_result.py | 15 ++ .../components/schema/isosceles_triangle.py | 11 + .../json_patch_request_add_replace_test.py | 4 +- .../schema/json_patch_request_move_copy.py | 4 +- .../schema/json_patch_request_remove.py | 4 +- .../components/schema/map_test.py | 30 +++ ...perties_and_additional_properties_class.py | 24 +++ .../petstore_api/components/schema/money.py | 6 +- .../petstore_api/components/schema/name.py | 21 +- .../schema/no_additional_properties.py | 16 +- .../components/schema/nullable_class.py | 117 ++++++++++ .../components/schema/number_only.py | 13 ++ .../schema/obj_with_required_props.py | 4 +- .../schema/obj_with_required_props_base.py | 4 +- ...ject_model_with_arg_and_args_properties.py | 4 +- .../schema/object_model_with_ref_props.py | 23 ++ ..._with_req_test_prop_from_unset_add_prop.py | 25 ++- .../object_with_colliding_properties.py | 18 ++ .../schema/object_with_decimal_properties.py | 22 ++ .../object_with_difficultly_named_props.py | 22 +- ...object_with_inline_composition_property.py | 28 +++ ...ect_with_invalid_named_refed_properties.py | 8 +- .../schema/object_with_optional_test_prop.py | 11 + .../petstore_api/components/schema/order.py | 40 ++++ .../src/petstore_api/components/schema/pet.py | 33 ++- .../petstore_api/components/schema/player.py | 17 ++ .../schema/quadrilateral_interface.py | 4 +- .../components/schema/read_only_first.py | 16 ++ .../req_props_from_explicit_add_props.py | 4 +- .../schema/req_props_from_true_add_props.py | 4 +- .../schema/req_props_from_unset_add_props.py | 4 +- .../components/schema/scalene_triangle.py | 11 + .../schema/self_referencing_object_model.py | 12 ++ .../components/schema/simple_quadrilateral.py | 11 + .../components/schema/special_model_name.py | 11 + .../src/petstore_api/components/schema/tag.py | 17 ++ .../components/schema/triangle_interface.py | 4 +- .../petstore_api/components/schema/user.py | 130 +++++++++++ .../petstore_api/components/schema/whale.py | 20 +- .../petstore_api/components/schema/zebra.py | 15 +- .../schema.py | 17 ++ .../schema.py | 69 +++++- .../post/parameters/parameter_1/schema.py | 28 +++ .../content/multipart_form_data/schema.py | 28 +++ .../content/multipart_form_data/schema.py | 28 +++ .../schema.py | 4 +- .../get/parameters/parameter_0/schema.py | 11 + .../content/multipart_form_data/schema.py | 15 +- .../content/multipart_form_data/schema.py | 15 +- .../content/multipart_form_data/schema.py | 12 ++ .../content/application_json/schema.py | 12 ++ .../paths/foo/get/servers/server_1.py | 4 +- .../pet_find_by_status/servers/server_1.py | 4 +- .../schema.py | 16 ++ .../content/multipart_form_data/schema.py | 18 ++ .../src/petstore_api/servers/server_0.py | 4 +- .../src/petstore_api/servers/server_1.py | 4 +- 98 files changed, 1947 insertions(+), 91 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index 5f5b82a8b79..f50e49459ef 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -2289,7 +2289,7 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ } property.additionalProperties = getAdditionalProperties(p, sourceJsonPath, currentJsonPath); // ideally requiredProperties would come before properties - property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath); + property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath, ((Schema) p).getProperties()); property.optionalProperties = getOptionalProperties(property.properties, required, sourceJsonPath); // end of properties that need to be ordered to set correct camelCase jsonPathPieces @@ -4368,7 +4368,7 @@ public CodegenKey getKey(String key, String keyType, String sourceJsonPath) { ); } - protected LinkedHashMapWithContext getRequiredProperties(LinkedHashSet required, LinkedHashMap properties, CodegenSchema additionalProperties, HashMap requiredAndOptionalProperties, String sourceJsonPath) { + protected LinkedHashMapWithContext getRequiredProperties(LinkedHashSet required, LinkedHashMap properties, CodegenSchema additionalProperties, HashMap requiredAndOptionalProperties, String sourceJsonPath, Map schemaProperties) { if (required.isEmpty()) { return null; } @@ -4445,7 +4445,7 @@ protected LinkedHashMapWithContext getRequiredPropert String keyName; boolean onlyReqPropsCase1 = (requiredPropsWithDefAllFromProp && properties != null && requiredProperties.size() == properties.size()); boolean onlyReqPropsCase2 = (requiredPropsWithDefAllFromAddProp && properties == null); - boolean onlyReqPropsCase3 = (propReqProps != 0 && addPropReqProps != 0 && propReqProps + addPropReqProps == reqPropsWithDef && requiredProperties.size() == properties.size()); + boolean onlyReqPropsCase3 = (propReqProps != 0 && addPropReqProps != 0 && propReqProps + addPropReqProps == reqPropsWithDef && schemaProperties != null && required.containsAll(schemaProperties.keySet())); if (onlyReqPropsCase1 || onlyReqPropsCase2 || onlyReqPropsCase3) { keyName = "DictInput"; } else { diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs index 34abf0bdc23..aa103a417d8 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs @@ -4,11 +4,11 @@ {{#each optionalProperties}} {{#with this}} {{#if refInfo.refClass}} - {{@key.original}}: typing.Union[ + "{{{@key.original}}}": typing.Union[ {{> components/schemas/_helper_new_ref_property_value_type optional=true }} ], {{else}} - "{{@key.original}}": typing.Union[ + "{{{@key.original}}}": typing.Union[ {{> components/schemas/_helper_new_property_value_type optional=true }} ], {{/if}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs index 84bbc3f59e2..21ca046d69e 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs @@ -4,16 +4,16 @@ {{#each requiredProperties}} {{#with this}} {{#if refInfo.refClass}} - {{@key.original}}: typing.Union[ + "{{{@key.original}}}": typing.Union[ {{> components/schemas/_helper_new_ref_property_value_type optional=false }} ], {{else}} {{#if jsonPathPiece}} - "{{@key.original}}": typing.Union[ + "{{{@key.original}}}": typing.Union[ {{> components/schemas/_helper_new_property_value_type optional=false }} ], {{else}} - "{{@key.original}}": typing.Union[ + "{{{@key.original}}}": typing.Union[ schemas.AnyTypeSchema[typing.Union[ {{> components/schemas/_helper_schema_python_base_types_newline }} ]], diff --git a/samples/openapi3/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md b/samples/openapi3/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md index 0a434163e4d..33b2761bbd9 100644 --- a/samples/openapi3/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md +++ b/samples/openapi3/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md @@ -24,6 +24,7 @@ dict, frozendict.frozendict | frozendict.frozendict | | Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- **test** | dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, io.FileIO | | +**name** | str | str | | [optional] **any_string_name** | dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema | frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 3b3d5363c6d..7615dff8337 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -19,6 +19,23 @@ "class": typing.Type[_Class], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "name": typing.Union[ + Name[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "class": typing.Union[ + _Class[str], + schemas.Unset, + str + ], + }, + total=False +) class _200Response( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 74a44220c4a..f4c1712ddad 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -17,6 +17,18 @@ "return": typing.Type[_Return], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "return": typing.Union[ + _Return[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) class _Return( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 1f07cf48a07..d54db6b5a78 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -17,8 +17,8 @@ "discriminator": typing.Type[Discriminator], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "description": typing.Union[ schemas.AnyTypeSchema[typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index a8cc6180c62..b5e12fec11d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -271,6 +271,76 @@ def __new__( "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "map_property": typing.Union[ + MapProperty[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "map_of_map_property": typing.Union[ + MapOfMapProperty[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "anytype_1": typing.Union[ + Anytype1[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "map_with_undeclared_properties_anytype_1": typing.Union[ + MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "map_with_undeclared_properties_anytype_2": typing.Union[ + MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "map_with_undeclared_properties_anytype_3": typing.Union[ + MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "empty_map": typing.Union[ + EmptyMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "map_with_undeclared_properties_string": typing.Union[ + MapWithUndeclaredPropertiesString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) class AdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index b44f02b9a4e..82020c459c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -31,8 +31,8 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "className": typing.Union[ ClassName[str], @@ -40,6 +40,17 @@ class Schema_(metaclass=schemas.SingletonMeta): ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "color": typing.Union[ + Color[str], + schemas.Unset, + str + ], + }, + total=False +) class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index cbbaa77c621..67397715791 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -505,6 +505,210 @@ def __new__( "float": typing.Type[_Float], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "uuid": typing.Union[ + Uuid[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "date": typing.Union[ + Date[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "date-time": typing.Union[ + DateTime[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "number": typing.Union[ + Number[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "binary": typing.Union[ + Binary[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "int32": typing.Union[ + Int32[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "int64": typing.Union[ + Int64[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "double": typing.Union[ + Double[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "float": typing.Union[ + _Float[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class AnyTypeAndFormat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 551caf1e7c8..624312becbc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -21,6 +21,28 @@ "message": typing.Type[Message], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "code": typing.Union[ + Code[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "type": typing.Union[ + Type[str], + schemas.Unset, + str + ], + "message": typing.Union[ + Message[str], + schemas.Unset, + str + ], + }, + total=False +) class ApiResponse( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 42826efc3cc..46c6ef9dd85 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -48,8 +48,8 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "cultivar": typing.Union[ Cultivar[str], @@ -57,6 +57,17 @@ class Schema_(metaclass=schemas.SingletonMeta): ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "origin": typing.Union[ + Origin[str], + schemas.Unset, + str + ], + }, + total=False +) class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index fb62ca9a0c9..92ec7727960 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -20,8 +20,8 @@ "mealy": typing.Type[Mealy], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "cultivar": typing.Union[ Cultivar[str], @@ -29,6 +29,17 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "mealy": typing.Union[ + Mealy[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) class AppleReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index bd35129454c..1c2dc7db1c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -92,6 +92,18 @@ def __getitem__(self, name: int) -> Items[tuple]: "ArrayArrayNumber": typing.Type[ArrayArrayNumber], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "ArrayArrayNumber": typing.Union[ + ArrayArrayNumber[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) class ArrayOfArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index 82c6f0c1a18..393c0b3420c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -55,6 +55,18 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: "ArrayNumber": typing.Type[ArrayNumber], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "ArrayNumber": typing.Union[ + ArrayNumber[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) class ArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index b16a0bf9a37..c171eb56f0b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -204,6 +204,30 @@ def __getitem__(self, name: int) -> Items4[tuple]: "array_array_of_model": typing.Type[ArrayArrayOfModel], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "array_of_string": typing.Union[ + ArrayOfString[tuple], + schemas.Unset, + list, + tuple + ], + "array_array_of_integer": typing.Union[ + ArrayArrayOfInteger[tuple], + schemas.Unset, + list, + tuple + ], + "array_array_of_model": typing.Union[ + ArrayArrayOfModel[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) class ArrayTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 4c510289a5f..207b17c5f93 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -17,8 +17,8 @@ "lengthCm": typing.Type[LengthCm], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "lengthCm": typing.Union[ LengthCm[decimal.Decimal], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index bad68bde08f..eacf13a922c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -20,8 +20,8 @@ "sweet": typing.Type[Sweet], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "lengthCm": typing.Union[ LengthCm[decimal.Decimal], @@ -31,6 +31,17 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "sweet": typing.Union[ + Sweet[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) class BananaReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 975c96d3d57..057d3d0d2ec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -37,8 +37,8 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "className": typing.Union[ ClassName[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 8367d593df6..cb02044f941 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -27,6 +27,42 @@ "ATT_NAME": typing.Type[ATTNAME], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "smallCamel": typing.Union[ + SmallCamel[str], + schemas.Unset, + str + ], + "CapitalCamel": typing.Union[ + CapitalCamel[str], + schemas.Unset, + str + ], + "small_Snake": typing.Union[ + SmallSnake[str], + schemas.Unset, + str + ], + "Capital_Snake": typing.Union[ + CapitalSnake[str], + schemas.Unset, + str + ], + "SCA_ETH_Flow_Points": typing.Union[ + SCAETHFlowPoints[str], + schemas.Unset, + str + ], + "ATT_NAME": typing.Union[ + ATTNAME[str], + schemas.Unset, + str + ], + }, + total=False +) class Capitalization( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index cc4957aa2a2..8930959f578 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -17,6 +17,17 @@ "declawed": typing.Type[Declawed], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "declawed": typing.Union[ + Declawed[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index da56fd647eb..80baf7f9451 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -31,8 +31,8 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "name": typing.Union[ Name[str], @@ -40,6 +40,18 @@ class Schema_(metaclass=schemas.SingletonMeta): ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index ea50ca14e28..db91408c790 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -17,6 +17,17 @@ "name": typing.Type[Name], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "name": typing.Union[ + Name[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index a236f190df5..70ee3119e76 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -17,6 +17,17 @@ "_class": typing.Type[_Class], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "_class": typing.Union[ + _Class[str], + schemas.Unset, + str + ], + }, + total=False +) class ClassModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index f9be85553e5..748545f5674 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -17,6 +17,17 @@ "client": typing.Type[Client], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "client": typing.Union[ + Client[str], + schemas.Unset, + str + ], + }, + total=False +) class Client( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 1d541b5c1d4..853560f7af0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -37,6 +37,17 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "quadrilateralType": typing.Union[ + QuadrilateralType[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index ef38eb3b8b2..31f5cb67f6a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -37,8 +37,8 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "className": typing.Union[ ClassName[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 58df66168bf..817bece5f21 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -17,6 +17,17 @@ "breed": typing.Type[Breed], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "breed": typing.Union[ + Breed[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 933e6e50e9a..5000a4ca589 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -282,3 +282,81 @@ def __new__( "shapes": typing.Type[Shapes], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "mainShape": typing.Union[ + shape.Shape[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "shapeOrNull": typing.Union[ + shape_or_null.ShapeOrNull[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "nullableShape": typing.Union[ + nullable_shape.NullableShape[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "shapes": typing.Union[ + Shapes[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 3eeeb44a273..73a3912fabe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -105,6 +105,23 @@ def __getitem__(self, name: int) -> Items[str]: "array_enum": typing.Type[ArrayEnum], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "just_symbol": typing.Union[ + JustSymbol[str], + schemas.Unset, + str + ], + "array_enum": typing.Union[ + ArrayEnum[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) class EnumArrays( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 00bf98b5c7c..5fad9adfdd6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -126,8 +126,8 @@ def POSITIVE_1_PT_1(cls) -> EnumNumber[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1_PT_2(cls) -> EnumNumber[decimal.Decimal]: return cls(-1.2) # type: ignore -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "enum_string_required": typing.Union[ EnumStringRequired[str], @@ -320,3 +320,59 @@ def __new__( "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "enum_string": typing.Union[ + EnumString[str], + schemas.Unset, + str + ], + "enum_integer": typing.Union[ + EnumInteger[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "enum_number": typing.Union[ + EnumNumber[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "stringEnum": typing.Union[ + string_enum.StringEnum[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ], + "IntegerEnum": typing.Union[ + integer_enum.IntegerEnum[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "StringEnumWithDefaultValue": typing.Union[ + string_enum_with_default_value.StringEnumWithDefaultValue[str], + schemas.Unset, + str + ], + "IntegerEnumWithDefaultValue": typing.Union[ + integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "IntegerEnumOneValue": typing.Union[ + integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 8cbc713dbd2..196762dae80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -37,6 +37,17 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "triangleType": typing.Union[ + TriangleType[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index c1d358ff6d2..560445a1c96 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -17,6 +17,17 @@ "sourceURI": typing.Type[SourceURI], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "sourceURI": typing.Union[ + SourceURI[str], + schemas.Unset, + str + ], + }, + total=False +) class File( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 228daa71c06..3b1ce146c83 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -134,3 +134,21 @@ def __new__( "files": typing.Type[Files], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "file": typing.Union[ + file.File[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "files": typing.Union[ + Files[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index b755df3831b..b385c3794ac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -84,3 +84,14 @@ def __new__( "bar": typing.Type[bar.Bar], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "bar": typing.Union[ + bar.Bar[str], + schemas.Unset, + str + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 6efe7bb927c..0fbda87f90b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -225,8 +225,8 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "byte": typing.Union[ Byte[str], @@ -249,6 +249,115 @@ class Schema_(metaclass=schemas.SingletonMeta): ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "integer": typing.Union[ + Integer[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "int32": typing.Union[ + Int32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "int32withValidations": typing.Union[ + Int32withValidations[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "int64": typing.Union[ + Int64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "float": typing.Union[ + _Float[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "float32": typing.Union[ + Float32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "double": typing.Union[ + Double[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "float64": typing.Union[ + Float64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "arrayWithUniqueItems": typing.Union[ + ArrayWithUniqueItems[tuple], + schemas.Unset, + list, + tuple + ], + "string": typing.Union[ + String[str], + schemas.Unset, + str + ], + "binary": typing.Union[ + Binary[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ], + "dateTime": typing.Union[ + DateTime[str], + schemas.Unset, + str, + datetime.datetime + ], + "uuid": typing.Union[ + Uuid[str], + schemas.Unset, + str, + uuid.UUID + ], + "uuidNoExample": typing.Union[ + UuidNoExample[str], + schemas.Unset, + str, + uuid.UUID + ], + "pattern_with_digits": typing.Union[ + PatternWithDigits[str], + schemas.Unset, + str + ], + "pattern_with_digits_and_delimiter": typing.Union[ + PatternWithDigitsAndDelimiter[str], + schemas.Unset, + str + ], + "noneProp": typing.Union[ + NoneProp[schemas.NoneClass], + schemas.Unset, + None + ], + }, + total=False +) class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 1210e6c65ff..230faadb959 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -19,6 +19,23 @@ "id": typing.Type[Id], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "data": typing.Union[ + Data[str], + schemas.Unset, + str + ], + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) class FromSchema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 804e64737b3..8bac6498d38 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -17,6 +17,17 @@ "color": typing.Type[Color], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "color": typing.Union[ + Color[str], + schemas.Unset, + str + ], + }, + total=False +) class Fruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index 033997bcc0a..f705ecf8542 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -17,6 +17,17 @@ "color": typing.Type[Color], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "color": typing.Union[ + Color[str], + schemas.Unset, + str + ], + }, + total=False +) class GmFruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 7d0b323a769..705fea5e7a8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -17,8 +17,8 @@ "pet_type": typing.Type[PetType], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "pet_type": typing.Union[ PetType[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index a2ade7f99bb..bec4f3b74d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -19,6 +19,22 @@ "foo": typing.Type[Foo], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "bar": typing.Union[ + Bar[str], + schemas.Unset, + str + ], + "foo": typing.Union[ + Foo[str], + schemas.Unset, + str + ], + }, + total=False +) class HasOnlyReadOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 0b711093800..fd63f1e0e37 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -63,6 +63,21 @@ def __new__( "NullableMessage": typing.Type[NullableMessage], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "NullableMessage": typing.Union[ + NullableMessage[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ], + }, + total=False +) class HealthCheckResult( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 9165ab760c1..8cb0a3f10c1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -37,6 +37,17 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "triangleType": typing.Union[ + TriangleType[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index b6782e9f2ec..4caa111d683 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -52,8 +52,8 @@ def TEST(cls) -> Op[str]: "op": typing.Type[Op], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "op": typing.Union[ Op[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 602aa77b474..de5bb14fe96 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -47,8 +47,8 @@ def COPY(cls) -> Op[str]: "op": typing.Type[Op], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "from": typing.Union[ _From[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index 3abb2e27a27..f0f5a9630a9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -40,8 +40,8 @@ def REMOVE(cls) -> Op[str]: "op": typing.Type[Op], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "op": typing.Union[ Op[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 2c3bc4a01aa..e30b1c00beb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -298,3 +298,33 @@ def __new__( "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "map_map_of_string": typing.Union[ + MapMapOfString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "map_of_enum_string": typing.Union[ + MapOfEnumString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "direct_map": typing.Union[ + DirectMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "indirect_map": typing.Union[ + string_boolean_map.StringBooleanMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 6db68c4cd22..07ba9cc543d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -58,6 +58,30 @@ def __new__( "map": typing.Type[Map], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "uuid": typing.Union[ + Uuid[str], + schemas.Unset, + str, + uuid.UUID + ], + "dateTime": typing.Union[ + DateTime[str], + schemas.Unset, + str, + datetime.datetime + ], + "map": typing.Union[ + Map[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) class MixedPropertiesAndAdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index 4bf7f22bee3..b3bfcf04627 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -106,14 +106,14 @@ def __new__( "currency": typing.Type[currency.Currency], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "amount": typing.Union[ Amount[str], str ], - currency: typing.Union[ + "currency": typing.Union[ currency.Currency[str], str ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index ad960e5050f..0ba50ef96ca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -21,8 +21,8 @@ "property": typing.Type[_Property], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "name": typing.Union[ Name[decimal.Decimal], @@ -31,6 +31,23 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "snake_case": typing.Union[ + SnakeCase[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "property": typing.Union[ + _Property[str], + schemas.Unset, + str + ], + }, + total=False +) class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index deb1f911baf..bb00e6c4552 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -20,8 +20,8 @@ "petId": typing.Type[PetId], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "id": typing.Union[ Id[decimal.Decimal], @@ -30,6 +30,18 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "petId": typing.Union[ + PetId[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) class NoAdditionalProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 2b8ea6e8279..4d7dc15a9d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -883,6 +883,123 @@ def __new__( "object_items_nullable": typing.Type[ObjectItemsNullable], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "integer_prop": typing.Union[ + IntegerProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + schemas.Unset, + None, + decimal.Decimal, + int + ], + "number_prop": typing.Union[ + NumberProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + schemas.Unset, + None, + decimal.Decimal, + int, + float + ], + "boolean_prop": typing.Union[ + BooleanProp[typing.Union[ + schemas.NoneClass, + schemas.BoolClass + ]], + schemas.Unset, + None, + bool + ], + "string_prop": typing.Union[ + StringProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ], + "date_prop": typing.Union[ + DateProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str, + datetime.date + ], + "datetime_prop": typing.Union[ + DatetimeProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str, + datetime.datetime + ], + "array_nullable_prop": typing.Union[ + ArrayNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + schemas.Unset, + None, + list, + tuple + ], + "array_and_items_nullable_prop": typing.Union[ + ArrayAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + schemas.Unset, + None, + list, + tuple + ], + "array_items_nullable": typing.Union[ + ArrayItemsNullable[tuple], + schemas.Unset, + list, + tuple + ], + "object_nullable_prop": typing.Union[ + ObjectNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ], + "object_and_items_nullable_prop": typing.Union[ + ObjectAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ], + "object_items_nullable": typing.Union[ + ObjectItemsNullable[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) class NullableClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 8bcece3d2c1..a05b130d333 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -17,6 +17,19 @@ "JustNumber": typing.Type[JustNumber], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "JustNumber": typing.Union[ + JustNumber[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + }, + total=False +) class NumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 7ba7f634e71..cda99747fdd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -17,8 +17,8 @@ "a": typing.Type[A], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "a": typing.Union[ A[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 0c3ba18c14d..08704cadf0b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -17,8 +17,8 @@ "b": typing.Type[B], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "b": typing.Union[ B[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 0a67417f066..576460a5bd9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -19,8 +19,8 @@ "args": typing.Type[Args], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "arg": typing.Union[ Arg[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 2261f087a7c..64eeef1d468 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -112,3 +112,26 @@ def __new__( "myBoolean": typing.Type[boolean.Boolean], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "myNumber": typing.Union[ + number_with_validations.NumberWithValidations[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "myString": typing.Union[ + string.String[str], + schemas.Unset, + str + ], + "myBoolean": typing.Union[ + boolean.Boolean[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index a4897c6691a..958f029939b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -17,8 +17,8 @@ "name": typing.Type[Name], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "test": typing.Union[ schemas.AnyTypeSchema[typing.Union[ @@ -50,6 +50,17 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "name": typing.Union[ + Name[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( @@ -90,6 +101,9 @@ def __getitem__(self, name: typing_extensions.Literal["test"]) -> schemas.AnyTyp schemas.FileIO ]]: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> Name[str]: ... + @typing.overload def __getitem__(self, name: str) -> schemas.AnyTypeSchema[typing.Union[ frozendict.frozendict, @@ -106,6 +120,7 @@ def __getitem__( self, name: typing.Union[ typing_extensions.Literal["test"], + typing_extensions.Literal["name"], str ] ): @@ -143,6 +158,11 @@ def __new__( io.FileIO, io.BufferedReader ], + name: typing.Union[ + Name[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> _1[frozendict.frozendict]: @@ -150,6 +170,7 @@ def __new__( cls, *args_, test=test, + name=name, configuration_=configuration_, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 7798070f06c..8c7d235b121 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -19,6 +19,24 @@ "someprop": typing.Type[Someprop], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "someProp": typing.Union[ + SomeProp[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "someprop": typing.Union[ + Someprop[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) class ObjectWithCollidingProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index eb3591c2111..b845657addf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -109,3 +109,25 @@ def __new__( "cost": typing.Type[money.Money], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "length": typing.Union[ + decimal_payload.DecimalPayload[str], + schemas.Unset, + str + ], + "width": typing.Union[ + Width[str], + schemas.Unset, + str + ], + "cost": typing.Union[ + money.Money[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 979a36a7173..4922aa7d3f3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -21,8 +21,8 @@ "123Number": typing.Type[_123Number], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "123-list": typing.Union[ _123List[str], @@ -30,6 +30,24 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "$special[property.name]": typing.Union[ + SpecialPropertyName[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "123Number": typing.Union[ + _123Number[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + }, + total=False +) class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index b453d2c40a8..55d5eae5cdd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -85,6 +85,34 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "someProp": typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class ObjectWithInlineCompositionProperty( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index a631bea8f11..f8a41071510 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -88,15 +88,15 @@ def __new__( "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { - !reference: typing.Union[ + "!reference": typing.Union[ array_with_validations_in_items.ArrayWithValidationsInItems[tuple], list, tuple ], - from: typing.Union[ + "from": typing.Union[ from_schema.FromSchema[frozendict.frozendict], dict, frozendict.frozendict diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 44ec291f01e..603f98ee6da 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -17,6 +17,17 @@ "test": typing.Type[Test], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "test": typing.Union[ + Test[str], + schemas.Unset, + str + ], + }, + total=False +) class ObjectWithOptionalTestProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 49432fa0f9b..3c3dfc0fb60 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -69,6 +69,46 @@ class Schema_(metaclass=schemas.SingletonMeta): "complete": typing.Type[Complete], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "petId": typing.Union[ + PetId[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "quantity": typing.Union[ + Quantity[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "shipDate": typing.Union[ + ShipDate[str], + schemas.Unset, + str, + datetime.datetime + ], + "status": typing.Union[ + Status[str], + schemas.Unset, + str + ], + "complete": typing.Union[ + Complete[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) class Order( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index f8dafc36d46..1944fd3f10c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -117,8 +117,8 @@ def PENDING(cls) -> Status[str]: @schemas.classproperty def SOLD(cls) -> Status[str]: return cls("sold") # type: ignore -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "name": typing.Union[ Name[str], @@ -277,3 +277,32 @@ def __new__( "status": typing.Type[Status], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "category": typing.Union[ + category.Category[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "tags": typing.Union[ + Tags[tuple], + schemas.Unset, + list, + tuple + ], + "status": typing.Union[ + Status[str], + schemas.Unset, + str + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index a24157e820d..0502cc3dae7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -97,3 +97,20 @@ def __new__( "enemyPlayer": typing.Type[Player], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "name": typing.Union[ + Name[str], + schemas.Unset, + str + ], + "enemyPlayer": typing.Union[ + Player[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 78716b9fe47..b30f05924d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -39,8 +39,8 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "quadrilateralType": typing.Union[ QuadrilateralType[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 1ffe81caeb7..feaa91afdb0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -19,6 +19,22 @@ "baz": typing.Type[Baz], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "bar": typing.Union[ + Bar[str], + schemas.Unset, + str + ], + "baz": typing.Union[ + Baz[str], + schemas.Unset, + str + ], + }, + total=False +) class ReadOnlyFirst( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 7a9a166a057..42c728a5828 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -11,8 +11,8 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "invalid-name": typing.Union[ AdditionalProperties[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 0f9c2185239..c2574b7a50f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -11,8 +11,8 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "invalid-name": typing.Union[ AdditionalProperties[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index fab8660ad1c..d42394e7851 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,8 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "invalid-name": typing.Union[ schemas.AnyTypeSchema[typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 62a05d42ce0..bc8cb4d6121 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -37,6 +37,17 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "triangleType": typing.Union[ + TriangleType[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index b13c211a9c9..c31e9587d26 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -79,3 +79,15 @@ def __new__( "selfRef": typing.Type[SelfReferencingObjectModel], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "selfRef": typing.Union[ + SelfReferencingObjectModel[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index e205913132d..e89bb670cd1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -37,6 +37,17 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "quadrilateralType": typing.Union[ + QuadrilateralType[str], + schemas.Unset, + str + ], + }, + total=False +) class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index cd571f231bd..c1fb6a2917d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -17,6 +17,17 @@ "a": typing.Type[A], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "a": typing.Union[ + A[str], + schemas.Unset, + str + ], + }, + total=False +) class SpecialModelName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 8054dffda3e..3b68d658f75 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -19,6 +19,23 @@ "name": typing.Type[Name], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "name": typing.Union[ + Name[str], + schemas.Unset, + str + ], + }, + total=False +) class Tag( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index d0773f67fa9..d957b810be9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -39,8 +39,8 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "shapeType": typing.Union[ ShapeType[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index c0d7b11725a..82f7e27d94a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -143,6 +143,136 @@ def __new__( "anyTypePropNullable": typing.Type[AnyTypePropNullable], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "id": typing.Union[ + Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "username": typing.Union[ + Username[str], + schemas.Unset, + str + ], + "firstName": typing.Union[ + FirstName[str], + schemas.Unset, + str + ], + "lastName": typing.Union[ + LastName[str], + schemas.Unset, + str + ], + "email": typing.Union[ + Email[str], + schemas.Unset, + str + ], + "password": typing.Union[ + Password[str], + schemas.Unset, + str + ], + "phone": typing.Union[ + Phone[str], + schemas.Unset, + str + ], + "userStatus": typing.Union[ + UserStatus[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "objectWithNoDeclaredProps": typing.Union[ + ObjectWithNoDeclaredProps[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + "objectWithNoDeclaredPropsNullable": typing.Union[ + ObjectWithNoDeclaredPropsNullable[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ], + "anyTypeProp": typing.Union[ + AnyTypeProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "anyTypeExceptNullProp": typing.Union[ + AnyTypeExceptNullProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + "anyTypePropNullable": typing.Union[ + AnyTypePropNullable[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class User( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 59bb535af73..32065e89f17 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -41,8 +41,8 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "className": typing.Union[ ClassName[str], @@ -50,6 +50,22 @@ def WHALE(cls) -> ClassName[str]: ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "hasBaleen": typing.Union[ + HasBaleen[schemas.BoolClass], + schemas.Unset, + bool + ], + "hasTeeth": typing.Union[ + HasTeeth[schemas.BoolClass], + schemas.Unset, + bool + ], + }, + total=False +) class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 75d562dedbd..dafe5af12b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -70,8 +70,8 @@ def ZEBRA(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "className": typing.Union[ ClassName[str], @@ -79,6 +79,17 @@ def ZEBRA(cls) -> ClassName[str]: ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "type": typing.Union[ + Type[str], + schemas.Unset, + str + ], + }, + total=False +) class Zebra( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index bb476bb4f00..66465c91ba4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -112,6 +112,23 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: "enum_form_string": typing.Type[EnumFormString], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "enum_form_string_array": typing.Union[ + EnumFormStringArray[tuple], + schemas.Unset, + list, + tuple + ], + "enum_form_string": typing.Union[ + EnumFormString[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 4adfef479b7..dec58c8eaef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -166,8 +166,8 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "byte": typing.Union[ Byte[str], @@ -191,6 +191,71 @@ class Schema_(metaclass=schemas.SingletonMeta): ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "integer": typing.Union[ + Integer[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "int32": typing.Union[ + Int32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "int64": typing.Union[ + Int64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ], + "float": typing.Union[ + _Float[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ], + "string": typing.Union[ + String[str], + schemas.Unset, + str + ], + "binary": typing.Union[ + Binary[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ], + "date": typing.Union[ + Date[str], + schemas.Unset, + str, + datetime.date + ], + "dateTime": typing.Union[ + DateTime[str], + schemas.Unset, + str, + datetime.datetime + ], + "password": typing.Union[ + Password[str], + schemas.Unset, + str + ], + "callback": typing.Union[ + Callback[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index ecbf400e34f..486c1cd1837 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -85,6 +85,34 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "someProp": typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index ecbf400e34f..486c1cd1837 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -85,6 +85,34 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "someProp": typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index ecbf400e34f..486c1cd1837 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -85,6 +85,34 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "someProp": typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index a948f3848c7..70d2ffbcd8b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,8 +19,8 @@ "param2": typing.Type[Param2], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "param": typing.Union[ Param[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 79c6229df62..886e9541ee7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -17,6 +17,17 @@ "keyword": typing.Type[Keyword], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "keyword": typing.Union[ + Keyword[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index fd62613dda6..161178e50c1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -19,8 +19,8 @@ "requiredFile": typing.Type[RequiredFile], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "requiredFile": typing.Union[ RequiredFile[typing.Union[bytes, schemas.FileIO]], @@ -30,6 +30,17 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "additionalMetadata": typing.Union[ + AdditionalMetadata[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 0065ef269fb..6b814393325 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -19,8 +19,8 @@ "file": typing.Type[File], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +RequiredDictInput = typing_extensions.TypedDict( + 'RequiredDictInput', { "file": typing.Union[ File[typing.Union[bytes, schemas.FileIO]], @@ -30,6 +30,17 @@ ], } ) +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "additionalMetadata": typing.Union[ + AdditionalMetadata[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 6a5ad3aa12b..7725ad168f6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -55,6 +55,18 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: "files": typing.Type[Files], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "files": typing.Union[ + Files[tuple], + schemas.Unset, + list, + tuple + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 88e4d2e8edc..b4d1e7da8e6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -80,3 +80,15 @@ def __new__( "string": typing.Type[foo.Foo], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "string": typing.Union[ + foo.Foo[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ], + }, + total=False +) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index 5d48e661682..72e74a158e3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "version": typing.Union[ Version[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index 5d48e661682..72e74a158e3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "version": typing.Union[ Version[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index f4340ec25c9..a876d6eb586 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,6 +19,22 @@ "status": typing.Type[Status], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "name": typing.Union[ + Name[str], + schemas.Unset, + str + ], + "status": typing.Union[ + Status[str], + schemas.Unset, + str + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index e9b5356eebe..99646a4508d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,24 @@ "file": typing.Type[File], } ) +DictInput = typing_extensions.TypedDict( + 'DictInput', + { + "additionalMetadata": typing.Union[ + AdditionalMetadata[str], + schemas.Unset, + str + ], + "file": typing.Union[ + File[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ], + }, + total=False +) class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 4c4239f2785..86560b4248c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -73,8 +73,8 @@ def POSITIVE_8080(cls) -> Port[str]: "port": typing.Type[Port], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "port": typing.Union[ Port[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 4b3ddebb44a..24e1e8496e1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -RequiredProperties = typing_extensions.TypedDict( - 'RequiredProperties', +DictInput = typing_extensions.TypedDict( + 'DictInput', { "version": typing.Union[ Version[str], From b2fa239d7d3f13597e5e992356b22b095e146ceb Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 13:47:58 -0700 Subject: [PATCH 06/36] Writes DictInput class to store required and optional input properties --- .../codegen/DefaultCodegen.java | 12 ++++++++++++ .../codegen/model/CodegenSchema.java | 14 ++++++++++++++ .../components/schemas/_helper_getschemas.hbs | 9 ++++++++- .../src/petstore_api/components/schema/animal.py | 4 ++++ .../src/petstore_api/components/schema/apple.py | 4 ++++ .../petstore_api/components/schema/apple_req.py | 4 ++++ .../petstore_api/components/schema/banana_req.py | 4 ++++ .../src/petstore_api/components/schema/category.py | 4 ++++ .../petstore_api/components/schema/enum_test.py | 4 ++++ .../petstore_api/components/schema/format_test.py | 4 ++++ .../src/petstore_api/components/schema/name.py | 4 ++++ .../components/schema/no_additional_properties.py | 4 ++++ ...ll_of_with_req_test_prop_from_unset_add_prop.py | 4 ++++ .../schema/object_with_difficultly_named_props.py | 4 ++++ .../src/petstore_api/components/schema/pet.py | 4 ++++ .../src/petstore_api/components/schema/whale.py | 4 ++++ .../src/petstore_api/components/schema/zebra.py | 4 ++++ .../application_x_www_form_urlencoded/schema.py | 4 ++++ .../content/multipart_form_data/schema.py | 4 ++++ .../content/multipart_form_data/schema.py | 4 ++++ 20 files changed, 102 insertions(+), 1 deletion(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index f50e49459ef..1393b5fb48e 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -2291,6 +2291,18 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ // ideally requiredProperties would come before properties property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath, ((Schema) p).getProperties()); property.optionalProperties = getOptionalProperties(property.properties, required, sourceJsonPath); + LinkedHashMapWithContext reqAndOptionalProps = new LinkedHashMapWithContext<>(); + if (property.requiredProperties != null && property.optionalProperties == null) { + property.requiredAndOptionalProperties = reqAndOptionalProps; + property.requiredAndOptionalProperties.setJsonPathPiece(property.requiredProperties.jsonPathPiece()); + } else if (property.requiredProperties == null && property.optionalProperties != null) { + property.requiredAndOptionalProperties = reqAndOptionalProps; + property.requiredAndOptionalProperties.setJsonPathPiece(property.optionalProperties.jsonPathPiece()); + } else if (property.requiredProperties != null && property.optionalProperties != null) { + property.requiredAndOptionalProperties = reqAndOptionalProps; + CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); + property.requiredAndOptionalProperties.setJsonPathPiece(jsonPathPiece); + } // end of properties that need to be ordered to set correct camelCase jsonPathPieces if (currentJsonPath != null) { diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index ce1e1d64053..09e21c542f1 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -85,6 +85,7 @@ public class CodegenSchema { public CodegenKey jsonPathPiece; public String unescapedDescription; public LinkedHashMapWithContext optionalProperties; + public LinkedHashMapWithContext requiredAndOptionalProperties; public boolean schemaIsFromAdditionalProperties; public HashMap testCases = new HashMap<>(); /** @@ -241,6 +242,19 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } + if (requiredProperties != null && optionalProperties != null) { + CodegenSchema extraSchema = new CodegenSchema(); + extraSchema.instanceType = "propertiesInputType"; + extraSchema.optionalProperties = optionalProperties; + extraSchema.requiredProperties = requiredProperties; + extraSchema.requiredAndOptionalProperties = requiredAndOptionalProperties; + boolean allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline()); + if (allAreInline) { + schemasBeforeImports.add(extraSchema); + } else { + schemasAfterImports.add(extraSchema); + } + } if (refInfo != null && level > 0) { // do not add ref to schemas diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index c5d95a900c0..cd3d06df4f9 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -21,9 +21,16 @@ {{#eq instanceType "optionalPropertiesInputType" }} {{> components/schemas/_helper_optional_properties_type }} {{else}} - {{#eq instanceType "importsType" }} + {{#eq instanceType "propertiesInputType" }} + + +class {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.camelCase}}, {{optionalProperties.jsonPathPiece.camelCase}}): + pass + {{else}} + {{#eq instanceType "importsType" }} {{> _helper_imports }} + {{/eq}} {{/eq}} {{/eq}} {{/eq}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 82020c459c6..5b3f62a46bd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -53,6 +53,10 @@ class Schema_(metaclass=schemas.SingletonMeta): ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Animal( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 46c6ef9dd85..6fa89d4dd7f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -70,6 +70,10 @@ class Schema_(metaclass=schemas.SingletonMeta): ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Apple( schemas.NoneBase, schemas.DictBase, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 92ec7727960..db0215ec0a8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -42,6 +42,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class AppleReq( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index eacf13a922c..163bde97258 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -44,6 +44,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class BananaReq( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 80baf7f9451..96f0c21ad84 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -54,6 +54,10 @@ class Schema_(metaclass=schemas.SingletonMeta): ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Category( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 5fad9adfdd6..4e01ce7a72f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -376,3 +376,7 @@ def __new__( }, total=False ) + + +class DictInput(RequiredDictInput, OptionalDictInput): + pass diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 0fbda87f90b..33bad33eafd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -360,6 +360,10 @@ class Schema_(metaclass=schemas.SingletonMeta): ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class FormatTest( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index 0ba50ef96ca..d36b70e06b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -50,6 +50,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Name( schemas.AnyTypeSchema[schemas.T], ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index bb00e6c4552..ba635c1fc61 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -44,6 +44,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class NoAdditionalProperties( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 958f029939b..1a5a6c48644 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -63,6 +63,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class _1( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 4922aa7d3f3..2222756105b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -50,6 +50,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class ObjectWithDifficultlyNamedProps( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 1944fd3f10c..6ca14a16fe9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -306,3 +306,7 @@ def __new__( }, total=False ) + + +class DictInput(RequiredDictInput, OptionalDictInput): + pass diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 32065e89f17..a2d113558eb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -68,6 +68,10 @@ def WHALE(cls) -> ClassName[str]: ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Whale( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index dafe5af12b3..c3feac2303a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -92,6 +92,10 @@ def ZEBRA(cls) -> ClassName[str]: ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Zebra( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index dec58c8eaef..0a511ad30f6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -258,6 +258,10 @@ class Schema_(metaclass=schemas.SingletonMeta): ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Schema( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 161178e50c1..3b371720f0a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -43,6 +43,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Schema( schemas.DictSchema[schemas.T] ): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 6b814393325..a2376a273bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -43,6 +43,10 @@ ) +class DictInput(RequiredDictInput, OptionalDictInput): + pass + + class Schema( schemas.DictSchema[schemas.T] ): From fea5f20358e3849f8da994be10708879709758c8 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 14:15:02 -0700 Subject: [PATCH 07/36] Changes new dict inptut type for arg_ and changes args_* to arg_ --- .../python/components/schemas/_helper_new.hbs | 27 ++++++- .../content/application_json/schema.py | 9 ++- .../schema/abstract_step_message.py | 5 +- .../schema/additional_properties_class.py | 65 ++++++++++++++-- .../schema/additional_properties_validator.py | 77 ++++++++++++++++++- ...ditional_properties_with_array_of_enums.py | 9 ++- .../petstore_api/components/schema/address.py | 9 ++- .../petstore_api/components/schema/animal.py | 5 +- .../components/schema/any_type_and_format.py | 5 +- .../components/schema/api_response.py | 5 +- .../components/schema/apple_req.py | 5 +- .../schema/array_of_array_of_number_only.py | 5 +- .../components/schema/array_of_number_only.py | 5 +- .../components/schema/array_test.py | 5 +- .../petstore_api/components/schema/banana.py | 5 +- .../components/schema/banana_req.py | 5 +- .../components/schema/basque_pig.py | 5 +- .../components/schema/capitalization.py | 5 +- .../src/petstore_api/components/schema/cat.py | 5 +- .../components/schema/category.py | 5 +- .../components/schema/child_cat.py | 5 +- .../petstore_api/components/schema/client.py | 5 +- .../schema/complex_quadrilateral.py | 5 +- .../components/schema/composed_object.py | 2 +- .../schema/composed_one_of_different_types.py | 2 +- .../components/schema/danish_pig.py | 5 +- .../src/petstore_api/components/schema/dog.py | 5 +- .../petstore_api/components/schema/drawing.py | 5 +- .../components/schema/enum_arrays.py | 5 +- .../components/schema/enum_test.py | 5 +- .../components/schema/equilateral_triangle.py | 5 +- .../petstore_api/components/schema/file.py | 5 +- .../schema/file_schema_test_class.py | 5 +- .../src/petstore_api/components/schema/foo.py | 5 +- .../components/schema/format_test.py | 5 +- .../components/schema/from_schema.py | 5 +- .../components/schema/grandparent_animal.py | 5 +- .../components/schema/has_only_read_only.py | 5 +- .../components/schema/health_check_result.py | 5 +- .../components/schema/isosceles_triangle.py | 5 +- .../json_patch_request_add_replace_test.py | 5 +- .../schema/json_patch_request_move_copy.py | 5 +- .../schema/json_patch_request_remove.py | 5 +- .../components/schema/map_test.py | 38 +++++++-- ...perties_and_additional_properties_class.py | 30 +++++++- .../petstore_api/components/schema/money.py | 5 +- .../schema/no_additional_properties.py | 5 +- .../components/schema/nullable_class.py | 18 ++++- .../components/schema/number_only.py | 5 +- .../schema/obj_with_required_props.py | 5 +- .../schema/obj_with_required_props_base.py | 5 +- ...ject_model_with_arg_and_args_properties.py | 5 +- .../schema/object_model_with_ref_props.py | 5 +- ..._with_req_test_prop_from_unset_add_prop.py | 5 +- .../object_with_colliding_properties.py | 5 +- .../schema/object_with_decimal_properties.py | 5 +- .../object_with_difficultly_named_props.py | 5 +- ...object_with_inline_composition_property.py | 5 +- ...ect_with_invalid_named_refed_properties.py | 5 +- .../schema/object_with_optional_test_prop.py | 5 +- .../schema/object_with_validations.py | 2 +- .../petstore_api/components/schema/order.py | 5 +- .../components/schema/parent_pet.py | 2 +- .../src/petstore_api/components/schema/pet.py | 5 +- .../petstore_api/components/schema/player.py | 5 +- .../components/schema/read_only_first.py | 5 +- .../req_props_from_explicit_add_props.py | 5 +- .../schema/req_props_from_true_add_props.py | 5 +- .../schema/req_props_from_unset_add_props.py | 5 +- .../components/schema/scalene_triangle.py | 5 +- .../schema/self_referencing_object_model.py | 5 +- .../components/schema/simple_quadrilateral.py | 5 +- .../components/schema/special_model_name.py | 5 +- .../components/schema/string_boolean_map.py | 8 +- .../src/petstore_api/components/schema/tag.py | 5 +- .../petstore_api/components/schema/user.py | 5 +- .../petstore_api/components/schema/whale.py | 5 +- .../petstore_api/components/schema/zebra.py | 5 +- .../schema.py | 5 +- .../schema.py | 5 +- .../content/application_json/schema.py | 8 +- .../post/parameters/parameter_1/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../schema.py | 5 +- .../get/parameters/parameter_0/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../content/application_json/schema.py | 5 +- .../paths/foo/get/servers/server_1.py | 5 +- .../pet_find_by_status/servers/server_1.py | 5 +- .../schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../src/petstore_api/servers/server_0.py | 5 +- .../src/petstore_api/servers/server_1.py | 5 +- 96 files changed, 600 insertions(+), 111 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 98fa170b55d..e058f7c0df4 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -18,7 +18,32 @@ def __new__( ], {{/contains}} {{#contains types "object"}} - *args_: typing.Union[{{> _helper_schema_python_types }}], + {{#if requiredAndOptionalProperties}} + *arg_: typing.Union[ + {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], + {{else}} + {{#if additionalProperties}} + {{#if additionalProperties.isBooleanSchemaFalse }} + {{! additionalProperties is False, empty map allowed}} + *arg_: typing.Mapping, + {{else}} + {{! additionalProperties is True/schema}} + *arg_: typing.Mapping[ + str, + typing.Union[ + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + ] + ], + {{/if}} + {{else}} + {{! additionalProperties is unset}} + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + {{/if}} + {{/if}} {{/contains}} {{#contains types "string"}} arg_: {{> _helper_schema_python_types }}, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index da3877c8b2a..f7f82097f91 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -29,7 +29,14 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[decimal.Decimal], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index d54db6b5a78..077dc74a7fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -200,7 +200,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], description: typing.Union[ schemas.AnyTypeSchema[typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index b5e12fec11d..2148a5209d6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -29,7 +29,13 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[str], @@ -67,7 +73,13 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties3[str], @@ -104,7 +116,14 @@ def __getitem__(self, name: str) -> AdditionalProperties2[frozendict.frozendict] def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[frozendict.frozendict], + dict, + frozendict.frozendict + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties2[frozendict.frozendict], @@ -155,7 +174,30 @@ def __getitem__(self, name: str) -> AdditionalProperties4[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties4[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties4[ @@ -206,7 +248,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> EmptyMap[frozendict.frozendict]: inst = super().__new__( @@ -239,7 +281,13 @@ def __getitem__(self, name: str) -> AdditionalProperties6[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties6[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties6[str], @@ -422,7 +470,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], map_property: typing.Union[ MapProperty[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index d9d3144bdde..9d605359fcd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -38,7 +38,30 @@ def __getitem__(self, name: str) -> AdditionalProperties[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[ @@ -154,7 +177,30 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties2[ @@ -270,7 +316,30 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties3[ @@ -333,7 +402,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> AdditionalPropertiesValidator[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 3bac9db3dca..f8ef836f3d9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -69,7 +69,14 @@ def __getitem__(self, name: str) -> AdditionalProperties[tuple]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[tuple], + list, + tuple + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index c83165420fb..8f6b0de4f0f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -34,7 +34,14 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[decimal.Decimal], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 5b3f62a46bd..5a06642d1bf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -118,7 +118,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], className: typing.Union[ ClassName[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 67397715791..78aaf90e2f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -866,7 +866,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], uuid: typing.Union[ Uuid[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 624312becbc..c7136ac52b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -95,7 +95,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], code: typing.Union[ Code[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index db0215ec0a8..eb8b4542cf2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], cultivar: typing.Union[ Cultivar[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 1c2dc7db1c6..3f8335a1e65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -148,7 +148,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], ArrayArrayNumber: typing.Union[ ArrayArrayNumber[tuple], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index 393c0b3420c..8ebdc0bcace 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -111,7 +111,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], ArrayNumber: typing.Union[ ArrayNumber[tuple], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index c171eb56f0b..294828e61db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -280,7 +280,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], array_of_string: typing.Union[ ArrayOfString[tuple], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 207b17c5f93..4a78303bbe0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -79,7 +79,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], lengthCm: typing.Union[ LengthCm[decimal.Decimal], decimal.Decimal, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 163bde97258..eef5dda9ca1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -89,7 +89,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], lengthCm: typing.Union[ LengthCm[decimal.Decimal], decimal.Decimal, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 057d3d0d2ec..1a4e0481e1f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -97,7 +97,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], className: typing.Union[ ClassName[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index cb02044f941..8095a652175 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -127,7 +127,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], smallCamel: typing.Union[ SmallCamel[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 8930959f578..b5de2d52ec4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -67,7 +67,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], declawed: typing.Union[ Declawed[schemas.BoolClass], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 96f0c21ad84..0bc025ae066 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -111,7 +111,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], name: typing.Union[ Name[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index db91408c790..58daa274df5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -67,7 +67,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], name: typing.Union[ Name[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 748545f5674..eefe30972ec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -72,7 +72,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], client: typing.Union[ Client[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 853560f7af0..9d07aaec1e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], quadrilateralType: typing.Union[ QuadrilateralType[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index d84e2de021a..a7991463264 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -36,7 +36,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> ComposedObject[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 209af72b29e..fff27d32095 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -27,7 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> _4[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index 31f5cb67f6a..b52466cc4bc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -97,7 +97,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], className: typing.Union[ ClassName[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 817bece5f21..118fc883978 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -67,7 +67,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], breed: typing.Union[ Breed[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 5000a4ca589..926056c11f1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -156,7 +156,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], mainShape: typing.Union[ shape.Shape[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 73a3912fabe..95f42a9463a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -170,7 +170,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], just_symbol: typing.Union[ JustSymbol[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 4e01ce7a72f..6a41b7067fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -221,7 +221,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], enum_string_required: typing.Union[ EnumStringRequired[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 196762dae80..090998e3ffa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], triangleType: typing.Union[ TriangleType[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index 560445a1c96..d1310666947 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -74,7 +74,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], sourceURI: typing.Union[ SourceURI[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 3b1ce146c83..34dd0dffc93 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -95,7 +95,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], file: typing.Union[ file.File[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index b385c3794ac..7ef02cbe6c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -54,7 +54,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], bar: typing.Union[ bar.Bar[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 33bad33eafd..c8acf9283cf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -508,7 +508,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], byte: typing.Union[ Byte[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 230faadb959..3b6b690a606 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -84,7 +84,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], data: typing.Union[ Data[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 705fea5e7a8..de5716e4c18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -85,7 +85,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], pet_type: typing.Union[ PetType[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index bec4f3b74d5..5e990dda0c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -83,7 +83,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], bar: typing.Union[ Bar[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index fd63f1e0e37..9c8c0453cce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -127,7 +127,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], NullableMessage: typing.Union[ NullableMessage[typing.Union[ schemas.NoneClass, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 8cb0a3f10c1..80b688b05e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], triangleType: typing.Union[ TriangleType[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index 4caa111d683..d7a7cb48747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -161,7 +161,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], op: typing.Union[ Op[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index de5bb14fe96..7c8ed47f54a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -117,7 +117,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], op: typing.Union[ Op[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index f0f5a9630a9..da0821efb8a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -101,7 +101,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], op: typing.Union[ Op[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index e30b1c00beb..745383b40ea 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -29,7 +29,13 @@ def __getitem__(self, name: str) -> AdditionalProperties2[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties2[str], @@ -66,7 +72,14 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[frozendict.frozendict], @@ -130,7 +143,13 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties3[str], @@ -168,7 +187,13 @@ def __getitem__(self, name: str) -> AdditionalProperties4[schemas.BoolClass]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties4[schemas.BoolClass], + bool + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties4[schemas.BoolClass], @@ -243,7 +268,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], map_map_of_string: typing.Union[ MapMapOfString[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 07ba9cc543d..3ad561a59db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -30,7 +30,30 @@ def __getitem__(self, name: str) -> animal.Animal[frozendict.frozendict]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ animal.Animal[frozendict.frozendict], @@ -134,7 +157,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], uuid: typing.Union[ Uuid[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index b3bfcf04627..ca774cd0731 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -71,7 +71,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], amount: typing.Union[ Amount[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index ba635c1fc61..6f9af4564e8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -89,7 +89,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], id: typing.Union[ Id[decimal.Decimal], decimal.Decimal, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 4d7dc15a9d7..f4c416e1b3b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -842,7 +842,18 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties3[typing.Union[ @@ -1113,7 +1124,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], integer_prop: typing.Union[ IntegerProp[typing.Union[ schemas.NoneClass, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index a05b130d333..4e250b140fe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -74,7 +74,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], JustNumber: typing.Union[ JustNumber[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index cda99747fdd..8a4a5c6c4cf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -81,7 +81,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], a: typing.Union[ A[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 08704cadf0b..13784fe08c4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -77,7 +77,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], b: typing.Union[ B[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 576460a5bd9..19a6a83a4d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -92,7 +92,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], arg: typing.Union[ Arg[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 64eeef1d468..d7ac1d9d00e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -64,7 +64,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], myNumber: typing.Union[ number_with_validations.NumberWithValidations[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 1a5a6c48644..9e45da796c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -133,7 +133,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], test: typing.Union[ schemas.AnyTypeSchema[typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 8c7d235b121..d8edf26658d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], someProp: typing.Union[ SomeProp[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index b845657addf..998b06a4c7a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -63,7 +63,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], length: typing.Union[ decimal_payload.DecimalPayload[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 2222756105b..336dbd304ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -109,7 +109,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 55d5eae5cdd..e7b4f6e69ee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -166,7 +166,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], someProp: typing.Union[ SomeProp[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index f8a41071510..9f11be74bd6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -62,7 +62,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 603f98ee6da..6cf05e01454 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -72,7 +72,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], test: typing.Union[ Test[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 5bdfe49fed1..01c8ea8d2d4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -29,7 +29,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> ObjectWithValidations[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 3c3dfc0fb60..9bfcc2d17ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -173,7 +173,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], id: typing.Union[ Id[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 34022ad2b04..e5a6d3cdd58 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -39,7 +39,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA ) -> ParentPet[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 6ca14a16fe9..f071f4a4082 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -209,7 +209,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], name: typing.Union[ Name[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 0502cc3dae7..483c3c6c87a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -61,7 +61,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], name: typing.Union[ Name[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index feaa91afdb0..d0d1cfbc2af 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -83,7 +83,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], bar: typing.Union[ Bar[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 42c728a5828..19358169fc5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -71,7 +71,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], validName: typing.Union[ AdditionalProperties[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index c2574b7a50f..8feae5a5585 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -141,7 +141,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], validName: typing.Union[ AdditionalProperties[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index d42394e7851..437187f586d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -153,7 +153,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], validName: typing.Union[ schemas.AnyTypeSchema[typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index bc8cb4d6121..fe4339ec962 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], triangleType: typing.Union[ TriangleType[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index c31e9587d26..bc969af19a6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -46,7 +46,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], selfRef: typing.Union[ SelfReferencingObjectModel[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index e89bb670cd1..acf4bb59d18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], quadrilateralType: typing.Union[ QuadrilateralType[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index c1fb6a2917d..ac4d15544c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -74,7 +74,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], a: typing.Union[ A[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index e2f0b75c4c5..de103caf205 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -34,7 +34,13 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[schemas.BoolClass], + bool + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[schemas.BoolClass], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 3b68d658f75..9a97bce59c7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -84,7 +84,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], id: typing.Union[ Id[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 82f7e27d94a..4391451c461 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -395,7 +395,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], id: typing.Union[ Id[decimal.Decimal], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index a2d113558eb..6fc0646249d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -129,7 +129,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], className: typing.Union[ ClassName[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index c3feac2303a..b7c9e2c6795 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -150,7 +150,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], className: typing.Union[ ClassName[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 66465c91ba4..33c3785ddac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -172,7 +172,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], enum_form_string_array: typing.Union[ EnumFormStringArray[tuple], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 0a511ad30f6..f50f7abd13b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -373,7 +373,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], byte: typing.Union[ Byte[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 98e182c11f8..9617c9445d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -29,7 +29,13 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[str], + str + ] + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ AdditionalProperties[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 486c1cd1837..7acce415858 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -161,7 +161,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], someProp: typing.Union[ SomeProp[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 486c1cd1837..7acce415858 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -161,7 +161,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], someProp: typing.Union[ SomeProp[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 486c1cd1837..7acce415858 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -161,7 +161,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], someProp: typing.Union[ SomeProp[ schemas.INPUT_BASE_TYPES diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 70d2ffbcd8b..02de9fa101e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -87,7 +87,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], param: typing.Union[ Param[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 886e9541ee7..7f8787e0a96 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -67,7 +67,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], keyword: typing.Union[ Keyword[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 3b371720f0a..56a65785d01 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -95,7 +95,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], requiredFile: typing.Union[ RequiredFile[typing.Union[bytes, schemas.FileIO]], bytes, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index a2376a273bb..2b759b1aa41 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -95,7 +95,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], file: typing.Union[ File[typing.Union[bytes, schemas.FileIO]], bytes, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 7725ad168f6..78982663899 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -106,7 +106,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], files: typing.Union[ Files[tuple], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index b4d1e7da8e6..d4699ee0962 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -49,7 +49,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], string: typing.Union[ foo.Foo[frozendict.frozendict], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index 72e74a158e3..5268ee2f047 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -83,7 +83,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], version: typing.Union[ Version[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index 72e74a158e3..5268ee2f047 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -83,7 +83,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], version: typing.Union[ Version[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index a876d6eb586..67db65baf86 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -78,7 +78,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], name: typing.Union[ Name[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 99646a4508d..c95ebd4a499 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -80,7 +80,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], additionalMetadata: typing.Union[ AdditionalMetadata[str], schemas.Unset, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 86560b4248c..0a06499307c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -129,7 +129,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], port: typing.Union[ Port[str], str diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 24e1e8496e1..39e41e7bae9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -83,7 +83,10 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *arg_: typing.Union[ + DictInput, + typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ], version: typing.Union[ Version[str], str From e677ee7c056511fe7d37a841bd688e618e8b390f Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 14:23:31 -0700 Subject: [PATCH 08/36] Update new signature --- .../python/components/schemas/_helper_new.hbs | 123 +-------- .../content/application_json/schema.py | 2 +- .../content/application_json/schema.py | 12 +- .../content/application_json/schema.py | 2 +- .../content/application_xml/schema.py | 2 +- .../components/schema/_200_response.py | 15 +- .../petstore_api/components/schema/_return.py | 8 +- .../schema/abstract_step_message.py | 71 +----- .../schema/additional_properties_class.py | 159 ++---------- .../schema/additional_properties_validator.py | 108 ++------ ...ditional_properties_with_array_of_enums.py | 14 +- .../petstore_api/components/schema/address.py | 12 +- .../petstore_api/components/schema/animal.py | 19 +- .../components/schema/animal_farm.py | 2 +- .../components/schema/any_type_and_format.py | 241 +++--------------- .../components/schema/any_type_not_string.py | 8 +- .../components/schema/api_response.py | 27 +- .../petstore_api/components/schema/apple.py | 14 +- .../components/schema/apple_req.py | 17 +- .../schema/array_holding_any_type.py | 2 +- .../schema/array_of_array_of_number_only.py | 19 +- .../components/schema/array_of_enums.py | 2 +- .../components/schema/array_of_number_only.py | 17 +- .../components/schema/array_test.py | 39 +-- .../schema/array_with_validations_in_items.py | 2 +- .../petstore_api/components/schema/banana.py | 15 +- .../components/schema/banana_req.py | 19 +- .../components/schema/basque_pig.py | 13 +- .../components/schema/capitalization.py | 44 +--- .../src/petstore_api/components/schema/cat.py | 22 +- .../components/schema/category.py | 20 +- .../components/schema/child_cat.py | 22 +- .../components/schema/class_model.py | 14 +- .../petstore_api/components/schema/client.py | 14 +- .../schema/complex_quadrilateral.py | 22 +- ...d_any_of_different_types_no_validations.py | 10 +- .../components/schema/composed_array.py | 2 +- .../components/schema/composed_bool.py | 2 +- .../components/schema/composed_none.py | 2 +- .../components/schema/composed_number.py | 2 +- .../components/schema/composed_object.py | 8 +- .../schema/composed_one_of_different_types.py | 18 +- .../components/schema/composed_string.py | 2 +- .../components/schema/danish_pig.py | 13 +- .../src/petstore_api/components/schema/dog.py | 22 +- .../petstore_api/components/schema/drawing.py | 106 +------- .../components/schema/enum_arrays.py | 23 +- .../components/schema/enum_test.py | 71 +----- .../components/schema/equilateral_triangle.py | 22 +- .../petstore_api/components/schema/file.py | 14 +- .../schema/file_schema_test_class.py | 24 +- .../src/petstore_api/components/schema/foo.py | 14 +- .../components/schema/format_test.py | 145 +---------- .../components/schema/from_schema.py | 21 +- .../petstore_api/components/schema/fruit.py | 14 +- .../components/schema/fruit_req.py | 8 +- .../components/schema/gm_fruit.py | 14 +- .../components/schema/grandparent_animal.py | 13 +- .../components/schema/has_only_read_only.py | 20 +- .../components/schema/health_check_result.py | 20 +- .../components/schema/isosceles_triangle.py | 22 +- .../petstore_api/components/schema/items.py | 2 +- .../components/schema/json_patch_request.py | 10 +- .../json_patch_request_add_replace_test.py | 38 +-- .../schema/json_patch_request_move_copy.py | 16 +- .../schema/json_patch_request_remove.py | 16 +- .../petstore_api/components/schema/mammal.py | 8 +- .../components/schema/map_test.py | 81 ++---- ...perties_and_additional_properties_class.py | 41 +-- .../petstore_api/components/schema/money.py | 18 +- .../petstore_api/components/schema/name.py | 15 +- .../schema/no_additional_properties.py | 19 +- .../components/schema/nullable_class.py | 241 +++--------------- .../components/schema/nullable_shape.py | 8 +- .../components/schema/nullable_string.py | 2 +- .../components/schema/number_only.py | 16 +- .../schema/obj_with_required_props.py | 13 +- .../schema/obj_with_required_props_base.py | 13 +- ...ject_model_with_arg_and_args_properties.py | 18 +- .../schema/object_model_with_ref_props.py | 28 +- ..._with_req_test_prop_from_unset_add_prop.py | 51 +--- .../object_with_colliding_properties.py | 22 +- .../schema/object_with_decimal_properties.py | 27 +- .../object_with_difficultly_named_props.py | 8 +- ...object_with_inline_composition_property.py | 39 +-- ...ect_with_invalid_named_refed_properties.py | 8 +- .../schema/object_with_optional_test_prop.py | 14 +- .../schema/object_with_validations.py | 8 +- .../petstore_api/components/schema/order.py | 48 +--- .../components/schema/parent_pet.py | 8 +- .../src/petstore_api/components/schema/pet.py | 50 +--- .../src/petstore_api/components/schema/pig.py | 8 +- .../petstore_api/components/schema/player.py | 21 +- .../components/schema/quadrilateral.py | 8 +- .../schema/quadrilateral_interface.py | 8 +- .../components/schema/read_only_first.py | 20 +- .../req_props_from_explicit_add_props.py | 16 +- .../schema/req_props_from_true_add_props.py | 50 +--- .../schema/req_props_from_unset_add_props.py | 37 +-- .../components/schema/scalene_triangle.py | 22 +- .../schema/self_referencing_array_model.py | 2 +- .../schema/self_referencing_object_model.py | 19 +- .../petstore_api/components/schema/shape.py | 8 +- .../components/schema/shape_or_null.py | 8 +- .../components/schema/simple_quadrilateral.py | 22 +- .../components/schema/some_object.py | 8 +- .../components/schema/special_model_name.py | 14 +- .../components/schema/string_boolean_map.py | 11 +- .../components/schema/string_enum.py | 2 +- .../src/petstore_api/components/schema/tag.py | 21 +- .../components/schema/triangle.py | 8 +- .../components/schema/triangle_interface.py | 8 +- .../petstore_api/components/schema/user.py | 161 +----------- .../petstore_api/components/schema/whale.py | 25 +- .../petstore_api/components/schema/zebra.py | 39 +-- .../fake/get/parameters/parameter_0/schema.py | 2 +- .../fake/get/parameters/parameter_2/schema.py | 2 +- .../schema.py | 23 +- .../schema.py | 93 +------ .../content/application_json/schema.py | 11 +- .../post/parameters/parameter_0/schema.py | 8 +- .../post/parameters/parameter_1/schema.py | 39 +-- .../content/application_json/schema.py | 8 +- .../content/multipart_form_data/schema.py | 39 +-- .../content/application_json/schema.py | 8 +- .../content/multipart_form_data/schema.py | 39 +-- .../schema.py | 18 +- .../get/parameters/parameter_0/schema.py | 14 +- .../content/multipart_form_data/schema.py | 21 +- .../put/parameters/parameter_0/schema.py | 2 +- .../put/parameters/parameter_1/schema.py | 2 +- .../put/parameters/parameter_2/schema.py | 2 +- .../put/parameters/parameter_3/schema.py | 2 +- .../put/parameters/parameter_4/schema.py | 2 +- .../content/multipart_form_data/schema.py | 21 +- .../content/multipart_form_data/schema.py | 17 +- .../content/application_json/schema.py | 15 +- .../paths/foo/get/servers/server_1.py | 11 +- .../get/parameters/parameter_0/schema.py | 2 +- .../pet_find_by_status/servers/server_1.py | 11 +- .../get/parameters/parameter_0/schema.py | 2 +- .../schema.py | 20 +- .../content/multipart_form_data/schema.py | 22 +- .../src/petstore_api/servers/server_0.py | 16 +- .../src/petstore_api/servers/server_1.py | 11 +- 145 files changed, 566 insertions(+), 3123 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index e058f7c0df4..9a9cadf1fe4 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -19,7 +19,7 @@ def __new__( {{/contains}} {{#contains types "object"}} {{#if requiredAndOptionalProperties}} - *arg_: typing.Union[ + arg_: typing.Union[ {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], @@ -27,10 +27,10 @@ def __new__( {{#if additionalProperties}} {{#if additionalProperties.isBooleanSchemaFalse }} {{! additionalProperties is False, empty map allowed}} - *arg_: typing.Mapping, + arg_: typing.Mapping, {{else}} {{! additionalProperties is True/schema}} - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ {{#with additionalProperties}} @@ -41,7 +41,7 @@ def __new__( {{/if}} {{else}} {{! additionalProperties is unset}} - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], {{/if}} {{/if}} {{/contains}} @@ -62,7 +62,7 @@ def __new__( {{/contains}} {{else}} {{#contains types "object"}} - *args_: typing.Union[ + arg_: typing.Union[ {{> _helper_schema_python_types_newline }} ], {{else}} @@ -72,79 +72,9 @@ def __new__( {{/contains}} {{/eq}} {{else}} - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, {{/if}} -{{#if types}} - {{#eq types.size 1}} - {{#contains types "object"}} - {{#each requiredProperties}} - {{#if @key.isValid}} - {{#with this}} - {{#if refInfo.refClass}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - {{#if jsonPathPiece}} - {{#if schemaIsFromAdditionalProperties}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{else}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{/if}} - {{else}} - {{@key.original}}: typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - {{> components/schemas/_helper_schema_python_base_types_newline }} - ]], - {{> _helper_schema_python_types_newline }} - ], - {{/if}} - {{/if}} - {{/with}} - {{/if}} - {{/each}} - {{/contains}} - {{/eq}} -{{/if}} -{{#each optionalProperties}} - {{#if @key.isValid}} - {{#if refInfo.refClass}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=true }} - ] = schemas.unset, - {{else}} - {{@key.original}}: typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=true }} - ] = schemas.unset, - {{/if}} - {{/if}} -{{/each}} - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, -{{#with additionalProperties}} - {{#unless isBooleanSchemaFalse}} - {{#if refInfo.refClass}} - **kwargs: typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - **kwargs: typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{/if}} - {{/unless}} -{{else}} - {{#eq types null}} - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA - {{else}} - {{#contains types "object"}} - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA - {{/contains}} - {{/eq}} -{{/with}} + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None {{#if types}} {{#eq types.size 1}} ) -> {{jsonPathPiece.camelCase}}[{{> components/schemas/_helper_schema_python_base_types }}]: @@ -164,47 +94,8 @@ def __new__( {{/if}} inst = super().__new__( cls, -{{#eq types null}} - *args_, -{{else}} - {{#contains types "object"}} - *args_, - {{else}} arg_, - {{/contains}} -{{/eq}} -{{#if types}} - {{#eq types.size 1}} - {{#contains types "object"}} - {{#each requiredProperties}} - {{#if @key.isValid}} - {{#with this}} - {{@key.original}}={{@key.original}}, - {{/with}} - {{/if}} - {{/each}} - {{/contains}} - {{/eq}} -{{/if}} -{{#each optionalProperties}} - {{#if @key.isValid}} - {{@key.original}}={{@key.original}}, - {{/if}} -{{/each}} configuration_=configuration_, -{{#with additionalProperties}} - {{#unless isBooleanSchemaFalse}} - **kwargs, - {{/unless}} -{{else}} - {{#eq types null}} - **kwargs, - {{else}} - {{#contains types "object"}} - **kwargs, - {{/contains}} - {{/eq}} -{{/with}} ) inst = typing.cast( {{#if types}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index bd05e0c284e..0b305f816fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -31,7 +31,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index f7f82097f91..7e17e33cab5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -29,7 +29,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[decimal.Decimal], @@ -37,18 +37,12 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[decimal.Decimal], - decimal.Decimal, - int - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index 645ab0e3b45..0810c0c68e0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -31,7 +31,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index eb78d740ac9..d8b4895eba5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -31,7 +31,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 7615dff8337..62d2a3bb25c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -87,15 +87,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - name: typing.Union[ - Name[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _200Response[ typing.Union[ frozendict.frozendict, @@ -110,10 +103,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - name=name, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _200Response[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index f4c1712ddad..6c9b079a925 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -76,9 +76,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Return[ typing.Union[ frozendict.frozendict, @@ -93,9 +92,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _Return[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 077dc74a7fd..9728082ae01 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -200,81 +200,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - description: typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - discriminator: typing.Union[ - Discriminator[str], - str - ], - sequenceNumber: typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AbstractStepMessage[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - description=description, - discriminator=discriminator, - sequenceNumber=sequenceNumber, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AbstractStepMessage[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 2148a5209d6..29ab9ec4c64 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -29,24 +29,19 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapProperty[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapProperty[frozendict.frozendict], @@ -73,24 +68,19 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties3[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties3[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties2[frozendict.frozendict], @@ -116,7 +106,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[frozendict.frozendict] def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties2[frozendict.frozendict], @@ -124,18 +114,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties2[frozendict.frozendict], - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfMapProperty[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapOfMapProperty[frozendict.frozendict], @@ -174,7 +158,7 @@ def __getitem__(self, name: str) -> AdditionalProperties4[typing.Union[ def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties4[ @@ -198,34 +182,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties4[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], @@ -248,12 +210,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + arg_: typing.Mapping, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EmptyMap[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, ) inst = typing.cast( @@ -281,24 +243,19 @@ def __getitem__(self, name: str) -> AdditionalProperties6[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties6[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties6[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesString[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapWithUndeclaredPropertiesString[frozendict.frozendict], @@ -470,90 +427,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - map_property: typing.Union[ - MapProperty[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - map_of_map_property: typing.Union[ - MapOfMapProperty[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - anytype_1: typing.Union[ - Anytype1[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - map_with_undeclared_properties_anytype_1: typing.Union[ - MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - map_with_undeclared_properties_anytype_2: typing.Union[ - MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - map_with_undeclared_properties_anytype_3: typing.Union[ - MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - empty_map: typing.Union[ - EmptyMap[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - map_with_undeclared_properties_string: typing.Union[ - MapWithUndeclaredPropertiesString[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - map_property=map_property, - map_of_map_property=map_of_map_property, - anytype_1=anytype_1, - map_with_undeclared_properties_anytype_1=map_with_undeclared_properties_anytype_1, - map_with_undeclared_properties_anytype_2=map_with_undeclared_properties_anytype_2, - map_with_undeclared_properties_anytype_3=map_with_undeclared_properties_anytype_3, - empty_map=empty_map, - map_with_undeclared_properties_string=map_with_undeclared_properties_string, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalPropertiesClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 9d605359fcd..bf0bb813933 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -38,7 +38,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[typing.Union[ def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[ @@ -62,34 +62,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _0[frozendict.frozendict], @@ -112,9 +90,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ typing.Union[ frozendict.frozendict, @@ -129,9 +106,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties2[ @@ -177,7 +153,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties2[ @@ -201,34 +177,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties2[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -251,9 +205,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ typing.Union[ frozendict.frozendict, @@ -268,9 +221,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties3[ @@ -316,7 +268,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties3[ @@ -340,34 +292,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties3[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _2[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _2[frozendict.frozendict], @@ -402,15 +332,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesValidator[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalPropertiesValidator[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index f8ef836f3d9..5adbcde9552 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -30,7 +30,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties[tuple]: inst = super().__new__( cls, @@ -69,7 +69,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[tuple]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[tuple], @@ -77,18 +77,12 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[tuple], - list, - tuple - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index 8f6b0de4f0f..278cebdf2ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -34,7 +34,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[decimal.Decimal], @@ -42,18 +42,12 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[decimal.Decimal], - decimal.Decimal, - int - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Address[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Address[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 5a06642d1bf..49cf9c9b1d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -118,29 +118,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - className: typing.Union[ - ClassName[str], - str - ], - color: typing.Union[ - Color[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Animal[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - className=className, - color=color, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Animal[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index aeedce0d9a9..281437ad0c8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -36,7 +36,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnimalFarm[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 78aaf90e2f9..90195c044d1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -26,9 +26,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Uuid[ typing.Union[ frozendict.frozendict, @@ -43,9 +42,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Uuid[ @@ -80,9 +78,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Date[ typing.Union[ frozendict.frozendict, @@ -97,9 +94,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Date[ @@ -134,9 +130,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateTime[ typing.Union[ frozendict.frozendict, @@ -151,9 +146,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( DateTime[ @@ -188,9 +182,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Number[ typing.Union[ frozendict.frozendict, @@ -205,9 +198,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Number[ @@ -241,9 +233,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Binary[ typing.Union[ frozendict.frozendict, @@ -258,9 +249,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Binary[ @@ -294,9 +284,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int32[ typing.Union[ frozendict.frozendict, @@ -311,9 +300,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Int32[ @@ -347,9 +335,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int64[ typing.Union[ frozendict.frozendict, @@ -364,9 +351,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Int64[ @@ -400,9 +386,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Double[ typing.Union[ frozendict.frozendict, @@ -417,9 +402,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Double[ @@ -453,9 +437,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Float[ typing.Union[ frozendict.frozendict, @@ -470,9 +453,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _Float[ @@ -866,179 +848,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - uuid: typing.Union[ - Uuid[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - date: typing.Union[ - Date[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - number: typing.Union[ - Number[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - binary: typing.Union[ - Binary[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - int32: typing.Union[ - Int32[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - int64: typing.Union[ - Int64[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - double: typing.Union[ - Double[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeAndFormat[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - uuid=uuid, - date=date, - number=number, - binary=binary, - int32=int32, - int64=int64, - double=double, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AnyTypeAndFormat[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 3210beb3c3e..38ce281842a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -31,9 +31,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeNotString[ typing.Union[ frozendict.frozendict, @@ -48,9 +47,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AnyTypeNotString[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index c7136ac52b3..3ff3d874762 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -95,37 +95,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - code: typing.Union[ - Code[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - type: typing.Union[ - Type[str], - schemas.Unset, - str - ] = schemas.unset, - message: typing.Union[ - Message[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ApiResponse[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - code=code, - type=type, - message=message, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ApiResponse[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 6fa89d4dd7f..4d63ff8c9d4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -134,18 +134,12 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - origin: typing.Union[ - Origin[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Apple[ typing.Union[ schemas.NoneClass, @@ -154,10 +148,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - origin=origin, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Apple[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index eb8b4542cf2..e154dd234bc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -87,26 +87,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - cultivar: typing.Union[ - Cultivar[str], - str - ], - mealy: typing.Union[ - Mealy[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AppleReq[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - cultivar=cultivar, - mealy=mealy, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index bb57f60db29..e1370170a48 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -53,7 +53,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayHoldingAnyType[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 3f8335a1e65..a4421fd31f0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -33,7 +33,7 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[tuple]: inst = super().__new__( cls, @@ -70,7 +70,7 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayNumber[tuple]: inst = super().__new__( cls, @@ -148,25 +148,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - ArrayArrayNumber: typing.Union[ - ArrayArrayNumber[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - ArrayArrayNumber=ArrayArrayNumber, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ArrayOfArrayOfNumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 58f15a368ca..07da4cccb04 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -39,7 +39,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfEnums[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index 8ebdc0bcace..bbb5a1ee0a9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -33,7 +33,7 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayNumber[tuple]: inst = super().__new__( cls, @@ -111,25 +111,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - ArrayNumber: typing.Union[ - ArrayNumber[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - ArrayNumber=ArrayNumber, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ArrayOfNumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 294828e61db..cb4f3a5fa8a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfString[tuple]: inst = super().__new__( cls, @@ -69,7 +69,7 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[tuple]: inst = super().__new__( cls, @@ -106,7 +106,7 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayOfInteger[tuple]: inst = super().__new__( cls, @@ -143,7 +143,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items4[tuple]: inst = super().__new__( cls, @@ -180,7 +180,7 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayOfModel[tuple]: inst = super().__new__( cls, @@ -280,39 +280,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - array_of_string: typing.Union[ - ArrayOfString[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - array_array_of_integer: typing.Union[ - ArrayArrayOfInteger[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - array_array_of_model: typing.Union[ - ArrayArrayOfModel[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayTest[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - array_of_string=array_of_string, - array_array_of_integer=array_array_of_integer, - array_array_of_model=array_array_of_model, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ArrayTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index 4e60458b62f..00cc8d64ab8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -51,7 +51,7 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayWithValidationsInItems[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 4a78303bbe0..f1308521f9f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -79,25 +79,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - lengthCm: typing.Union[ - LengthCm[decimal.Decimal], - decimal.Decimal, - int, - float - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Banana[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - lengthCm=lengthCm, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Banana[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index eef5dda9ca1..37237f64526 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -89,28 +89,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - lengthCm: typing.Union[ - LengthCm[decimal.Decimal], - decimal.Decimal, - int, - float - ], - sweet: typing.Union[ - Sweet[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BananaReq[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - lengthCm=lengthCm, - sweet=sweet, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 1a4e0481e1f..f29664bda97 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -97,23 +97,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - className: typing.Union[ - ClassName[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BasquePig[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - className=className, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( BasquePig[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 8095a652175..832ce968dc4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -127,54 +127,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - smallCamel: typing.Union[ - SmallCamel[str], - schemas.Unset, - str - ] = schemas.unset, - CapitalCamel: typing.Union[ - CapitalCamel[str], - schemas.Unset, - str - ] = schemas.unset, - small_Snake: typing.Union[ - SmallSnake[str], - schemas.Unset, - str - ] = schemas.unset, - Capital_Snake: typing.Union[ - CapitalSnake[str], - schemas.Unset, - str - ] = schemas.unset, - SCA_ETH_Flow_Points: typing.Union[ - SCAETHFlowPoints[str], - schemas.Unset, - str - ] = schemas.unset, - ATT_NAME: typing.Union[ - ATTNAME[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Capitalization[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - smallCamel=smallCamel, - CapitalCamel=CapitalCamel, - small_Snake=small_Snake, - Capital_Snake=Capital_Snake, - SCA_ETH_Flow_Points=SCA_ETH_Flow_Points, - ATT_NAME=ATT_NAME, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Capitalization[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index b5de2d52ec4..5dc4c16948f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -67,24 +67,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - declawed: typing.Union[ - Declawed[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - declawed=declawed, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -112,9 +104,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Cat[ typing.Union[ frozendict.frozendict, @@ -129,9 +120,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Cat[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 0bc025ae066..9dc427d50e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -111,30 +111,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - name: typing.Union[ - Name[str], - str - ], - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Category[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - name=name, - id=id, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Category[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 58daa274df5..14b2e2f3595 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -67,24 +67,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - name: typing.Union[ - Name[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - name=name, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -112,9 +104,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ChildCat[ typing.Union[ frozendict.frozendict, @@ -129,9 +120,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ChildCat[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index 70ee3119e76..42dc312a807 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -75,14 +75,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - _class: typing.Union[ - _Class[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ClassModel[ typing.Union[ frozendict.frozendict, @@ -97,10 +91,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - _class=_class, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ClassModel[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index eefe30972ec..14fb70b62cc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -72,24 +72,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - client: typing.Union[ - Client[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Client[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - client=client, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Client[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 9d07aaec1e2..241ed2441d2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -87,24 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - quadrilateralType: typing.Union[ - QuadrilateralType[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - quadrilateralType=quadrilateralType, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -132,9 +124,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComplexQuadrilateral[ typing.Union[ frozendict.frozendict, @@ -149,9 +140,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ComplexQuadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 5fbbf42358b..32242708521 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -57,7 +57,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _9[tuple]: inst = super().__new__( cls, @@ -126,9 +126,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedAnyOfDifferentTypesNoValidations[ typing.Union[ frozendict.frozendict, @@ -143,9 +142,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ComposedAnyOfDifferentTypesNoValidations[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 75ccad31077..06177ddf24b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -53,7 +53,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedArray[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index ca526bdf863..80edc370de9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -37,7 +37,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg_: bool, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedBool[schemas.BoolClass]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index ed12b7c4ff9..716a7bb2ddb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -37,7 +37,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg_: None, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNone[schemas.NoneClass]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index c44b3235d52..bee636d9943 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -37,7 +37,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg_: typing.Union[decimal.Decimal, int, float], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNumber[decimal.Decimal]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index a7991463264..0bf85f09d74 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -36,15 +36,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedObject[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ComposedObject[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index fff27d32095..5fc82c44700 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -27,15 +27,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _4[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _4[frozendict.frozendict], @@ -83,7 +81,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _5[tuple]: inst = super().__new__( cls, @@ -146,9 +144,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedOneOfDifferentTypes[ typing.Union[ frozendict.frozendict, @@ -163,9 +160,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ComposedOneOfDifferentTypes[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index 5126a5ba104..ddada15171f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -37,7 +37,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg_: str, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedString[str]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index b52466cc4bc..c6d1468264f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -97,23 +97,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - className: typing.Union[ - ClassName[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DanishPig[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - className=className, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( DanishPig[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 118fc883978..d6c1b507259 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -67,24 +67,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - breed: typing.Union[ - Breed[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - breed=breed, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -112,9 +104,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Dog[ typing.Union[ frozendict.frozendict, @@ -129,9 +120,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Dog[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 926056c11f1..2408eff2003 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -47,7 +47,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Shapes[tuple]: inst = super().__new__( cls, @@ -156,114 +156,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - mainShape: typing.Union[ - shape.Shape[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - shapeOrNull: typing.Union[ - shape_or_null.ShapeOrNull[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - nullableShape: typing.Union[ - nullable_shape.NullableShape[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - shapes: typing.Union[ - Shapes[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - fruit.Fruit[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Drawing[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - mainShape=mainShape, - shapeOrNull=shapeOrNull, - nullableShape=nullableShape, - shapes=shapes, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Drawing[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 95f42a9463a..8d3d3c61d0f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -82,7 +82,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayEnum[tuple]: inst = super().__new__( cls, @@ -170,31 +170,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - just_symbol: typing.Union[ - JustSymbol[str], - schemas.Unset, - str - ] = schemas.unset, - array_enum: typing.Union[ - ArrayEnum[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumArrays[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - just_symbol=just_symbol, - array_enum=array_enum, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( EnumArrays[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 6a41b7067fd..17f0e3fe49f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -221,81 +221,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - enum_string_required: typing.Union[ - EnumStringRequired[str], - str - ], - enum_string: typing.Union[ - EnumString[str], - schemas.Unset, - str - ] = schemas.unset, - enum_integer: typing.Union[ - EnumInteger[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - enum_number: typing.Union[ - EnumNumber[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - stringEnum: typing.Union[ - string_enum.StringEnum[typing.Union[ - schemas.NoneClass, - str - ]], - schemas.Unset, - None, - str - ] = schemas.unset, - IntegerEnum: typing.Union[ - integer_enum.IntegerEnum[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - StringEnumWithDefaultValue: typing.Union[ - string_enum_with_default_value.StringEnumWithDefaultValue[str], - schemas.Unset, - str - ] = schemas.unset, - IntegerEnumWithDefaultValue: typing.Union[ - integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - IntegerEnumOneValue: typing.Union[ - integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumTest[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - enum_string_required=enum_string_required, - enum_string=enum_string, - enum_integer=enum_integer, - enum_number=enum_number, - stringEnum=stringEnum, - IntegerEnum=IntegerEnum, - StringEnumWithDefaultValue=StringEnumWithDefaultValue, - IntegerEnumWithDefaultValue=IntegerEnumWithDefaultValue, - IntegerEnumOneValue=IntegerEnumOneValue, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( EnumTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 090998e3ffa..ac4603c11c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -87,24 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - triangleType: typing.Union[ - TriangleType[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - triangleType=triangleType, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -132,9 +124,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EquilateralTriangle[ typing.Union[ frozendict.frozendict, @@ -149,9 +140,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( EquilateralTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index d1310666947..a30b3d6565f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -74,24 +74,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - sourceURI: typing.Union[ - SourceURI[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> File[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - sourceURI=sourceURI, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( File[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 34dd0dffc93..ca8f7f6b99a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -31,7 +31,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Files[tuple]: inst = super().__new__( cls, @@ -95,32 +95,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - file: typing.Union[ - file.File[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - files: typing.Union[ - Files[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FileSchemaTestClass[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - file=file, - files=files, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( FileSchemaTestClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index 7ef02cbe6c9..f4384bf8977 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -54,24 +54,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - bar: typing.Union[ - bar.Bar[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Foo[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - bar=bar, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Foo[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index c8acf9283cf..e41b535f276 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -114,7 +114,7 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayWithUniqueItems[tuple]: inst = super().__new__( cls, @@ -508,153 +508,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - byte: typing.Union[ - Byte[str], - str - ], - date: typing.Union[ - Date[str], - str, - datetime.date - ], - number: typing.Union[ - Number[decimal.Decimal], - decimal.Decimal, - int, - float - ], - password: typing.Union[ - Password[str], - str - ], - integer: typing.Union[ - Integer[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - int32: typing.Union[ - Int32[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - int32withValidations: typing.Union[ - Int32withValidations[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - int64: typing.Union[ - Int64[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - float32: typing.Union[ - Float32[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - double: typing.Union[ - Double[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - float64: typing.Union[ - Float64[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - arrayWithUniqueItems: typing.Union[ - ArrayWithUniqueItems[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - string: typing.Union[ - String[str], - schemas.Unset, - str - ] = schemas.unset, - binary: typing.Union[ - Binary[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - dateTime: typing.Union[ - DateTime[str], - schemas.Unset, - str, - datetime.datetime - ] = schemas.unset, - uuid: typing.Union[ - Uuid[str], - schemas.Unset, - str, - uuid.UUID - ] = schemas.unset, - uuidNoExample: typing.Union[ - UuidNoExample[str], - schemas.Unset, - str, - uuid.UUID - ] = schemas.unset, - pattern_with_digits: typing.Union[ - PatternWithDigits[str], - schemas.Unset, - str - ] = schemas.unset, - pattern_with_digits_and_delimiter: typing.Union[ - PatternWithDigitsAndDelimiter[str], - schemas.Unset, - str - ] = schemas.unset, - noneProp: typing.Union[ - NoneProp[schemas.NoneClass], - schemas.Unset, - None - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FormatTest[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - byte=byte, - date=date, - number=number, - password=password, - integer=integer, - int32=int32, - int32withValidations=int32withValidations, - int64=int64, - float32=float32, - double=double, - float64=float64, - arrayWithUniqueItems=arrayWithUniqueItems, - string=string, - binary=binary, - dateTime=dateTime, - uuid=uuid, - uuidNoExample=uuidNoExample, - pattern_with_digits=pattern_with_digits, - pattern_with_digits_and_delimiter=pattern_with_digits_and_delimiter, - noneProp=noneProp, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( FormatTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 3b6b690a606..102bf1378b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -84,31 +84,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - data: typing.Union[ - Data[str], - schemas.Unset, - str - ] = schemas.unset, - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FromSchema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - data=data, - id=id, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( FromSchema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 8bac6498d38..fcc0cbafbce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -74,14 +74,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - color: typing.Union[ - Color[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Fruit[ typing.Union[ frozendict.frozendict, @@ -96,10 +90,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - color=color, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Fruit[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 49f1d316c86..37abb7ef3aa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -31,9 +31,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FruitReq[ typing.Union[ frozendict.frozendict, @@ -48,9 +47,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( FruitReq[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index f705ecf8542..2c405285e75 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -74,14 +74,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - color: typing.Union[ - Color[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GmFruit[ typing.Union[ frozendict.frozendict, @@ -96,10 +90,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - color=color, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( GmFruit[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index de5716e4c18..33f9700ec2f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -85,23 +85,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - pet_type: typing.Union[ - PetType[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GrandparentAnimal[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - pet_type=pet_type, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( GrandparentAnimal[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index 5e990dda0c5..aae15ab6ece 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -83,30 +83,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - bar: typing.Union[ - Bar[str], - schemas.Unset, - str - ] = schemas.unset, - foo: typing.Union[ - Foo[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HasOnlyReadOnly[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - bar=bar, - foo=foo, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( HasOnlyReadOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 9c8c0453cce..299480746bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -34,7 +34,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableMessage[ typing.Union[ schemas.NoneClass, @@ -127,28 +127,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - NullableMessage: typing.Union[ - NullableMessage[typing.Union[ - schemas.NoneClass, - str - ]], - schemas.Unset, - None, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HealthCheckResult[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - NullableMessage=NullableMessage, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( HealthCheckResult[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 80b688b05e5..ead90e6897c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -87,24 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - triangleType: typing.Union[ - TriangleType[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - triangleType=triangleType, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -132,9 +124,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> IsoscelesTriangle[ typing.Union[ frozendict.frozendict, @@ -149,9 +140,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( IsoscelesTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index acc467fda71..c173929681a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -39,7 +39,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index a730a044e0f..916f26c158b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -25,9 +25,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[ typing.Union[ frozendict.frozendict, @@ -42,9 +41,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Items[ @@ -105,7 +103,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequest[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index d7a7cb48747..6caed820196 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -161,47 +161,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - op: typing.Union[ - Op[str], - str - ], - path: typing.Union[ - Path[str], - str - ], - value: typing.Union[ - Value[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestAddReplaceTest[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - op=op, - path=path, - value=value, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 7c8ed47f54a..89cbdbea468 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -117,25 +117,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - op: typing.Union[ - Op[str], - str - ], - path: typing.Union[ - Path[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestMoveCopy[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - op=op, - path=path, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index da0821efb8a..ea09eca4fca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -101,25 +101,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - op: typing.Union[ - Op[str], - str - ], - path: typing.Union[ - Path[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestRemove[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - op=op, - path=path, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 5a9cae8d3c1..398d796b5dd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -39,9 +39,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Mammal[ typing.Union[ frozendict.frozendict, @@ -56,9 +55,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Mammal[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 745383b40ea..6a10d2ac4f2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -29,24 +29,19 @@ def __getitem__(self, name: str) -> AdditionalProperties2[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties2[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties2[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties[frozendict.frozendict], @@ -72,7 +67,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[frozendict.frozendict], @@ -80,18 +75,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[frozendict.frozendict], - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapMapOfString[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapMapOfString[frozendict.frozendict], @@ -143,24 +132,19 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties3[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties3[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfEnumString[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapOfEnumString[frozendict.frozendict], @@ -187,24 +171,19 @@ def __getitem__(self, name: str) -> AdditionalProperties4[schemas.BoolClass]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties4[schemas.BoolClass], bool ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties4[schemas.BoolClass], - bool - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DirectMap[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( DirectMap[frozendict.frozendict], @@ -268,46 +247,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - map_map_of_string: typing.Union[ - MapMapOfString[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - map_of_enum_string: typing.Union[ - MapOfEnumString[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - direct_map: typing.Union[ - DirectMap[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - indirect_map: typing.Union[ - string_boolean_map.StringBooleanMap[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapTest[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - map_map_of_string=map_map_of_string, - map_of_enum_string=map_of_enum_string, - direct_map=direct_map, - indirect_map=indirect_map, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MapTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 3ad561a59db..e543982a262 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -30,7 +30,7 @@ def __getitem__(self, name: str) -> animal.Animal[frozendict.frozendict]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[ @@ -54,18 +54,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - animal.Animal[frozendict.frozendict], - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Map[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Map[frozendict.frozendict], @@ -157,39 +151,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - uuid: typing.Union[ - Uuid[str], - schemas.Unset, - str, - uuid.UUID - ] = schemas.unset, - dateTime: typing.Union[ - DateTime[str], - schemas.Unset, - str, - datetime.datetime - ] = schemas.unset, - map: typing.Union[ - Map[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - uuid=uuid, - dateTime=dateTime, - map=map, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index ca774cd0731..a725e1f60d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -71,28 +71,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - amount: typing.Union[ - Amount[str], - str - ], - currency: typing.Union[ - currency.Currency[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Money[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - amount=amount, - currency=currency, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Money[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index d36b70e06b9..eeacf66180d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -114,15 +114,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - snake_case: typing.Union[ - SnakeCase[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Name[ typing.Union[ frozendict.frozendict, @@ -137,10 +130,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - snake_case=snake_case, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Name[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 6f9af4564e8..fc797873802 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -89,28 +89,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - id: typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - petId: typing.Union[ - PetId[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NoAdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - id=id, - petId=petId, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index f4c416e1b3b..517a7d73f0b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -30,13 +30,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties4[ typing.Union[ schemas.NoneClass, @@ -45,9 +44,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties4[ @@ -86,7 +84,7 @@ def __new__( decimal.Decimal, int ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> IntegerProp[ typing.Union[ schemas.NoneClass, @@ -135,7 +133,7 @@ def __new__( int, float ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NumberProp[ typing.Union[ schemas.NoneClass, @@ -182,7 +180,7 @@ def __new__( None, bool ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BooleanProp[ typing.Union[ schemas.NoneClass, @@ -229,7 +227,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringProp[ typing.Union[ schemas.NoneClass, @@ -279,7 +277,7 @@ def __new__( str, datetime.date ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateProp[ typing.Union[ schemas.NoneClass, @@ -329,7 +327,7 @@ def __new__( str, datetime.datetime ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DatetimeProp[ typing.Union[ schemas.NoneClass, @@ -379,7 +377,7 @@ def __new__( list, tuple ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayNullableProp[ typing.Union[ schemas.NoneClass, @@ -422,13 +420,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[ typing.Union[ schemas.NoneClass, @@ -437,9 +434,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Items2[ @@ -478,7 +474,7 @@ def __new__( list, tuple ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayAndItemsNullableProp[ typing.Union[ schemas.NoneClass, @@ -521,13 +517,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items3[ typing.Union[ schemas.NoneClass, @@ -536,9 +531,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Items3[ @@ -576,7 +570,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayItemsNullable[tuple]: inst = super().__new__( cls, @@ -621,17 +615,12 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[frozendict.frozendict], - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectNullableProp[ typing.Union[ schemas.NoneClass, @@ -640,9 +629,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectNullableProp[ @@ -675,13 +663,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ typing.Union[ schemas.NoneClass, @@ -690,9 +677,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties2[ @@ -733,21 +719,12 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - *args_: typing.Union[ - None, - dict, - frozendict.frozendict - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties2[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], + arg_: typing.Union[ None, dict, frozendict.frozendict ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectAndItemsNullableProp[ typing.Union[ schemas.NoneClass, @@ -756,9 +733,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectAndItemsNullableProp[ @@ -791,13 +767,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ typing.Union[ schemas.NoneClass, @@ -806,9 +781,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AdditionalProperties3[ @@ -842,7 +816,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties3[typing.Union[ @@ -854,22 +828,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties3[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectItemsNullable[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectItemsNullable[frozendict.frozendict], @@ -1124,149 +1088,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - integer_prop: typing.Union[ - IntegerProp[typing.Union[ - schemas.NoneClass, - decimal.Decimal - ]], - schemas.Unset, - None, - decimal.Decimal, - int - ] = schemas.unset, - number_prop: typing.Union[ - NumberProp[typing.Union[ - schemas.NoneClass, - decimal.Decimal - ]], - schemas.Unset, - None, - decimal.Decimal, - int, - float - ] = schemas.unset, - boolean_prop: typing.Union[ - BooleanProp[typing.Union[ - schemas.NoneClass, - schemas.BoolClass - ]], - schemas.Unset, - None, - bool - ] = schemas.unset, - string_prop: typing.Union[ - StringProp[typing.Union[ - schemas.NoneClass, - str - ]], - schemas.Unset, - None, - str - ] = schemas.unset, - date_prop: typing.Union[ - DateProp[typing.Union[ - schemas.NoneClass, - str - ]], - schemas.Unset, - None, - str, - datetime.date - ] = schemas.unset, - datetime_prop: typing.Union[ - DatetimeProp[typing.Union[ - schemas.NoneClass, - str - ]], - schemas.Unset, - None, - str, - datetime.datetime - ] = schemas.unset, - array_nullable_prop: typing.Union[ - ArrayNullableProp[typing.Union[ - schemas.NoneClass, - tuple - ]], - schemas.Unset, - None, - list, - tuple - ] = schemas.unset, - array_and_items_nullable_prop: typing.Union[ - ArrayAndItemsNullableProp[typing.Union[ - schemas.NoneClass, - tuple - ]], - schemas.Unset, - None, - list, - tuple - ] = schemas.unset, - array_items_nullable: typing.Union[ - ArrayItemsNullable[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - object_nullable_prop: typing.Union[ - ObjectNullableProp[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - schemas.Unset, - None, - dict, - frozendict.frozendict - ] = schemas.unset, - object_and_items_nullable_prop: typing.Union[ - ObjectAndItemsNullableProp[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - schemas.Unset, - None, - dict, - frozendict.frozendict - ] = schemas.unset, - object_items_nullable: typing.Union[ - ObjectItemsNullable[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties4[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableClass[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - integer_prop=integer_prop, - number_prop=number_prop, - boolean_prop=boolean_prop, - string_prop=string_prop, - date_prop=date_prop, - datetime_prop=datetime_prop, - array_nullable_prop=array_nullable_prop, - array_and_items_nullable_prop=array_and_items_nullable_prop, - array_items_nullable=array_items_nullable, - object_nullable_prop=object_nullable_prop, - object_and_items_nullable_prop=object_and_items_nullable_prop, - object_items_nullable=object_items_nullable, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( NullableClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 865f9fce8af..7bc3f52e136 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -33,9 +33,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableShape[ typing.Union[ frozendict.frozendict, @@ -50,9 +49,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( NullableShape[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index 370bd0d2e5f..24112af86f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -39,7 +39,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableString[ typing.Union[ schemas.NoneClass, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 4e250b140fe..2dd5a55ef73 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -74,26 +74,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - JustNumber: typing.Union[ - JustNumber[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - JustNumber=JustNumber, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( NumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 8a4a5c6c4cf..a499aaefb03 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -81,23 +81,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - a: typing.Union[ - A[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - a=a, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjWithRequiredProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 13784fe08c4..3d895136da6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -77,23 +77,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - b: typing.Union[ - B[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredPropsBase[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - b=b, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjWithRequiredPropsBase[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 19a6a83a4d0..409a12170b6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -92,28 +92,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - arg: typing.Union[ - Arg[str], - str - ], - args: typing.Union[ - Args[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithArgAndArgsProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - arg=arg, - args=args, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectModelWithArgAndArgsProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index d7ac1d9d00e..559dc419dbb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -64,38 +64,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - myNumber: typing.Union[ - number_with_validations.NumberWithValidations[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - myString: typing.Union[ - string.String[str], - schemas.Unset, - str - ] = schemas.unset, - myBoolean: typing.Union[ - boolean.Boolean[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithRefProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - myNumber=myNumber, - myString=myString, - myBoolean=myBoolean, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectModelWithRefProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 9e45da796c0..b0fa9578bdb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -133,53 +133,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - test: typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - name: typing.Union[ - Name[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - test=test, - name=name, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -207,9 +170,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ typing.Union[ frozendict.frozendict, @@ -224,9 +186,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index d8edf26658d..5f8815fe5b8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -87,32 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - someProp: typing.Union[ - SomeProp[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - someprop: typing.Union[ - Someprop[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithCollidingProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - someProp=someProp, - someprop=someprop, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithCollidingProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 998b06a4c7a..c3a675b3b88 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -63,37 +63,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - length: typing.Union[ - decimal_payload.DecimalPayload[str], - schemas.Unset, - str - ] = schemas.unset, - width: typing.Union[ - Width[str], - schemas.Unset, - str - ] = schemas.unset, - cost: typing.Union[ - money.Money[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDecimalProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - length=length, - width=width, - cost=cost, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithDecimalProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 336dbd304ef..b7d308fa5a7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -109,18 +109,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithDifficultlyNamedProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index e7b4f6e69ee..5cbdd06199d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SomeProp[ @@ -166,41 +164,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - someProp: typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInlineCompositionProperty[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - someProp=someProp, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithInlineCompositionProperty[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 9f11be74bd6..0d2018eba08 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -62,18 +62,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithInvalidNamedRefedProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 6cf05e01454..18e797a22f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -72,24 +72,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - test: typing.Union[ - Test[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithOptionalTestProp[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - test=test, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithOptionalTestProp[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 01c8ea8d2d4..96c73b2795e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -29,15 +29,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithValidations[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithValidations[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 9bfcc2d17ce..0825b4f8cbd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -173,58 +173,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - petId: typing.Union[ - PetId[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - quantity: typing.Union[ - Quantity[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - shipDate: typing.Union[ - ShipDate[str], - schemas.Unset, - str, - datetime.datetime - ] = schemas.unset, - status: typing.Union[ - Status[str], - schemas.Unset, - str - ] = schemas.unset, - complete: typing.Union[ - Complete[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Order[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - id=id, - petId=petId, - quantity=quantity, - shipDate=shipDate, - status=status, - complete=complete, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Order[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index e5a6d3cdd58..c62530ee4e9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -39,15 +39,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ParentPet[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ParentPet[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index f071f4a4082..8f732a8cfce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -33,7 +33,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PhotoUrls[tuple]: inst = super().__new__( cls, @@ -70,7 +70,7 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Tags[tuple]: inst = super().__new__( cls, @@ -209,56 +209,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - name: typing.Union[ - Name[str], - str - ], - photoUrls: typing.Union[ - PhotoUrls[tuple], - list, - tuple - ], - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - category: typing.Union[ - category.Category[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - tags: typing.Union[ - Tags[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - status: typing.Union[ - Status[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pet[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - name=name, - photoUrls=photoUrls, - id=id, - category=category, - tags=tags, - status=status, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Pet[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index 1c77e72ea3f..48ca691cb40 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -38,9 +38,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pig[ typing.Union[ frozendict.frozendict, @@ -55,9 +54,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Pig[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 483c3c6c87a..55562ab21cc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -61,31 +61,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - name: typing.Union[ - Name[str], - schemas.Unset, - str - ] = schemas.unset, - enemyPlayer: typing.Union[ - Player[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Player[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - name=name, - enemyPlayer=enemyPlayer, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Player[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 33e3f1d721b..00cf4dd2209 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -38,9 +38,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Quadrilateral[ typing.Union[ frozendict.frozendict, @@ -55,9 +54,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Quadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index b30f05924d7..2153a7e126d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -113,9 +113,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> QuadrilateralInterface[ typing.Union[ frozendict.frozendict, @@ -130,9 +129,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( QuadrilateralInterface[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index d0d1cfbc2af..226c71f6765 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -83,30 +83,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - bar: typing.Union[ - Bar[str], - schemas.Unset, - str - ] = schemas.unset, - baz: typing.Union[ - Baz[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReadOnlyFirst[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - bar=bar, - baz=baz, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ReadOnlyFirst[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 19358169fc5..8d3b2005c84 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -71,26 +71,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - validName: typing.Union[ - AdditionalProperties[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromExplicitAddProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - validName=validName, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ReqPropsFromExplicitAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 8feae5a5585..a626f205196 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -141,60 +141,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - validName: typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromTrueAddProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - validName=validName, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ReqPropsFromTrueAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index 437187f586d..a61f8db390b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -153,47 +153,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - validName: typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromUnsetAddProps[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - validName=validName, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ReqPropsFromUnsetAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index fe4339ec962..afb1c4d2cea 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -87,24 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - triangleType: typing.Union[ - TriangleType[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - triangleType=triangleType, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -132,9 +124,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ScaleneTriangle[ typing.Union[ frozendict.frozendict, @@ -149,9 +140,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ScaleneTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index be5b6e91561..9373e77a05d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -36,7 +36,7 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SelfReferencingArrayModel[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index bc969af19a6..7c935ebe2cc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -46,29 +46,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - selfRef: typing.Union[ - SelfReferencingObjectModel[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - SelfReferencingObjectModel[frozendict.frozendict], - dict, - frozendict.frozendict - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SelfReferencingObjectModel[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - selfRef=selfRef, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SelfReferencingObjectModel[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index ff8adaf7bb7..b20b0bef294 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -38,9 +38,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Shape[ typing.Union[ frozendict.frozendict, @@ -55,9 +54,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Shape[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 164e0ae905c..6fd7927d42e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ShapeOrNull[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ShapeOrNull[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index acf4bb59d18..a5e761aada6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -87,24 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - quadrilateralType: typing.Union[ - QuadrilateralType[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - quadrilateralType=quadrilateralType, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( _1[frozendict.frozendict], @@ -132,9 +124,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SimpleQuadrilateral[ typing.Union[ frozendict.frozendict, @@ -149,9 +140,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SimpleQuadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index 1f228a96ed0..cf8f767c634 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -30,9 +30,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeObject[ typing.Union[ frozendict.frozendict, @@ -47,9 +46,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SomeObject[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index ac4d15544c5..1f44fb651f6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -74,24 +74,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - a: typing.Union[ - A[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SpecialModelName[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - a=a, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SpecialModelName[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index de103caf205..43703f2e993 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -34,24 +34,19 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[schemas.BoolClass], bool ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[schemas.BoolClass], - bool - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringBooleanMap[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( StringBooleanMap[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index b8150de644e..2aa895efdec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -78,7 +78,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringEnum[ typing.Union[ schemas.NoneClass, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 9a97bce59c7..4d062618035 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -84,31 +84,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - name: typing.Union[ - Name[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Tag[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - id=id, - name=name, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Tag[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index 5c6322016a0..3673f084a5a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -39,9 +39,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Triangle[ typing.Union[ frozendict.frozendict, @@ -56,9 +55,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Triangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index d957b810be9..fd43ff3af34 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -113,9 +113,8 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> TriangleInterface[ typing.Union[ frozendict.frozendict, @@ -130,9 +129,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( TriangleInterface[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 4391451c461..d4382e414a9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -39,13 +39,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg_: typing.Union[ None, dict, frozendict.frozendict ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithNoDeclaredPropsNullable[ typing.Union[ schemas.NoneClass, @@ -54,9 +53,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( ObjectWithNoDeclaredPropsNullable[ @@ -86,9 +84,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeExceptNullProp[ typing.Union[ frozendict.frozendict, @@ -103,9 +100,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( AnyTypeExceptNullProp[ @@ -395,155 +391,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - id: typing.Union[ - Id[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - username: typing.Union[ - Username[str], - schemas.Unset, - str - ] = schemas.unset, - firstName: typing.Union[ - FirstName[str], - schemas.Unset, - str - ] = schemas.unset, - lastName: typing.Union[ - LastName[str], - schemas.Unset, - str - ] = schemas.unset, - email: typing.Union[ - Email[str], - schemas.Unset, - str - ] = schemas.unset, - password: typing.Union[ - Password[str], - schemas.Unset, - str - ] = schemas.unset, - phone: typing.Union[ - Phone[str], - schemas.Unset, - str - ] = schemas.unset, - userStatus: typing.Union[ - UserStatus[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - objectWithNoDeclaredProps: typing.Union[ - ObjectWithNoDeclaredProps[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - objectWithNoDeclaredPropsNullable: typing.Union[ - ObjectWithNoDeclaredPropsNullable[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - schemas.Unset, - None, - dict, - frozendict.frozendict - ] = schemas.unset, - anyTypeProp: typing.Union[ - AnyTypeProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - anyTypeExceptNullProp: typing.Union[ - AnyTypeExceptNullProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - anyTypePropNullable: typing.Union[ - AnyTypePropNullable[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> User[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - id=id, - username=username, - firstName=firstName, - lastName=lastName, - email=email, - password=password, - phone=phone, - userStatus=userStatus, - objectWithNoDeclaredProps=objectWithNoDeclaredProps, - objectWithNoDeclaredPropsNullable=objectWithNoDeclaredPropsNullable, - anyTypeProp=anyTypeProp, - anyTypeExceptNullProp=anyTypeExceptNullProp, - anyTypePropNullable=anyTypePropNullable, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( User[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 6fc0646249d..9060f293df5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -129,35 +129,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - className: typing.Union[ - ClassName[str], - str - ], - hasBaleen: typing.Union[ - HasBaleen[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - hasTeeth: typing.Union[ - HasTeeth[schemas.BoolClass], - schemas.Unset, - bool - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Whale[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - className=className, - hasBaleen=hasBaleen, - hasTeeth=hasTeeth, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Whale[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index b7c9e2c6795..1b7efc2a242 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -150,49 +150,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - className: typing.Union[ - ClassName[str], - str - ], - type: typing.Union[ - Type[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Zebra[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - className=className, - type=type, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Zebra[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 0eba2856e64..8017187a20e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -57,7 +57,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 0eba2856e64..8017187a20e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -57,7 +57,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 33c3785ddac..833866833c7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -57,7 +57,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumFormStringArray[tuple]: inst = super().__new__( cls, @@ -172,31 +172,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - enum_form_string_array: typing.Union[ - EnumFormStringArray[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - enum_form_string: typing.Union[ - EnumFormString[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - enum_form_string_array=enum_form_string_array, - enum_form_string=enum_form_string, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index f50f7abd13b..41af2361578 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -373,103 +373,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - byte: typing.Union[ - Byte[str], - str - ], - double: typing.Union[ - Double[decimal.Decimal], - decimal.Decimal, - int, - float - ], - number: typing.Union[ - Number[decimal.Decimal], - decimal.Decimal, - int, - float - ], - pattern_without_delimiter: typing.Union[ - PatternWithoutDelimiter[str], - str - ], - integer: typing.Union[ - Integer[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - int32: typing.Union[ - Int32[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - int64: typing.Union[ - Int64[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - string: typing.Union[ - String[str], - schemas.Unset, - str - ] = schemas.unset, - binary: typing.Union[ - Binary[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - date: typing.Union[ - Date[str], - schemas.Unset, - str, - datetime.date - ] = schemas.unset, - dateTime: typing.Union[ - DateTime[str], - schemas.Unset, - str, - datetime.datetime - ] = schemas.unset, - password: typing.Union[ - Password[str], - schemas.Unset, - str - ] = schemas.unset, - callback: typing.Union[ - Callback[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - byte=byte, - double=double, - number=number, - pattern_without_delimiter=pattern_without_delimiter, - integer=integer, - int32=int32, - int64=int64, - string=string, - binary=binary, - date=date, - dateTime=dateTime, - password=password, - callback=callback, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 9617c9445d5..64db42e7c28 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -29,24 +29,19 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - *arg_: typing.Mapping[ + arg_: typing.Mapping[ str, typing.Union[ AdditionalProperties[str], str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[str], - str - ], + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index 04e7339aa92..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 7acce415858..f6ab3f7395b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SomeProp[ @@ -161,41 +159,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - someProp: typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - someProp=someProp, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index 04e7339aa92..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 7acce415858..f6ab3f7395b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SomeProp[ @@ -161,41 +159,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - someProp: typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - someProp=someProp, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index 04e7339aa92..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 7acce415858..f6ab3f7395b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -41,9 +41,8 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -58,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( SomeProp[ @@ -161,41 +159,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - someProp: typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - someProp=someProp, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 02de9fa101e..c003be89660 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -87,28 +87,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - param: typing.Union[ - Param[str], - str - ], - param2: typing.Union[ - Param2[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - param=param, - param2=param2, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 7f8787e0a96..5dcb2ee8bc3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -67,24 +67,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - keyword: typing.Union[ - Keyword[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - keyword=keyword, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 56a65785d01..e322af0a0bf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -95,31 +95,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - requiredFile: typing.Union[ - RequiredFile[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - additionalMetadata: typing.Union[ - AdditionalMetadata[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - requiredFile=requiredFile, - additionalMetadata=additionalMetadata, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 2b759b1aa41..f99aaa06959 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -95,31 +95,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - file: typing.Union[ - File[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - additionalMetadata: typing.Union[ - AdditionalMetadata[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - file=file, - additionalMetadata=additionalMetadata, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 78982663899..3d1959c692d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -33,7 +33,7 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Files[tuple]: inst = super().__new__( cls, @@ -106,25 +106,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - files: typing.Union[ - Files[tuple], - schemas.Unset, - list, - tuple - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - files=files, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index d4699ee0962..aa7e2058147 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -49,25 +49,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - string: typing.Union[ - foo.Foo[frozendict.frozendict], - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - string=string, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index 5268ee2f047..7fb1eb04fe7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -83,20 +83,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - version: typing.Union[ - Version[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - version=version, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index 6c9f7ff2be4..d0b062b4b28 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -62,7 +62,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index 5268ee2f047..7fb1eb04fe7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -83,20 +83,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - version: typing.Union[ - Version[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - version=version, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index de25475a43d..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -31,7 +31,7 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 67db65baf86..1d9c8868431 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -78,30 +78,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - name: typing.Union[ - Name[str], - schemas.Unset, - str - ] = schemas.unset, - status: typing.Union[ - Status[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - name=name, - status=status, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index c95ebd4a499..45c39acfd2b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -80,32 +80,16 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - additionalMetadata: typing.Union[ - AdditionalMetadata[str], - schemas.Unset, - str - ] = schemas.unset, - file: typing.Union[ - File[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - additionalMetadata=additionalMetadata, - file=file, + arg_, configuration_=configuration_, - **kwargs, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 0a06499307c..3985d573091 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -129,25 +129,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - port: typing.Union[ - Port[str], - str - ], - server: typing.Union[ - Server[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - port=port, - server=server, + arg_, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 39e41e7bae9..e2e261606b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -83,20 +83,15 @@ def __getitem__( def __new__( cls, - *arg_: typing.Union[ + arg_: typing.Union[ DictInput, typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], ], - version: typing.Union[ - Version[str], - str - ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - version=version, + arg_, configuration_=configuration_, ) inst = typing.cast( From c2291160b5f08a4c2cf028b23ba4b11e38a83656 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 8 Jun 2023 14:31:13 -0700 Subject: [PATCH 09/36] Removes unsets from optional properties, allows self in when optionalandreqproperties exist --- .../python/components/schemas/_helper_new.hbs | 2 +- .../_helper_optional_properties_type.hbs | 4 ++-- .../components/schema/_200_response.py | 2 -- .../petstore_api/components/schema/_return.py | 1 - .../schema/abstract_step_message.py | 2 +- .../schema/additional_properties_class.py | 10 +--------- .../petstore_api/components/schema/animal.py | 3 +-- .../components/schema/any_type_and_format.py | 11 +---------- .../components/schema/api_response.py | 5 +---- .../petstore_api/components/schema/apple.py | 1 - .../components/schema/apple_req.py | 3 +-- .../schema/array_of_array_of_number_only.py | 3 +-- .../components/schema/array_of_number_only.py | 3 +-- .../components/schema/array_test.py | 5 +---- .../petstore_api/components/schema/banana.py | 2 +- .../components/schema/banana_req.py | 3 +-- .../components/schema/basque_pig.py | 2 +- .../components/schema/capitalization.py | 8 +------- .../src/petstore_api/components/schema/cat.py | 3 +-- .../components/schema/category.py | 3 +-- .../components/schema/child_cat.py | 3 +-- .../components/schema/class_model.py | 1 - .../petstore_api/components/schema/client.py | 3 +-- .../schema/complex_quadrilateral.py | 3 +-- .../components/schema/danish_pig.py | 2 +- .../src/petstore_api/components/schema/dog.py | 3 +-- .../petstore_api/components/schema/drawing.py | 6 +----- .../components/schema/enum_arrays.py | 4 +--- .../components/schema/enum_test.py | 10 +--------- .../components/schema/equilateral_triangle.py | 3 +-- .../petstore_api/components/schema/file.py | 3 +-- .../schema/file_schema_test_class.py | 4 +--- .../src/petstore_api/components/schema/foo.py | 3 +-- .../components/schema/format_test.py | 19 +------------------ .../components/schema/from_schema.py | 4 +--- .../petstore_api/components/schema/fruit.py | 1 - .../components/schema/gm_fruit.py | 1 - .../components/schema/grandparent_animal.py | 2 +- .../components/schema/has_only_read_only.py | 4 +--- .../components/schema/health_check_result.py | 3 +-- .../components/schema/isosceles_triangle.py | 3 +-- .../json_patch_request_add_replace_test.py | 2 +- .../schema/json_patch_request_move_copy.py | 2 +- .../schema/json_patch_request_remove.py | 2 +- .../components/schema/map_test.py | 6 +----- ...perties_and_additional_properties_class.py | 5 +---- .../petstore_api/components/schema/money.py | 2 +- .../petstore_api/components/schema/name.py | 2 -- .../schema/no_additional_properties.py | 3 +-- .../components/schema/nullable_class.py | 14 +------------- .../components/schema/number_only.py | 3 +-- .../schema/obj_with_required_props.py | 2 +- .../schema/obj_with_required_props_base.py | 2 +- ...ject_model_with_arg_and_args_properties.py | 2 +- .../schema/object_model_with_ref_props.py | 5 +---- ..._with_req_test_prop_from_unset_add_prop.py | 3 +-- .../object_with_colliding_properties.py | 4 +--- .../schema/object_with_decimal_properties.py | 5 +---- .../object_with_difficultly_named_props.py | 4 +--- ...object_with_inline_composition_property.py | 3 +-- ...ect_with_invalid_named_refed_properties.py | 2 +- .../schema/object_with_optional_test_prop.py | 3 +-- .../petstore_api/components/schema/order.py | 8 +------- .../src/petstore_api/components/schema/pet.py | 6 +----- .../petstore_api/components/schema/player.py | 4 +--- .../components/schema/read_only_first.py | 4 +--- .../req_props_from_explicit_add_props.py | 2 +- .../schema/req_props_from_true_add_props.py | 2 +- .../schema/req_props_from_unset_add_props.py | 2 +- .../components/schema/scalene_triangle.py | 3 +-- .../schema/self_referencing_object_model.py | 3 +-- .../components/schema/simple_quadrilateral.py | 3 +-- .../components/schema/special_model_name.py | 3 +-- .../src/petstore_api/components/schema/tag.py | 4 +--- .../petstore_api/components/schema/user.py | 15 +-------------- .../petstore_api/components/schema/whale.py | 4 +--- .../petstore_api/components/schema/zebra.py | 3 +-- .../schema.py | 4 +--- .../schema.py | 12 +----------- .../post/parameters/parameter_1/schema.py | 3 +-- .../content/multipart_form_data/schema.py | 3 +-- .../content/multipart_form_data/schema.py | 3 +-- .../schema.py | 2 +- .../get/parameters/parameter_0/schema.py | 3 +-- .../content/multipart_form_data/schema.py | 3 +-- .../content/multipart_form_data/schema.py | 3 +-- .../content/multipart_form_data/schema.py | 3 +-- .../content/application_json/schema.py | 3 +-- .../paths/foo/get/servers/server_1.py | 2 +- .../pet_find_by_status/servers/server_1.py | 2 +- .../schema.py | 4 +--- .../content/multipart_form_data/schema.py | 4 +--- .../src/petstore_api/servers/server_0.py | 2 +- .../src/petstore_api/servers/server_1.py | 2 +- 94 files changed, 88 insertions(+), 273 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 9a9cadf1fe4..01e4686c649 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -21,7 +21,7 @@ def __new__( {{#if requiredAndOptionalProperties}} arg_: typing.Union[ {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + {{jsonPathPiece.camelCase}}[frozendict.frozendict], ], {{else}} {{#if additionalProperties}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs index aa103a417d8..84a147dacc1 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs @@ -5,11 +5,11 @@ {{#with this}} {{#if refInfo.refClass}} "{{{@key.original}}}": typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=true }} + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} ], {{else}} "{{{@key.original}}}": typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=true }} + {{> components/schemas/_helper_new_property_value_type optional=false }} ], {{/if}} {{/with}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 62d2a3bb25c..b595b04d012 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -24,13 +24,11 @@ { "name": typing.Union[ Name[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "class": typing.Union[ _Class[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 6c9b079a925..3a1c3398df9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -22,7 +22,6 @@ { "return": typing.Union[ _Return[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 9728082ae01..8b7510b09a5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -202,7 +202,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + AbstractStepMessage[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AbstractStepMessage[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 29ab9ec4c64..e142bc04552 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -281,13 +281,11 @@ def __new__( { "map_property": typing.Union[ MapProperty[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "map_of_map_property": typing.Union[ MapOfMapProperty[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -295,7 +293,6 @@ def __new__( Anytype1[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -315,31 +312,26 @@ def __new__( ], "map_with_undeclared_properties_anytype_1": typing.Union[ MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "map_with_undeclared_properties_anytype_2": typing.Union[ MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "map_with_undeclared_properties_anytype_3": typing.Union[ MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "empty_map": typing.Union[ EmptyMap[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "map_with_undeclared_properties_string": typing.Union[ MapWithUndeclaredPropertiesString[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -429,7 +421,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + AdditionalPropertiesClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesClass[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 49cf9c9b1d5..768b84e50d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -45,7 +45,6 @@ class Schema_(metaclass=schemas.SingletonMeta): { "color": typing.Union[ Color[str], - schemas.Unset, str ], }, @@ -120,7 +119,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Animal[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Animal[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 90195c044d1..0e11269dd7a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -494,7 +494,6 @@ def __new__( Uuid[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -516,7 +515,6 @@ def __new__( Date[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -538,7 +536,6 @@ def __new__( DateTime[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -560,7 +557,6 @@ def __new__( Number[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -582,7 +578,6 @@ def __new__( Binary[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -604,7 +599,6 @@ def __new__( Int32[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -626,7 +620,6 @@ def __new__( Int64[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -648,7 +641,6 @@ def __new__( Double[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -670,7 +662,6 @@ def __new__( _Float[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -850,7 +841,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + AnyTypeAndFormat[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeAndFormat[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 3ff3d874762..4fc8082a0c4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -26,18 +26,15 @@ { "code": typing.Union[ Code[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "type": typing.Union[ Type[str], - schemas.Unset, str ], "message": typing.Union[ Message[str], - schemas.Unset, str ], }, @@ -97,7 +94,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ApiResponse[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ApiResponse[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 4d63ff8c9d4..cefd43ca521 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -62,7 +62,6 @@ class Schema_(metaclass=schemas.SingletonMeta): { "origin": typing.Union[ Origin[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index e154dd234bc..a2b5a84a1c4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -34,7 +34,6 @@ { "mealy": typing.Union[ Mealy[schemas.BoolClass], - schemas.Unset, bool ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + AppleReq[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AppleReq[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index a4421fd31f0..dcd7e1f0ada 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -97,7 +97,6 @@ def __getitem__(self, name: int) -> Items[tuple]: { "ArrayArrayNumber": typing.Union[ ArrayArrayNumber[tuple], - schemas.Unset, list, tuple ], @@ -150,7 +149,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ArrayOfArrayOfNumberOnly[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfArrayOfNumberOnly[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index bbb5a1ee0a9..5292481070f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -60,7 +60,6 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: { "ArrayNumber": typing.Union[ ArrayNumber[tuple], - schemas.Unset, list, tuple ], @@ -113,7 +112,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ArrayOfNumberOnly[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfNumberOnly[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index cb4f3a5fa8a..2a6a0742f7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -209,19 +209,16 @@ def __getitem__(self, name: int) -> Items4[tuple]: { "array_of_string": typing.Union[ ArrayOfString[tuple], - schemas.Unset, list, tuple ], "array_array_of_integer": typing.Union[ ArrayArrayOfInteger[tuple], - schemas.Unset, list, tuple ], "array_array_of_model": typing.Union[ ArrayArrayOfModel[tuple], - schemas.Unset, list, tuple ], @@ -282,7 +279,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ArrayTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayTest[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index f1308521f9f..28286a8204d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -81,7 +81,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Banana[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Banana[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 37237f64526..96b4c4be498 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -36,7 +36,6 @@ { "sweet": typing.Union[ Sweet[schemas.BoolClass], - schemas.Unset, bool ], }, @@ -91,7 +90,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + BananaReq[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BananaReq[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index f29664bda97..c04e4acde89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -99,7 +99,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + BasquePig[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BasquePig[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 832ce968dc4..da303a3e8b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -32,32 +32,26 @@ { "smallCamel": typing.Union[ SmallCamel[str], - schemas.Unset, str ], "CapitalCamel": typing.Union[ CapitalCamel[str], - schemas.Unset, str ], "small_Snake": typing.Union[ SmallSnake[str], - schemas.Unset, str ], "Capital_Snake": typing.Union[ CapitalSnake[str], - schemas.Unset, str ], "SCA_ETH_Flow_Points": typing.Union[ SCAETHFlowPoints[str], - schemas.Unset, str ], "ATT_NAME": typing.Union[ ATTNAME[str], - schemas.Unset, str ], }, @@ -129,7 +123,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Capitalization[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Capitalization[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 5dc4c16948f..df120b30cf3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -22,7 +22,6 @@ { "declawed": typing.Union[ Declawed[schemas.BoolClass], - schemas.Unset, bool ], }, @@ -69,7 +68,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 9dc427d50e5..75355d74c4b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -45,7 +45,6 @@ class Schema_(metaclass=schemas.SingletonMeta): { "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], @@ -113,7 +112,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Category[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Category[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 14b2e2f3595..9c1ba2297a8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -22,7 +22,6 @@ { "name": typing.Union[ Name[str], - schemas.Unset, str ], }, @@ -69,7 +68,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index 42dc312a807..8066c67522f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -22,7 +22,6 @@ { "_class": typing.Union[ _Class[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 14fb70b62cc..f260a8c6149 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -22,7 +22,6 @@ { "client": typing.Union[ Client[str], - schemas.Unset, str ], }, @@ -74,7 +73,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Client[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Client[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 241ed2441d2..763d6a4cac6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -42,7 +42,6 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: { "quadrilateralType": typing.Union[ QuadrilateralType[str], - schemas.Unset, str ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index c6d1468264f..02ab4cc7a4c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -99,7 +99,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + DanishPig[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DanishPig[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index d6c1b507259..9fdc36368a8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -22,7 +22,6 @@ { "breed": typing.Union[ Breed[str], - schemas.Unset, str ], }, @@ -69,7 +68,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 2408eff2003..a122c5ebf94 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -158,7 +158,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Drawing[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Drawing[frozendict.frozendict]: @@ -194,7 +194,6 @@ def __new__( shape.Shape[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -216,7 +215,6 @@ def __new__( shape_or_null.ShapeOrNull[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -238,7 +236,6 @@ def __new__( nullable_shape.NullableShape[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -258,7 +255,6 @@ def __new__( ], "shapes": typing.Union[ Shapes[tuple], - schemas.Unset, list, tuple ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 8d3d3c61d0f..490bc078152 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -110,12 +110,10 @@ def __getitem__(self, name: int) -> Items[str]: { "just_symbol": typing.Union[ JustSymbol[str], - schemas.Unset, str ], "array_enum": typing.Union[ ArrayEnum[tuple], - schemas.Unset, list, tuple ], @@ -172,7 +170,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + EnumArrays[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumArrays[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 17f0e3fe49f..e549355c8bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -223,7 +223,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + EnumTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumTest[frozendict.frozendict]: @@ -263,18 +263,15 @@ def __new__( { "enum_string": typing.Union[ EnumString[str], - schemas.Unset, str ], "enum_integer": typing.Union[ EnumInteger[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "enum_number": typing.Union[ EnumNumber[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float @@ -284,30 +281,25 @@ def __new__( schemas.NoneClass, str ]], - schemas.Unset, None, str ], "IntegerEnum": typing.Union[ integer_enum.IntegerEnum[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "StringEnumWithDefaultValue": typing.Union[ string_enum_with_default_value.StringEnumWithDefaultValue[str], - schemas.Unset, str ], "IntegerEnumWithDefaultValue": typing.Union[ integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "IntegerEnumOneValue": typing.Union[ integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index ac4603c11c6..35f91336b7a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -42,7 +42,6 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: { "triangleType": typing.Union[ TriangleType[str], - schemas.Unset, str ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index a30b3d6565f..c34234a0edf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -22,7 +22,6 @@ { "sourceURI": typing.Union[ SourceURI[str], - schemas.Unset, str ], }, @@ -76,7 +75,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + File[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> File[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index ca8f7f6b99a..29b70debdaf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -97,7 +97,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + FileSchemaTestClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FileSchemaTestClass[frozendict.frozendict]: @@ -126,13 +126,11 @@ def __new__( { "file": typing.Union[ file.File[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "files": typing.Union[ Files[tuple], - schemas.Unset, list, tuple ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index f4384bf8977..3feac4f61ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -56,7 +56,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Foo[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Foo[frozendict.frozendict]: @@ -84,7 +84,6 @@ def __new__( { "bar": typing.Union[ bar.Bar[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index e41b535f276..ad8d5f5239e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -254,105 +254,88 @@ class Schema_(metaclass=schemas.SingletonMeta): { "integer": typing.Union[ Integer[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "int32": typing.Union[ Int32[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "int32withValidations": typing.Union[ Int32withValidations[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "int64": typing.Union[ Int64[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "float": typing.Union[ _Float[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "float32": typing.Union[ Float32[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "double": typing.Union[ Double[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "float64": typing.Union[ Float64[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "arrayWithUniqueItems": typing.Union[ ArrayWithUniqueItems[tuple], - schemas.Unset, list, tuple ], "string": typing.Union[ String[str], - schemas.Unset, str ], "binary": typing.Union[ Binary[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, bytes, io.FileIO, io.BufferedReader ], "dateTime": typing.Union[ DateTime[str], - schemas.Unset, str, datetime.datetime ], "uuid": typing.Union[ Uuid[str], - schemas.Unset, str, uuid.UUID ], "uuidNoExample": typing.Union[ UuidNoExample[str], - schemas.Unset, str, uuid.UUID ], "pattern_with_digits": typing.Union[ PatternWithDigits[str], - schemas.Unset, str ], "pattern_with_digits_and_delimiter": typing.Union[ PatternWithDigitsAndDelimiter[str], - schemas.Unset, str ], "noneProp": typing.Union[ NoneProp[schemas.NoneClass], - schemas.Unset, None ], }, @@ -510,7 +493,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + FormatTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FormatTest[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 102bf1378b3..5854cf4ad45 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -24,12 +24,10 @@ { "data": typing.Union[ Data[str], - schemas.Unset, str ], "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], @@ -86,7 +84,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + FromSchema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FromSchema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index fcc0cbafbce..90dc0e20fdf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -22,7 +22,6 @@ { "color": typing.Union[ Color[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index 2c405285e75..9e407fe0a4f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -22,7 +22,6 @@ { "color": typing.Union[ Color[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 33f9700ec2f..52217a915f5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -87,7 +87,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + GrandparentAnimal[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GrandparentAnimal[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index aae15ab6ece..0036face217 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -24,12 +24,10 @@ { "bar": typing.Union[ Bar[str], - schemas.Unset, str ], "foo": typing.Union[ Foo[str], - schemas.Unset, str ], }, @@ -85,7 +83,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + HasOnlyReadOnly[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HasOnlyReadOnly[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 299480746bb..1568ef8d838 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -71,7 +71,6 @@ def __new__( schemas.NoneClass, str ]], - schemas.Unset, None, str ], @@ -129,7 +128,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + HealthCheckResult[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HealthCheckResult[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index ead90e6897c..d362ca43ccb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -42,7 +42,6 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: { "triangleType": typing.Union[ TriangleType[str], - schemas.Unset, str ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index 6caed820196..f4b965d3707 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -163,7 +163,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + JSONPatchRequestAddReplaceTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestAddReplaceTest[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 89cbdbea468..4fd56649412 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -119,7 +119,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + JSONPatchRequestMoveCopy[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestMoveCopy[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index ea09eca4fca..baddbcc6b4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -103,7 +103,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + JSONPatchRequestRemove[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestRemove[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 6a10d2ac4f2..af74ac94bb7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -249,7 +249,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + MapTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapTest[frozendict.frozendict]: @@ -280,25 +280,21 @@ def __new__( { "map_map_of_string": typing.Union[ MapMapOfString[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "map_of_enum_string": typing.Union[ MapOfEnumString[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "direct_map": typing.Union[ DirectMap[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "indirect_map": typing.Union[ string_boolean_map.StringBooleanMap[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index e543982a262..273c3e9c5fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -80,19 +80,16 @@ def __new__( { "uuid": typing.Union[ Uuid[str], - schemas.Unset, str, uuid.UUID ], "dateTime": typing.Union[ DateTime[str], - schemas.Unset, str, datetime.datetime ], "map": typing.Union[ Map[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -153,7 +150,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index a725e1f60d8..5e0d2ec7857 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -73,7 +73,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Money[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Money[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index eeacf66180d..ba5981cee8d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -36,13 +36,11 @@ { "snake_case": typing.Union[ SnakeCase[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "property": typing.Union[ _Property[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index fc797873802..7ba083a24de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -35,7 +35,6 @@ { "petId": typing.Union[ PetId[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], @@ -91,7 +90,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + NoAdditionalProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NoAdditionalProperties[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 517a7d73f0b..6e629787118 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -866,7 +866,6 @@ def __new__( schemas.NoneClass, decimal.Decimal ]], - schemas.Unset, None, decimal.Decimal, int @@ -876,7 +875,6 @@ def __new__( schemas.NoneClass, decimal.Decimal ]], - schemas.Unset, None, decimal.Decimal, int, @@ -887,7 +885,6 @@ def __new__( schemas.NoneClass, schemas.BoolClass ]], - schemas.Unset, None, bool ], @@ -896,7 +893,6 @@ def __new__( schemas.NoneClass, str ]], - schemas.Unset, None, str ], @@ -905,7 +901,6 @@ def __new__( schemas.NoneClass, str ]], - schemas.Unset, None, str, datetime.date @@ -915,7 +910,6 @@ def __new__( schemas.NoneClass, str ]], - schemas.Unset, None, str, datetime.datetime @@ -925,7 +919,6 @@ def __new__( schemas.NoneClass, tuple ]], - schemas.Unset, None, list, tuple @@ -935,14 +928,12 @@ def __new__( schemas.NoneClass, tuple ]], - schemas.Unset, None, list, tuple ], "array_items_nullable": typing.Union[ ArrayItemsNullable[tuple], - schemas.Unset, list, tuple ], @@ -951,7 +942,6 @@ def __new__( schemas.NoneClass, frozendict.frozendict ]], - schemas.Unset, None, dict, frozendict.frozendict @@ -961,14 +951,12 @@ def __new__( schemas.NoneClass, frozendict.frozendict ]], - schemas.Unset, None, dict, frozendict.frozendict ], "object_items_nullable": typing.Union[ ObjectItemsNullable[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -1090,7 +1078,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + NullableClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableClass[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 2dd5a55ef73..3d68c4ef947 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -22,7 +22,6 @@ { "JustNumber": typing.Union[ JustNumber[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float @@ -76,7 +75,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + NumberOnly[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NumberOnly[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index a499aaefb03..ad92489aa45 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -83,7 +83,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjWithRequiredProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 3d895136da6..c17271de1be 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -79,7 +79,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjWithRequiredPropsBase[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredPropsBase[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 409a12170b6..5c4159ab8c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -94,7 +94,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectModelWithArgAndArgsProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithArgAndArgsProperties[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 559dc419dbb..dc1deee095d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -66,7 +66,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectModelWithRefProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithRefProps[frozendict.frozendict]: @@ -98,19 +98,16 @@ def __new__( { "myNumber": typing.Union[ number_with_validations.NumberWithValidations[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "myString": typing.Union[ string.String[str], - schemas.Unset, str ], "myBoolean": typing.Union[ boolean.Boolean[schemas.BoolClass], - schemas.Unset, bool ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index b0fa9578bdb..7ab28493bad 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -55,7 +55,6 @@ { "name": typing.Union[ Name[str], - schemas.Unset, str ], }, @@ -135,7 +134,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 5f8815fe5b8..95ecf44a819 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -24,13 +24,11 @@ { "someProp": typing.Union[ SomeProp[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "someprop": typing.Union[ Someprop[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -89,7 +87,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithCollidingProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithCollidingProperties[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index c3a675b3b88..e75438bb004 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -65,7 +65,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithDecimalProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDecimalProperties[frozendict.frozendict]: @@ -96,17 +96,14 @@ def __new__( { "length": typing.Union[ decimal_payload.DecimalPayload[str], - schemas.Unset, str ], "width": typing.Union[ Width[str], - schemas.Unset, str ], "cost": typing.Union[ money.Money[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index b7d308fa5a7..0c1023633e6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -35,13 +35,11 @@ { "$special[property.name]": typing.Union[ SpecialPropertyName[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "123Number": typing.Union[ _123Number[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], @@ -111,7 +109,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithDifficultlyNamedProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 5cbdd06199d..8c8859cbb11 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -90,7 +90,6 @@ def __new__( SomeProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -166,7 +165,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithInlineCompositionProperty[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInlineCompositionProperty[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 0d2018eba08..d04148709ba 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -64,7 +64,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithInvalidNamedRefedProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 18e797a22f4..92aee02f824 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -22,7 +22,6 @@ { "test": typing.Union[ Test[str], - schemas.Unset, str ], }, @@ -74,7 +73,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ObjectWithOptionalTestProp[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithOptionalTestProp[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 0825b4f8cbd..a1be23e30a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -74,36 +74,30 @@ class Schema_(metaclass=schemas.SingletonMeta): { "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "petId": typing.Union[ PetId[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "quantity": typing.Union[ Quantity[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "shipDate": typing.Union[ ShipDate[str], - schemas.Unset, str, datetime.datetime ], "status": typing.Union[ Status[str], - schemas.Unset, str ], "complete": typing.Union[ Complete[schemas.BoolClass], - schemas.Unset, bool ], }, @@ -175,7 +169,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Order[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Order[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 8f732a8cfce..ea36e81a912 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -211,7 +211,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Pet[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pet[frozendict.frozendict]: @@ -245,25 +245,21 @@ def __new__( { "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "category": typing.Union[ category.Category[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], "tags": typing.Union[ Tags[tuple], - schemas.Unset, list, tuple ], "status": typing.Union[ Status[str], - schemas.Unset, str ], }, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 55562ab21cc..fb5e776d951 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -63,7 +63,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Player[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Player[frozendict.frozendict]: @@ -90,12 +90,10 @@ def __new__( { "name": typing.Union[ Name[str], - schemas.Unset, str ], "enemyPlayer": typing.Union[ Player[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 226c71f6765..ff406478aa9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -24,12 +24,10 @@ { "bar": typing.Union[ Bar[str], - schemas.Unset, str ], "baz": typing.Union[ Baz[str], - schemas.Unset, str ], }, @@ -85,7 +83,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ReadOnlyFirst[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReadOnlyFirst[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 8d3b2005c84..9cc6d7e81dd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -73,7 +73,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ReqPropsFromExplicitAddProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromExplicitAddProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index a626f205196..3d69449dc72 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -143,7 +143,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ReqPropsFromTrueAddProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromTrueAddProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index a61f8db390b..7468a125c13 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -155,7 +155,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + ReqPropsFromUnsetAddProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromUnsetAddProps[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index afb1c4d2cea..786cba2fb65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -42,7 +42,6 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: { "triangleType": typing.Union[ TriangleType[str], - schemas.Unset, str ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 7c935ebe2cc..730ebd0ae10 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -48,7 +48,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + SelfReferencingObjectModel[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SelfReferencingObjectModel[frozendict.frozendict]: @@ -74,7 +74,6 @@ def __new__( { "selfRef": typing.Union[ SelfReferencingObjectModel[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index a5e761aada6..5900b2d64c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -42,7 +42,6 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: { "quadrilateralType": typing.Union[ QuadrilateralType[str], - schemas.Unset, str ], }, @@ -89,7 +88,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 1f44fb651f6..1c195312e4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -22,7 +22,6 @@ { "a": typing.Union[ A[str], - schemas.Unset, str ], }, @@ -76,7 +75,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + SpecialModelName[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SpecialModelName[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 4d062618035..ed9154ddef5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -24,13 +24,11 @@ { "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "name": typing.Union[ Name[str], - schemas.Unset, str ], }, @@ -86,7 +84,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Tag[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Tag[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index d4382e414a9..9e761f6dc9a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -144,49 +144,40 @@ def __new__( { "id": typing.Union[ Id[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "username": typing.Union[ Username[str], - schemas.Unset, str ], "firstName": typing.Union[ FirstName[str], - schemas.Unset, str ], "lastName": typing.Union[ LastName[str], - schemas.Unset, str ], "email": typing.Union[ Email[str], - schemas.Unset, str ], "password": typing.Union[ Password[str], - schemas.Unset, str ], "phone": typing.Union[ Phone[str], - schemas.Unset, str ], "userStatus": typing.Union[ UserStatus[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "objectWithNoDeclaredProps": typing.Union[ ObjectWithNoDeclaredProps[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], @@ -195,7 +186,6 @@ def __new__( schemas.NoneClass, frozendict.frozendict ]], - schemas.Unset, None, dict, frozendict.frozendict @@ -204,7 +194,6 @@ def __new__( AnyTypeProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -226,7 +215,6 @@ def __new__( AnyTypeExceptNullProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -248,7 +236,6 @@ def __new__( AnyTypePropNullable[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -393,7 +380,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + User[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> User[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 9060f293df5..603ddbc4519 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -55,12 +55,10 @@ def WHALE(cls) -> ClassName[str]: { "hasBaleen": typing.Union[ HasBaleen[schemas.BoolClass], - schemas.Unset, bool ], "hasTeeth": typing.Union[ HasTeeth[schemas.BoolClass], - schemas.Unset, bool ], }, @@ -131,7 +129,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Whale[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Whale[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 1b7efc2a242..edcd952cf25 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -84,7 +84,6 @@ def ZEBRA(cls) -> ClassName[str]: { "type": typing.Union[ Type[str], - schemas.Unset, str ], }, @@ -152,7 +151,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Zebra[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Zebra[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 833866833c7..62ea1688a61 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -117,13 +117,11 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: { "enum_form_string_array": typing.Union[ EnumFormStringArray[tuple], - schemas.Unset, list, tuple ], "enum_form_string": typing.Union[ EnumFormString[str], - schemas.Unset, str ], }, @@ -174,7 +172,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 41af2361578..3f3a94cb096 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -196,61 +196,51 @@ class Schema_(metaclass=schemas.SingletonMeta): { "integer": typing.Union[ Integer[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "int32": typing.Union[ Int32[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "int64": typing.Union[ Int64[decimal.Decimal], - schemas.Unset, decimal.Decimal, int ], "float": typing.Union[ _Float[decimal.Decimal], - schemas.Unset, decimal.Decimal, int, float ], "string": typing.Union[ String[str], - schemas.Unset, str ], "binary": typing.Union[ Binary[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, bytes, io.FileIO, io.BufferedReader ], "date": typing.Union[ Date[str], - schemas.Unset, str, datetime.date ], "dateTime": typing.Union[ DateTime[str], - schemas.Unset, str, datetime.datetime ], "password": typing.Union[ Password[str], - schemas.Unset, str ], "callback": typing.Union[ Callback[str], - schemas.Unset, str ], }, @@ -375,7 +365,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index f6ab3f7395b..886bc3d3ab5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -90,7 +90,6 @@ def __new__( SomeProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -161,7 +160,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index f6ab3f7395b..886bc3d3ab5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -90,7 +90,6 @@ def __new__( SomeProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -161,7 +160,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index f6ab3f7395b..886bc3d3ab5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -90,7 +90,6 @@ def __new__( SomeProp[ schemas.INPUT_BASE_TYPES ], - schemas.Unset, dict, frozendict.frozendict, str, @@ -161,7 +160,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index c003be89660..e509da1c806 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -89,7 +89,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 5dcb2ee8bc3..fc33a4b288f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -22,7 +22,6 @@ { "keyword": typing.Union[ Keyword[str], - schemas.Unset, str ], }, @@ -69,7 +68,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index e322af0a0bf..ecc5d7d8b47 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -35,7 +35,6 @@ { "additionalMetadata": typing.Union[ AdditionalMetadata[str], - schemas.Unset, str ], }, @@ -97,7 +96,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index f99aaa06959..6f0c4f25558 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -35,7 +35,6 @@ { "additionalMetadata": typing.Union[ AdditionalMetadata[str], - schemas.Unset, str ], }, @@ -97,7 +96,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 3d1959c692d..74099b6edc7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -60,7 +60,6 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: { "files": typing.Union[ Files[tuple], - schemas.Unset, list, tuple ], @@ -108,7 +107,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index aa7e2058147..753dd8038ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -51,7 +51,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: @@ -79,7 +79,6 @@ def __new__( { "string": typing.Union[ foo.Foo[frozendict.frozendict], - schemas.Unset, dict, frozendict.frozendict ], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index 7fb1eb04fe7..c16851c05c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -85,7 +85,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index 7fb1eb04fe7..c16851c05c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -85,7 +85,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 1d9c8868431..151e112a450 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -24,12 +24,10 @@ { "name": typing.Union[ Name[str], - schemas.Unset, str ], "status": typing.Union[ Status[str], - schemas.Unset, str ], }, @@ -80,7 +78,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 45c39acfd2b..1c143ec8f8d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -24,12 +24,10 @@ { "additionalMetadata": typing.Union[ AdditionalMetadata[str], - schemas.Unset, str ], "file": typing.Union[ File[typing.Union[bytes, schemas.FileIO]], - schemas.Unset, bytes, io.FileIO, io.BufferedReader @@ -82,7 +80,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 3985d573091..1112afc71d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -131,7 +131,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index e2e261606b3..6ba3cc4062c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -85,7 +85,7 @@ def __new__( cls, arg_: typing.Union[ DictInput, - typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: From c9b81c17d24ad50decf85e129c9866d0b275c3bc Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 9 Jun 2023 17:49:26 -0700 Subject: [PATCH 10/36] Typeddicts only generated when addProps is false --- .../codegen/model/CodegenSchema.java | 16 +- .../components/schemas/_helper_getschemas.hbs | 4 + .../content/application_json/schema.py | 1 + .../headers/header_number_header/schema.py | 1 + .../headers/header_string_header/schema.py | 1 + .../parameter_path_user_name/schema.py | 1 + .../content/application_json/schema.py | 2 + .../content/application_json/schema.py | 2 + .../headers/header_some_header/schema.py | 1 + .../content/application_json/schema.py | 2 + .../content/application_xml/schema.py | 2 + .../components/schema/_200_response.py | 18 +- .../petstore_api/components/schema/_return.py | 13 +- .../schema/abstract_step_message.py | 68 +----- .../schema/additional_properties_class.py | 75 ++----- .../schema/additional_properties_validator.py | 7 + ...ditional_properties_with_array_of_enums.py | 3 + .../petstore_api/components/schema/address.py | 2 + .../petstore_api/components/schema/animal.py | 26 +-- .../components/schema/animal_farm.py | 2 + .../components/schema/any_type_and_format.py | 205 +----------------- .../components/schema/any_type_not_string.py | 2 + .../components/schema/api_response.py | 23 +- .../petstore_api/components/schema/apple.py | 26 +-- .../components/schema/apple_req.py | 2 + .../schema/array_holding_any_type.py | 2 + .../schema/array_of_array_of_number_only.py | 15 +- .../components/schema/array_of_enums.py | 2 + .../components/schema/array_of_number_only.py | 14 +- .../components/schema/array_test.py | 30 +-- .../schema/array_with_validations_in_items.py | 2 + .../petstore_api/components/schema/banana.py | 13 +- .../components/schema/banana_req.py | 2 + .../src/petstore_api/components/schema/bar.py | 1 + .../components/schema/basque_pig.py | 11 +- .../petstore_api/components/schema/boolean.py | 1 + .../components/schema/boolean_enum.py | 1 + .../components/schema/capitalization.py | 37 +--- .../src/petstore_api/components/schema/cat.py | 14 +- .../components/schema/category.py | 27 +-- .../components/schema/child_cat.py | 14 +- .../components/schema/class_model.py | 12 +- .../petstore_api/components/schema/client.py | 12 +- .../schema/complex_quadrilateral.py | 14 +- ...d_any_of_different_types_no_validations.py | 18 ++ .../components/schema/composed_array.py | 2 + .../components/schema/composed_bool.py | 2 + .../components/schema/composed_none.py | 2 + .../components/schema/composed_number.py | 2 + .../components/schema/composed_object.py | 2 + .../schema/composed_one_of_different_types.py | 9 + .../components/schema/composed_string.py | 2 + .../components/schema/currency.py | 1 + .../components/schema/danish_pig.py | 11 +- .../components/schema/date_time_test.py | 1 + .../schema/date_time_with_validations.py | 1 + .../schema/date_with_validations.py | 1 + .../components/schema/decimal_payload.py | 1 + .../src/petstore_api/components/schema/dog.py | 14 +- .../petstore_api/components/schema/drawing.py | 81 +------ .../components/schema/enum_arrays.py | 19 +- .../components/schema/enum_class.py | 1 + .../components/schema/enum_test.py | 71 +----- .../components/schema/equilateral_triangle.py | 14 +- .../petstore_api/components/schema/file.py | 12 +- .../schema/file_schema_test_class.py | 20 +- .../src/petstore_api/components/schema/foo.py | 12 +- .../components/schema/format_test.py | 143 ++---------- .../components/schema/from_schema.py | 18 +- .../petstore_api/components/schema/fruit.py | 14 +- .../components/schema/fruit_req.py | 4 + .../components/schema/gm_fruit.py | 14 +- .../components/schema/grandparent_animal.py | 11 +- .../components/schema/has_only_read_only.py | 17 +- .../components/schema/health_check_result.py | 16 +- .../components/schema/integer_enum.py | 1 + .../components/schema/integer_enum_big.py | 1 + .../schema/integer_enum_one_value.py | 1 + .../schema/integer_enum_with_default_value.py | 1 + .../components/schema/integer_max10.py | 1 + .../components/schema/integer_min15.py | 1 + .../components/schema/isosceles_triangle.py | 14 +- .../petstore_api/components/schema/items.py | 2 + .../components/schema/json_patch_request.py | 5 + .../json_patch_request_add_replace_test.py | 3 + .../schema/json_patch_request_move_copy.py | 3 + .../schema/json_patch_request_remove.py | 2 + .../petstore_api/components/schema/mammal.py | 4 + .../components/schema/map_test.py | 35 +-- ...perties_and_additional_properties_class.py | 26 +-- .../petstore_api/components/schema/money.py | 16 +- .../petstore_api/components/schema/name.py | 33 +-- .../schema/no_additional_properties.py | 2 + .../components/schema/nullable_class.py | 125 ++--------- .../components/schema/nullable_shape.py | 4 + .../components/schema/nullable_string.py | 1 + .../petstore_api/components/schema/number.py | 1 + .../components/schema/number_only.py | 14 +- .../schema/number_with_validations.py | 1 + .../schema/obj_with_required_props.py | 12 +- .../schema/obj_with_required_props_base.py | 11 +- .../components/schema/object_interface.py | 1 + ...ject_model_with_arg_and_args_properties.py | 16 +- .../schema/object_model_with_ref_props.py | 24 +- ..._with_req_test_prop_from_unset_add_prop.py | 51 +---- .../object_with_colliding_properties.py | 19 +- .../schema/object_with_decimal_properties.py | 23 +- .../object_with_difficultly_named_props.py | 33 +-- ...object_with_inline_composition_property.py | 30 +-- ...ect_with_invalid_named_refed_properties.py | 18 +- .../schema/object_with_optional_test_prop.py | 12 +- .../schema/object_with_validations.py | 1 + .../petstore_api/components/schema/order.py | 41 +--- .../components/schema/parent_pet.py | 2 + .../src/petstore_api/components/schema/pet.py | 52 +---- .../src/petstore_api/components/schema/pig.py | 3 + .../petstore_api/components/schema/player.py | 18 +- .../components/schema/quadrilateral.py | 3 + .../schema/quadrilateral_interface.py | 16 +- .../components/schema/read_only_first.py | 17 +- .../req_props_from_explicit_add_props.py | 15 +- .../schema/req_props_from_true_add_props.py | 49 +---- .../schema/req_props_from_unset_add_props.py | 62 +----- .../components/schema/scalene_triangle.py | 14 +- .../schema/self_referencing_array_model.py | 2 + .../schema/self_referencing_object_model.py | 14 +- .../petstore_api/components/schema/shape.py | 3 + .../components/schema/shape_or_null.py | 4 + .../components/schema/simple_quadrilateral.py | 14 +- .../components/schema/some_object.py | 2 + .../components/schema/special_model_name.py | 12 +- .../petstore_api/components/schema/string.py | 1 + .../components/schema/string_boolean_map.py | 2 + .../components/schema/string_enum.py | 1 + .../schema/string_enum_with_default_value.py | 1 + .../schema/string_with_validation.py | 1 + .../src/petstore_api/components/schema/tag.py | 18 +- .../components/schema/triangle.py | 4 + .../components/schema/triangle_interface.py | 16 +- .../petstore_api/components/schema/user.py | 132 ++--------- .../components/schema/uuid_string.py | 1 + .../petstore_api/components/schema/whale.py | 31 +-- .../petstore_api/components/schema/zebra.py | 27 +-- .../delete/parameters/parameter_0/schema.py | 1 + .../delete/parameters/parameter_1/schema.py | 1 + .../delete/parameters/parameter_2/schema.py | 1 + .../delete/parameters/parameter_3/schema.py | 1 + .../delete/parameters/parameter_4/schema.py | 1 + .../delete/parameters/parameter_5/schema.py | 1 + .../fake/get/parameters/parameter_0/schema.py | 2 + .../fake/get/parameters/parameter_1/schema.py | 1 + .../fake/get/parameters/parameter_2/schema.py | 2 + .../fake/get/parameters/parameter_3/schema.py | 1 + .../fake/get/parameters/parameter_4/schema.py | 1 + .../fake/get/parameters/parameter_5/schema.py | 1 + .../schema.py | 19 +- .../content/application_json/schema.py | 1 + .../schema.py | 99 ++------- .../put/parameters/parameter_0/schema.py | 1 + .../put/parameters/parameter_0/schema.py | 1 + .../put/parameters/parameter_1/schema.py | 1 + .../put/parameters/parameter_2/schema.py | 1 + .../delete/parameters/parameter_0/schema.py | 1 + .../content/application_json/schema.py | 2 + .../post/parameters/parameter_0/schema.py | 2 + .../post/parameters/parameter_1/schema.py | 30 +-- .../content/application_json/schema.py | 2 + .../content/multipart_form_data/schema.py | 30 +-- .../content/application_json/schema.py | 2 + .../content/multipart_form_data/schema.py | 30 +-- .../schema.py | 16 +- .../application_json_charsetutf8/schema.py | 1 + .../application_json_charsetutf8/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../get/parameters/parameter_0/schema.py | 12 +- .../post/parameters/parameter_0/schema.py | 1 + .../post/parameters/parameter_1/schema.py | 1 + .../post/parameters/parameter_10/schema.py | 1 + .../post/parameters/parameter_11/schema.py | 1 + .../post/parameters/parameter_12/schema.py | 1 + .../post/parameters/parameter_13/schema.py | 1 + .../post/parameters/parameter_14/schema.py | 1 + .../post/parameters/parameter_15/schema.py | 1 + .../post/parameters/parameter_16/schema.py | 1 + .../post/parameters/parameter_17/schema.py | 1 + .../post/parameters/parameter_18/schema.py | 1 + .../post/parameters/parameter_2/schema.py | 1 + .../post/parameters/parameter_3/schema.py | 1 + .../post/parameters/parameter_4/schema.py | 1 + .../post/parameters/parameter_5/schema.py | 1 + .../post/parameters/parameter_6/schema.py | 1 + .../post/parameters/parameter_7/schema.py | 1 + .../post/parameters/parameter_8/schema.py | 1 + .../post/parameters/parameter_9/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../post/parameters/parameter_0/schema.py | 1 + .../content/multipart_form_data/schema.py | 28 +-- .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../put/parameters/parameter_0/schema.py | 2 + .../put/parameters/parameter_1/schema.py | 2 + .../put/parameters/parameter_2/schema.py | 2 + .../put/parameters/parameter_3/schema.py | 2 + .../put/parameters/parameter_4/schema.py | 2 + .../application_octet_stream/schema.py | 1 + .../application_octet_stream/schema.py | 1 + .../content/multipart_form_data/schema.py | 28 +-- .../content/multipart_form_data/schema.py | 14 +- .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 13 +- .../paths/foo/get/servers/server_1.py | 1 + .../get/parameters/parameter_0/schema.py | 2 + .../pet_find_by_status/servers/server_1.py | 1 + .../get/parameters/parameter_0/schema.py | 2 + .../delete/parameters/parameter_0/schema.py | 1 + .../delete/parameters/parameter_1/schema.py | 1 + .../get/parameters/parameter_0/schema.py | 1 + .../post/parameters/parameter_0/schema.py | 1 + .../schema.py | 17 +- .../post/parameters/parameter_0/schema.py | 1 + .../content/multipart_form_data/schema.py | 19 +- .../delete/parameters/parameter_0/schema.py | 1 + .../get/parameters/parameter_0/schema.py | 1 + .../get/parameters/parameter_0/schema.py | 1 + .../get/parameters/parameter_1/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_xml/schema.py | 1 + .../headers/header_x_expires_after/schema.py | 1 + .../content/application_json/schema.py | 1 + .../src/petstore_api/servers/server_0.py | 2 + .../src/petstore_api/servers/server_1.py | 1 + 239 files changed, 641 insertions(+), 2202 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index 09e21c542f1..9ec81730838 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -222,7 +222,8 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } - if (requiredProperties != null) { + boolean additionalPropertiesIsBooleanSchemaFalse = (additionalProperties != null && additionalProperties.isBooleanSchemaFalse); + if (requiredProperties != null && additionalPropertiesIsBooleanSchemaFalse) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "requiredPropertiesInputType"; extraSchema.requiredProperties = requiredProperties; @@ -232,7 +233,7 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } - if (optionalProperties != null) { + if (optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "optionalPropertiesInputType"; extraSchema.optionalProperties = optionalProperties; @@ -242,13 +243,20 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } - if (requiredProperties != null && optionalProperties != null) { + boolean typedDictReqAndOptional = ( + requiredProperties != null && optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse + ); + if (typedDictReqAndOptional || !additionalPropertiesIsBooleanSchemaFalse) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "propertiesInputType"; extraSchema.optionalProperties = optionalProperties; extraSchema.requiredProperties = requiredProperties; extraSchema.requiredAndOptionalProperties = requiredAndOptionalProperties; - boolean allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline()); + extraSchema.additionalProperties = additionalProperties; + boolean allAreInline = true; + if (requiredProperties != null && optionalProperties != null && typedDictReqAndOptional) { + allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline()); + } if (allAreInline) { schemasBeforeImports.add(extraSchema); } else { diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index cd3d06df4f9..ad71bb9717f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -22,10 +22,14 @@ {{> components/schemas/_helper_optional_properties_type }} {{else}} {{#eq instanceType "propertiesInputType" }} + {{#and requiredAndOptionalProperties requiredProperties optionalProperties additionalProperties additionalProperties.isBooleanSchemaFalse}} class {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.camelCase}}, {{optionalProperties.jsonPathPiece.camelCase}}): pass + {{else}} +"""todo define mapping here""" + {{/and}} {{else}} {{#eq instanceType "importsType" }} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py index 5af8b8a8ede..a2b686b0b4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int32Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py index e394930dca7..dc58c8056f0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DecimalSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index 0b305f816fb..398c0c7a7fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index 7e17e33cab5..faa90a872ca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index 0810c0c68e0..50f5571f779 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index d8b4895eba5..dc0d071a63c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index b595b04d012..25daf316881 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" _Class: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,21 +21,7 @@ "class": typing.Type[_Class], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "name": typing.Union[ - Name[decimal.Decimal], - decimal.Decimal, - int - ], - "class": typing.Union[ - _Class[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _200Response( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 3a1c3398df9..7723b7c2a1f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _Return: typing_extensions.TypeAlias = schemas.Int32Schema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,17 +18,7 @@ "return": typing.Type[_Return], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "return": typing.Union[ - _Return[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) +"""todo define mapping here""" class _Return( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 8b7510b09a5..9f90347523c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Discriminator: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,71 +19,7 @@ "discriminator": typing.Type[Discriminator], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "description": typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "discriminator": typing.Union[ - Discriminator[str], - str - ], - "sequenceNumber": typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - } -) +"""todo define mapping here""" class AbstractStepMessage( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index e142bc04552..cb8b7fe1741 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class MapProperty( @@ -49,7 +51,9 @@ def __new__( ) return inst +"""todo define mapping here""" AdditionalProperties3: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class AdditionalProperties2( @@ -88,6 +92,7 @@ def __new__( ) return inst +"""todo define mapping here""" class MapOfMapProperty( @@ -127,10 +132,15 @@ def __new__( ) return inst +"""todo define mapping here""" Anytype1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class MapWithUndeclaredPropertiesAnytype3( @@ -224,7 +234,9 @@ def __new__( ) return inst +"""todo define mapping here""" AdditionalProperties6: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class MapWithUndeclaredPropertiesString( @@ -276,68 +288,7 @@ def __new__( "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "map_property": typing.Union[ - MapProperty[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "map_of_map_property": typing.Union[ - MapOfMapProperty[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "anytype_1": typing.Union[ - Anytype1[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "map_with_undeclared_properties_anytype_1": typing.Union[ - MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "map_with_undeclared_properties_anytype_2": typing.Union[ - MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "map_with_undeclared_properties_anytype_3": typing.Union[ - MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "empty_map": typing.Union[ - EmptyMap[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "map_with_undeclared_properties_string": typing.Union[ - MapWithUndeclaredPropertiesString[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) +"""todo define mapping here""" class AdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index bf0bb813933..36d420a95cf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class _0( @@ -75,6 +77,7 @@ def __new__( ) return inst +"""todo define mapping here""" class AdditionalProperties2( @@ -126,6 +129,7 @@ def __new__( ) return inst +"""todo define mapping here""" class _1( @@ -190,6 +194,7 @@ def __new__( ) return inst +"""todo define mapping here""" class AdditionalProperties3( @@ -241,6 +246,7 @@ def __new__( ) return inst +"""todo define mapping here""" class _2( @@ -310,6 +316,7 @@ def __new__( typing.Type[_1[schemas.U]], typing.Type[_2[schemas.U]], ] +"""todo define mapping here""" class AdditionalPropertiesValidator( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 5adbcde9552..9f06b171f67 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class AdditionalProperties( @@ -46,6 +48,7 @@ def __new__( def __getitem__(self, name: int) -> enum_class.EnumClass[str]: return super().__getitem__(name) +"""todo define mapping here""" class AdditionalPropertiesWithArrayOfEnums( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index 278cebdf2ae..59ac936e89b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema[U] +"""todo define mapping here""" class Address( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 768b84e50d7..fb298374c4d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" ClassName: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Color( @@ -31,29 +33,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "className": typing.Union[ - ClassName[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "color": typing.Union[ - Color[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index 281437ad0c8..ef982971289 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class AnimalFarm( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 0e11269dd7a..3be9c019a85 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Uuid( @@ -62,6 +63,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Date( @@ -114,6 +116,7 @@ def __new__( ) return inst +"""todo define mapping here""" class DateTime( @@ -166,6 +169,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Number( @@ -218,6 +222,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Binary( @@ -269,6 +274,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Int32( @@ -320,6 +326,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Int64( @@ -371,6 +378,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Double( @@ -422,6 +430,7 @@ def __new__( ) return inst +"""todo define mapping here""" class _Float( @@ -487,201 +496,7 @@ def __new__( "float": typing.Type[_Float], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "uuid": typing.Union[ - Uuid[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "date": typing.Union[ - Date[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "date-time": typing.Union[ - DateTime[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "number": typing.Union[ - Number[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "binary": typing.Union[ - Binary[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "int32": typing.Union[ - Int32[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "int64": typing.Union[ - Int64[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "double": typing.Union[ - Double[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "float": typing.Union[ - _Float[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class AnyTypeAndFormat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 38ce281842a..0c8007d9035 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _Not: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class AnyTypeNotString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 4fc8082a0c4..ced3ec25407 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -10,8 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Code: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" Type: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Message: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,25 +24,7 @@ "message": typing.Type[Message], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "code": typing.Union[ - Code[decimal.Decimal], - decimal.Decimal, - int - ], - "type": typing.Union[ - Type[str], - str - ], - "message": typing.Union[ - Message[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class ApiResponse( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index cefd43ca521..73b2da343f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Cultivar( @@ -25,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^[a-zA-Z\s]*$' # noqa: E501 ) +"""todo define mapping here""" class Origin( @@ -48,29 +50,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "cultivar": typing.Union[ - Cultivar[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "origin": typing.Union[ - Origin[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index a2b5a84a1c4..1234d7babd4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -11,7 +11,9 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" Cultivar: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Mealy: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index e1370170a48..6b90dbdf74a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class ArrayHoldingAnyType( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index dcd7e1f0ada..4d140a7d379 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items2: typing_extensions.TypeAlias = schemas.NumberSchema[U] +"""todo define mapping here""" class Items( @@ -49,6 +51,7 @@ def __new__( def __getitem__(self, name: int) -> Items2[decimal.Decimal]: return super().__getitem__(name) +"""todo define mapping here""" class ArrayArrayNumber( @@ -92,17 +95,7 @@ def __getitem__(self, name: int) -> Items[tuple]: "ArrayArrayNumber": typing.Type[ArrayArrayNumber], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "ArrayArrayNumber": typing.Union[ - ArrayArrayNumber[tuple], - list, - tuple - ], - }, - total=False -) +"""todo define mapping here""" class ArrayOfArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 07da4cccb04..93a29152853 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class ArrayOfEnums( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index 5292481070f..ca1f864a5d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.NumberSchema[U] +"""todo define mapping here""" class ArrayNumber( @@ -55,17 +57,7 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: "ArrayNumber": typing.Type[ArrayNumber], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "ArrayNumber": typing.Union[ - ArrayNumber[tuple], - list, - tuple - ], - }, - total=False -) +"""todo define mapping here""" class ArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 2a6a0742f7c..9c2de151106 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class ArrayOfString( @@ -47,7 +49,9 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) +"""todo define mapping here""" Items3: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" class Items2( @@ -85,6 +89,7 @@ def __new__( def __getitem__(self, name: int) -> Items3[decimal.Decimal]: return super().__getitem__(name) +"""todo define mapping here""" class ArrayArrayOfInteger( @@ -122,6 +127,8 @@ def __new__( def __getitem__(self, name: int) -> Items2[tuple]: return super().__getitem__(name) +"""todo define mapping here""" +"""todo define mapping here""" class Items4( @@ -159,6 +166,7 @@ def __new__( def __getitem__(self, name: int) -> read_only_first.ReadOnlyFirst[frozendict.frozendict]: return super().__getitem__(name) +"""todo define mapping here""" class ArrayArrayOfModel( @@ -204,27 +212,7 @@ def __getitem__(self, name: int) -> Items4[tuple]: "array_array_of_model": typing.Type[ArrayArrayOfModel], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "array_of_string": typing.Union[ - ArrayOfString[tuple], - list, - tuple - ], - "array_array_of_integer": typing.Union[ - ArrayArrayOfInteger[tuple], - list, - tuple - ], - "array_array_of_model": typing.Union[ - ArrayArrayOfModel[tuple], - list, - tuple - ], - }, - total=False -) +"""todo define mapping here""" class ArrayTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index 00cc8d64ab8..feeb822ece4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Items( @@ -24,6 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): }) format: str = 'int64' inclusive_maximum: typing.Union[int, float] = 7 +"""todo define mapping here""" class ArrayWithValidationsInItems( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 28286a8204d..f71698e684a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,17 +18,7 @@ "lengthCm": typing.Type[LengthCm], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "lengthCm": typing.Union[ - LengthCm[decimal.Decimal], - decimal.Decimal, - int, - float - ], - } -) +"""todo define mapping here""" class Banana( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 96b4c4be498..db8150b9885 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -11,7 +11,9 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema[U] +"""todo define mapping here""" Sweet: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py index fdaa22c4d9e..394e40ed703 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Bar( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index c04e4acde89..c3030f87572 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class ClassName( @@ -37,15 +38,7 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "className": typing.Union[ - ClassName[str], - str - ], - } -) +"""todo define mapping here""" class BasquePig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py index 04cd54e9c82..bba29cc435b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Boolean: typing_extensions.TypeAlias = schemas.BoolSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py index 4e82fcace6c..baf260af254 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class BooleanEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index da303a3e8b2..cf5f9976373 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -10,11 +10,17 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" SmallCamel: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" CapitalCamel: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" SmallSnake: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" CapitalSnake: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" SCAETHFlowPoints: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" ATTNAME: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -27,36 +33,7 @@ "ATT_NAME": typing.Type[ATTNAME], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "smallCamel": typing.Union[ - SmallCamel[str], - str - ], - "CapitalCamel": typing.Union[ - CapitalCamel[str], - str - ], - "small_Snake": typing.Union[ - SmallSnake[str], - str - ], - "Capital_Snake": typing.Union[ - CapitalSnake[str], - str - ], - "SCA_ETH_Flow_Points": typing.Union[ - SCAETHFlowPoints[str], - str - ], - "ATT_NAME": typing.Union[ - ATTNAME[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Capitalization( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index df120b30cf3..97fba5d191f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Declawed: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +19,7 @@ "declawed": typing.Type[Declawed], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "declawed": typing.Union[ - Declawed[schemas.BoolClass], - bool - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -83,6 +76,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Cat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 75355d74c4b..98d612a13ac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" class Name( @@ -31,30 +33,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "name": typing.Union[ - Name[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 9c1ba2297a8..6300c9350e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +19,7 @@ "name": typing.Type[Name], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "name": typing.Union[ - Name[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -83,6 +76,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ChildCat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index 8066c67522f..08d2da737cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _Class: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "_class": typing.Type[_Class], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "_class": typing.Union[ - _Class[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class ClassModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index f260a8c6149..8f8309185b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Client: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "client": typing.Type[Client], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "client": typing.Union[ - Client[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Client( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 763d6a4cac6..eefdb7d712a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class QuadrilateralType( @@ -37,16 +39,7 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "quadrilateralType": typing.Union[ - QuadrilateralType[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -103,6 +96,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ComplexQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 32242708521..3c4289dc600 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -10,16 +10,27 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" _1: typing_extensions.TypeAlias = schemas.DateSchema[U] +"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] +"""todo define mapping here""" _3: typing_extensions.TypeAlias = schemas.BinarySchema[U] +"""todo define mapping here""" _4: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" _5: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" _6: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" _7: typing_extensions.TypeAlias = schemas.BoolSchema[U] +"""todo define mapping here""" _8: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class _9( @@ -82,11 +93,17 @@ def __getitem__(self, name: int) -> Items[typing.Union[ ]]: return super().__getitem__(name) +"""todo define mapping here""" _10: typing_extensions.TypeAlias = schemas.NumberSchema[U] +"""todo define mapping here""" _11: typing_extensions.TypeAlias = schemas.Float32Schema[U] +"""todo define mapping here""" _12: typing_extensions.TypeAlias = schemas.Float64Schema[U] +"""todo define mapping here""" _13: typing_extensions.TypeAlias = schemas.IntSchema[U] +"""todo define mapping here""" _14: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" _15: typing_extensions.TypeAlias = schemas.Int64Schema[U] AnyOf = typing.Tuple[ typing.Type[_0[schemas.U]], @@ -106,6 +123,7 @@ def __getitem__(self, name: int) -> Items[typing.Union[ typing.Type[_14[schemas.U]], typing.Type[_15[schemas.U]], ] +"""todo define mapping here""" class ComposedAnyOfDifferentTypesNoValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 06177ddf24b..4ef2f6deeb8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class ComposedArray( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index 80edc370de9..7e97d41aaf3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class ComposedBool( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index 716a7bb2ddb..43be59a6315 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class ComposedNone( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index bee636d9943..9ac6a223dfb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class ComposedNumber( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 0bf85f09d74..8eab82eb122 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class ComposedObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 5fc82c44700..e454e34e14d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -10,8 +10,13 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" _3: typing_extensions.TypeAlias = schemas.DateSchema[U] +"""todo define mapping here""" class _4( @@ -41,7 +46,9 @@ def __new__( ) return inst +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class _5( @@ -106,6 +113,7 @@ def __getitem__(self, name: int) -> Items[typing.Union[ ]]: return super().__getitem__(name) +"""todo define mapping here""" class _6( @@ -122,6 +130,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^2020.*' # noqa: E501 ) +"""todo define mapping here""" class ComposedOneOfDifferentTypes( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index ddada15171f..833c7b92306 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class ComposedString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py index 9bb07dbaf6c..fe85afd79e1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Currency( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index 02ab4cc7a4c..058d004cfbb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class ClassName( @@ -37,15 +38,7 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "className": typing.Union[ - ClassName[str], - str - ], - } -) +"""todo define mapping here""" class DanishPig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py index afc7412ca35..9c64d188039 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class DateTimeTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py index 9482d8c17e0..546145fec79 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class DateTimeWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py index 9cc20254e25..7aa537a25b4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class DateWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py index bd611d27d8e..c09d25d24f0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" DecimalPayload: typing_extensions.TypeAlias = schemas.DecimalSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 9fdc36368a8..4eb1609a56e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Breed: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +19,7 @@ "breed": typing.Type[Breed], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "breed": typing.Union[ - Breed[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -83,6 +76,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Dog( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index a122c5ebf94..4d434d943e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -10,6 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Shapes( @@ -72,6 +78,7 @@ def __getitem__(self, name: int) -> shape.Shape[typing.Union[ ]]: return super().__getitem__(name) +"""todo define mapping here""" class Drawing( @@ -187,77 +194,3 @@ def __new__( "shapes": typing.Type[Shapes], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "mainShape": typing.Union[ - shape.Shape[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "shapeOrNull": typing.Union[ - shape_or_null.ShapeOrNull[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "nullableShape": typing.Union[ - nullable_shape.NullableShape[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "shapes": typing.Union[ - Shapes[tuple], - list, - tuple - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 490bc078152..d9d00feb895 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class JustSymbol( @@ -36,6 +37,7 @@ def GREATER_THAN_SIGN_EQUALS_SIGN(cls) -> JustSymbol[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> JustSymbol[str]: return cls("$") # type: ignore +"""todo define mapping here""" class Items( @@ -62,6 +64,7 @@ def FISH(cls) -> Items[str]: @schemas.classproperty def CRAB(cls) -> Items[str]: return cls("crab") # type: ignore +"""todo define mapping here""" class ArrayEnum( @@ -105,21 +108,7 @@ def __getitem__(self, name: int) -> Items[str]: "array_enum": typing.Type[ArrayEnum], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "just_symbol": typing.Union[ - JustSymbol[str], - str - ], - "array_enum": typing.Union[ - ArrayEnum[tuple], - list, - tuple - ], - }, - total=False -) +"""todo define mapping here""" class EnumArrays( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py index 2c5bb7f1db7..48448410cf5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class EnumClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index e549355c8bb..48ed8443171 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class EnumString( @@ -41,6 +42,7 @@ def LOWER(cls) -> EnumString[str]: @schemas.classproperty def EMPTY(cls) -> EnumString[str]: return cls("") # type: ignore +"""todo define mapping here""" class EnumStringRequired( @@ -72,6 +74,7 @@ def LOWER(cls) -> EnumStringRequired[str]: @schemas.classproperty def EMPTY(cls) -> EnumStringRequired[str]: return cls("") # type: ignore +"""todo define mapping here""" class EnumInteger( @@ -99,6 +102,7 @@ def POSITIVE_1(cls) -> EnumInteger[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1(cls) -> EnumInteger[decimal.Decimal]: return cls(-1) # type: ignore +"""todo define mapping here""" class EnumNumber( @@ -126,15 +130,12 @@ def POSITIVE_1_PT_1(cls) -> EnumNumber[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1_PT_2(cls) -> EnumNumber[decimal.Decimal]: return cls(-1.2) # type: ignore -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "enum_string_required": typing.Union[ - EnumStringRequired[str], - str - ], - } -) +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class EnumTest( @@ -258,55 +259,3 @@ def __new__( "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], } ) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "enum_string": typing.Union[ - EnumString[str], - str - ], - "enum_integer": typing.Union[ - EnumInteger[decimal.Decimal], - decimal.Decimal, - int - ], - "enum_number": typing.Union[ - EnumNumber[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "stringEnum": typing.Union[ - string_enum.StringEnum[typing.Union[ - schemas.NoneClass, - str - ]], - None, - str - ], - "IntegerEnum": typing.Union[ - integer_enum.IntegerEnum[decimal.Decimal], - decimal.Decimal, - int - ], - "StringEnumWithDefaultValue": typing.Union[ - string_enum_with_default_value.StringEnumWithDefaultValue[str], - str - ], - "IntegerEnumWithDefaultValue": typing.Union[ - integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], - decimal.Decimal, - int - ], - "IntegerEnumOneValue": typing.Union[ - integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 35f91336b7a..a4bbcfe67ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class TriangleType( @@ -37,16 +39,7 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "triangleType": typing.Union[ - TriangleType[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -103,6 +96,7 @@ def __new__( ) return inst +"""todo define mapping here""" class EquilateralTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index c34234a0edf..f430a24e35b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" SourceURI: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "sourceURI": typing.Type[SourceURI], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "sourceURI": typing.Union[ - SourceURI[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class File( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 29b70debdaf..e2b505c066e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Files( @@ -47,6 +50,7 @@ def __new__( def __getitem__(self, name: int) -> file.File[frozendict.frozendict]: return super().__getitem__(name) +"""todo define mapping here""" class FileSchemaTestClass( @@ -121,19 +125,3 @@ def __new__( "files": typing.Type[Files], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "file": typing.Union[ - file.File[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "files": typing.Union[ - Files[tuple], - list, - tuple - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index 3feac4f61ff..57a47ec367d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class Foo( @@ -79,13 +81,3 @@ def __new__( "bar": typing.Type[bar.Bar], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "bar": typing.Union[ - bar.Bar[str], - str - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index ad8d5f5239e..9d9da9ac6b0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Integer( @@ -26,7 +27,9 @@ class Schema_(metaclass=schemas.SingletonMeta): inclusive_maximum: typing.Union[int, float] = 100 inclusive_minimum: typing.Union[int, float] = 10 multiple_of: typing.Union[int, float] = 2 +"""todo define mapping here""" Int32: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" class Int32withValidations( @@ -42,7 +45,9 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int32' inclusive_maximum: typing.Union[int, float] = 200 inclusive_minimum: typing.Union[int, float] = 20 +"""todo define mapping here""" Int64: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" class Number( @@ -58,6 +63,7 @@ class Schema_(metaclass=schemas.SingletonMeta): inclusive_maximum: typing.Union[int, float] = 543.2 inclusive_minimum: typing.Union[int, float] = 32.1 multiple_of: typing.Union[int, float] = 32.5 +"""todo define mapping here""" class _Float( @@ -73,7 +79,9 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'float' inclusive_maximum: typing.Union[int, float] = 987.6 inclusive_minimum: typing.Union[int, float] = 54.3 +"""todo define mapping here""" Float32: typing_extensions.TypeAlias = schemas.Float32Schema[U] +"""todo define mapping here""" class Double( @@ -89,8 +97,11 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'double' inclusive_maximum: typing.Union[int, float] = 123.4 inclusive_minimum: typing.Union[int, float] = 67.8 +"""todo define mapping here""" Float64: typing_extensions.TypeAlias = schemas.Float64Schema[U] +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.NumberSchema[U] +"""todo define mapping here""" class ArrayWithUniqueItems( @@ -130,6 +141,7 @@ def __new__( def __getitem__(self, name: int) -> Items[decimal.Decimal]: return super().__getitem__(name) +"""todo define mapping here""" class String( @@ -146,12 +158,19 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'[a-z]', # noqa: E501 flags=re.I, ) +"""todo define mapping here""" Byte: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Binary: typing_extensions.TypeAlias = schemas.BinarySchema[U] +"""todo define mapping here""" Date: typing_extensions.TypeAlias = schemas.DateSchema[U] +"""todo define mapping here""" DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] +"""todo define mapping here""" Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] +"""todo define mapping here""" UuidNoExample: typing_extensions.TypeAlias = schemas.UUIDSchema[U] +"""todo define mapping here""" class Password( @@ -167,6 +186,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'password' max_length: int = 64 min_length: int = 10 +"""todo define mapping here""" class PatternWithDigits( @@ -182,6 +202,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^\d{10}$' # noqa: E501 ) +"""todo define mapping here""" class PatternWithDigitsAndDelimiter( @@ -198,6 +219,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'^image_\d{1,3}$', # noqa: E501 flags=re.I, ) +"""todo define mapping here""" NoneProp: typing_extensions.TypeAlias = schemas.NoneSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -225,126 +247,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "byte": typing.Union[ - Byte[str], - str - ], - "date": typing.Union[ - Date[str], - str, - datetime.date - ], - "number": typing.Union[ - Number[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "password": typing.Union[ - Password[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "integer": typing.Union[ - Integer[decimal.Decimal], - decimal.Decimal, - int - ], - "int32": typing.Union[ - Int32[decimal.Decimal], - decimal.Decimal, - int - ], - "int32withValidations": typing.Union[ - Int32withValidations[decimal.Decimal], - decimal.Decimal, - int - ], - "int64": typing.Union[ - Int64[decimal.Decimal], - decimal.Decimal, - int - ], - "float": typing.Union[ - _Float[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "float32": typing.Union[ - Float32[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "double": typing.Union[ - Double[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "float64": typing.Union[ - Float64[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "arrayWithUniqueItems": typing.Union[ - ArrayWithUniqueItems[tuple], - list, - tuple - ], - "string": typing.Union[ - String[str], - str - ], - "binary": typing.Union[ - Binary[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - "dateTime": typing.Union[ - DateTime[str], - str, - datetime.datetime - ], - "uuid": typing.Union[ - Uuid[str], - str, - uuid.UUID - ], - "uuidNoExample": typing.Union[ - UuidNoExample[str], - str, - uuid.UUID - ], - "pattern_with_digits": typing.Union[ - PatternWithDigits[str], - str - ], - "pattern_with_digits_and_delimiter": typing.Union[ - PatternWithDigitsAndDelimiter[str], - str - ], - "noneProp": typing.Union[ - NoneProp[schemas.NoneClass], - None - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 5854cf4ad45..1f0ee90237b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Data: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.IntSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,21 +21,7 @@ "id": typing.Type[Id], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "data": typing.Union[ - Data[str], - str - ], - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) +"""todo define mapping here""" class FromSchema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 90dc0e20fdf..4b821ce075e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" Color: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +20,7 @@ "color": typing.Type[Color], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "color": typing.Union[ - Color[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Fruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 37abb7ef3aa..6dc58a05ea2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -10,7 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class FruitReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index 9e407fe0a4f..22bfc175192 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" Color: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +20,7 @@ "color": typing.Type[Color], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "color": typing.Union[ - Color[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class GmFruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 52217a915f5..3c168e83602 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" PetType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,15 +18,7 @@ "pet_type": typing.Type[PetType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "pet_type": typing.Union[ - PetType[str], - str - ], - } -) +"""todo define mapping here""" class GrandparentAnimal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index 0036face217..e8b0948da5c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Bar: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Foo: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,20 +21,7 @@ "foo": typing.Type[Foo], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "bar": typing.Union[ - Bar[str], - str - ], - "foo": typing.Union[ - Foo[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class HasOnlyReadOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 1568ef8d838..bfb5a466616 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class NullableMessage( @@ -63,20 +64,7 @@ def __new__( "NullableMessage": typing.Type[NullableMessage], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "NullableMessage": typing.Union[ - NullableMessage[typing.Union[ - schemas.NoneClass, - str - ]], - None, - str - ], - }, - total=False -) +"""todo define mapping here""" class HealthCheckResult( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py index ffdb3682e9c..58ac1cd04fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py index 5bc35b3ff36..d14c7c84319 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerEnumBig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py index 6d6de983418..b719a30954d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerEnumOneValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py index fc043b6aac4..8f2e59809bf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerEnumWithDefaultValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py index 1577a992b9c..d4d337e576d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerMax10( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py index 3450802af3f..255797baa66 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class IntegerMin15( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index d362ca43ccb..5e981c9b4b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class TriangleType( @@ -37,16 +39,7 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "triangleType": typing.Union[ - TriangleType[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -103,6 +96,7 @@ def __new__( ) return inst +"""todo define mapping here""" class IsoscelesTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index c173929681a..95bc41a2850 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" class Items( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 916f26c158b..efa51d2eade 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -10,6 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Items( @@ -61,6 +65,7 @@ def __new__( ) return inst +"""todo define mapping here""" class JSONPatchRequest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index f4b965d3707..53eb2ef4512 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -11,8 +11,11 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Value: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 4fd56649412..73d95787161 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -11,8 +11,11 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" _From: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index baddbcc6b4a..1ca5c52e2ca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -11,7 +11,9 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 398d796b5dd..2731720e938 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -10,6 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Mammal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index af74ac94bb7..7828a3690d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties2: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class AdditionalProperties( @@ -49,6 +51,7 @@ def __new__( ) return inst +"""todo define mapping here""" class MapMapOfString( @@ -88,6 +91,7 @@ def __new__( ) return inst +"""todo define mapping here""" class AdditionalProperties3( @@ -114,6 +118,7 @@ def UPPER(cls) -> AdditionalProperties3[str]: @schemas.classproperty def LOWER(cls) -> AdditionalProperties3[str]: return cls("lower") # type: ignore +"""todo define mapping here""" class MapOfEnumString( @@ -152,7 +157,9 @@ def __new__( ) return inst +"""todo define mapping here""" AdditionalProperties4: typing_extensions.TypeAlias = schemas.BoolSchema[U] +"""todo define mapping here""" class DirectMap( @@ -191,6 +198,8 @@ def __new__( ) return inst +"""todo define mapping here""" +"""todo define mapping here""" class MapTest( @@ -275,29 +284,3 @@ def __new__( "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "map_map_of_string": typing.Union[ - MapMapOfString[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "map_of_enum_string": typing.Union[ - MapOfEnumString[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "direct_map": typing.Union[ - DirectMap[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "indirect_map": typing.Union[ - string_boolean_map.StringBooleanMap[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 273c3e9c5fd..1719e907aa1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -10,8 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] +"""todo define mapping here""" DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" class Map( @@ -75,27 +79,7 @@ def __new__( "map": typing.Type[Map], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "uuid": typing.Union[ - Uuid[str], - str, - uuid.UUID - ], - "dateTime": typing.Union[ - DateTime[str], - str, - datetime.datetime - ], - "map": typing.Union[ - Map[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) +"""todo define mapping here""" class MixedPropertiesAndAdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index 5e0d2ec7857..846b9d6c5db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -10,7 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Amount: typing_extensions.TypeAlias = schemas.DecimalSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" class Money( @@ -97,16 +100,3 @@ def __new__( "currency": typing.Type[currency.Currency], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "amount": typing.Union[ - Amount[str], - str - ], - "currency": typing.Union[ - currency.Currency[str], - str - ], - } -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index ba5981cee8d..a9239306dcf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -10,8 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" _Property: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,35 +24,7 @@ "property": typing.Type[_Property], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "name": typing.Union[ - Name[decimal.Decimal], - decimal.Decimal, - int - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "snake_case": typing.Union[ - SnakeCase[decimal.Decimal], - decimal.Decimal, - int - ], - "property": typing.Union[ - _Property[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 7ba083a24de..81074028323 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -11,7 +11,9 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" PetId: typing_extensions.TypeAlias = schemas.Int64Schema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 6e629787118..3b2328d4d67 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class AdditionalProperties4( @@ -58,6 +59,7 @@ def __new__( ) return inst +"""todo define mapping here""" class IntegerProp( @@ -107,6 +109,7 @@ def __new__( ) return inst +"""todo define mapping here""" class NumberProp( @@ -156,6 +159,7 @@ def __new__( ) return inst +"""todo define mapping here""" class BooleanProp( @@ -203,6 +207,7 @@ def __new__( ) return inst +"""todo define mapping here""" class StringProp( @@ -250,6 +255,7 @@ def __new__( ) return inst +"""todo define mapping here""" class DateProp( @@ -300,6 +306,7 @@ def __new__( ) return inst +"""todo define mapping here""" class DatetimeProp( @@ -350,7 +357,9 @@ def __new__( ) return inst +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" class ArrayNullableProp( @@ -400,6 +409,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Items2( @@ -448,6 +458,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ArrayAndItemsNullableProp( @@ -497,6 +508,7 @@ def __new__( ) return inst +"""todo define mapping here""" class Items3( @@ -545,6 +557,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ArrayItemsNullable( @@ -589,7 +602,9 @@ def __getitem__(self, name: int) -> Items3[typing.Union[ ]]: return super().__getitem__(name) +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" class ObjectNullableProp( @@ -643,6 +658,7 @@ def __new__( ) return inst +"""todo define mapping here""" class AdditionalProperties2( @@ -691,6 +707,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ObjectAndItemsNullableProp( @@ -747,6 +764,7 @@ def __new__( ) return inst +"""todo define mapping here""" class AdditionalProperties3( @@ -795,6 +813,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ObjectItemsNullable( @@ -858,111 +877,7 @@ def __new__( "object_items_nullable": typing.Type[ObjectItemsNullable], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "integer_prop": typing.Union[ - IntegerProp[typing.Union[ - schemas.NoneClass, - decimal.Decimal - ]], - None, - decimal.Decimal, - int - ], - "number_prop": typing.Union[ - NumberProp[typing.Union[ - schemas.NoneClass, - decimal.Decimal - ]], - None, - decimal.Decimal, - int, - float - ], - "boolean_prop": typing.Union[ - BooleanProp[typing.Union[ - schemas.NoneClass, - schemas.BoolClass - ]], - None, - bool - ], - "string_prop": typing.Union[ - StringProp[typing.Union[ - schemas.NoneClass, - str - ]], - None, - str - ], - "date_prop": typing.Union[ - DateProp[typing.Union[ - schemas.NoneClass, - str - ]], - None, - str, - datetime.date - ], - "datetime_prop": typing.Union[ - DatetimeProp[typing.Union[ - schemas.NoneClass, - str - ]], - None, - str, - datetime.datetime - ], - "array_nullable_prop": typing.Union[ - ArrayNullableProp[typing.Union[ - schemas.NoneClass, - tuple - ]], - None, - list, - tuple - ], - "array_and_items_nullable_prop": typing.Union[ - ArrayAndItemsNullableProp[typing.Union[ - schemas.NoneClass, - tuple - ]], - None, - list, - tuple - ], - "array_items_nullable": typing.Union[ - ArrayItemsNullable[tuple], - list, - tuple - ], - "object_nullable_prop": typing.Union[ - ObjectNullableProp[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ], - "object_and_items_nullable_prop": typing.Union[ - ObjectAndItemsNullableProp[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ], - "object_items_nullable": typing.Union[ - ObjectItemsNullable[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) +"""todo define mapping here""" class NullableClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 7bc3f52e136..e8924257915 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -10,7 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" class NullableShape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index 24112af86f4..46df2a3bdcc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class NullableString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py index 286584e8a0d..564f5d7fec5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Number: typing_extensions.TypeAlias = schemas.NumberSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 3d68c4ef947..ce12ba49ea6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" JustNumber: typing_extensions.TypeAlias = schemas.NumberSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,18 +18,7 @@ "JustNumber": typing.Type[JustNumber], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "JustNumber": typing.Union[ - JustNumber[decimal.Decimal], - decimal.Decimal, - int, - float - ], - }, - total=False -) +"""todo define mapping here""" class NumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py index 3124211076b..8816ea61e02 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class NumberWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index ad92489aa45..de1068704b6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" A: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,15 +19,7 @@ "a": typing.Type[A], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "a": typing.Union[ - A[str], - str - ], - } -) +"""todo define mapping here""" class ObjWithRequiredProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index c17271de1be..a000fd62f32 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" B: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,15 +18,7 @@ "b": typing.Type[B], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "b": typing.Union[ - B[str], - str - ], - } -) +"""todo define mapping here""" class ObjWithRequiredPropsBase( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py index 1a3c6279e36..646f376fb18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" ObjectInterface: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 5c4159ab8c6..77ce442bbab 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Arg: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Args: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,19 +21,7 @@ "args": typing.Type[Args], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "arg": typing.Union[ - Arg[str], - str - ], - "args": typing.Union[ - Args[str], - str - ], - } -) +"""todo define mapping here""" class ObjectModelWithArgAndArgsProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index dc1deee095d..400d51ff0b4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -10,6 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class ObjectModelWithRefProps( @@ -93,23 +97,3 @@ def __new__( "myBoolean": typing.Type[boolean.Boolean], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "myNumber": typing.Union[ - number_with_validations.NumberWithValidations[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "myString": typing.Union[ - string.String[str], - str - ], - "myBoolean": typing.Union[ - boolean.Boolean[schemas.BoolClass], - bool - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 7ab28493bad..b13bde9aee2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,53 +19,7 @@ "name": typing.Type[Name], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "test": typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "name": typing.Union[ - Name[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class _1( @@ -149,6 +105,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 95ecf44a819..9d4252a9cfe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" SomeProp: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" Someprop: typing_extensions.TypeAlias = schemas.DictSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,22 +21,7 @@ "someprop": typing.Type[Someprop], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "someProp": typing.Union[ - SomeProp[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "someprop": typing.Union[ - Someprop[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) +"""todo define mapping here""" class ObjectWithCollidingProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index e75438bb004..5033a05b0db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -10,7 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" Width: typing_extensions.TypeAlias = schemas.DecimalSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" class ObjectWithDecimalProperties( @@ -91,22 +95,3 @@ def __new__( "cost": typing.Type[money.Money], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "length": typing.Union[ - decimal_payload.DecimalPayload[str], - str - ], - "width": typing.Union[ - Width[str], - str - ], - "cost": typing.Union[ - money.Money[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 0c1023633e6..2c4c864b1f5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -10,8 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" SpecialPropertyName: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" _123List: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" _123Number: typing_extensions.TypeAlias = schemas.IntSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,35 +24,7 @@ "123Number": typing.Type[_123Number], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "123-list": typing.Union[ - _123List[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "$special[property.name]": typing.Union[ - SpecialPropertyName[decimal.Decimal], - decimal.Decimal, - int - ], - "123Number": typing.Union[ - _123Number[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 8c8859cbb11..5e005daa497 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class SomeProp( @@ -83,33 +85,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "someProp": typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class ObjectWithInlineCompositionProperty( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index d04148709ba..e994ad8f4d9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class ObjectWithInvalidNamedRefedProperties( @@ -89,18 +92,3 @@ def __new__( "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "!reference": typing.Union[ - array_with_validations_in_items.ArrayWithValidationsInItems[tuple], - list, - tuple - ], - "from": typing.Union[ - from_schema.FromSchema[frozendict.frozendict], - dict, - frozendict.frozendict - ], - } -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 92aee02f824..102be9a4f89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Test: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "test": typing.Type[Test], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "test": typing.Union[ - Test[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class ObjectWithOptionalTestProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 96c73b2795e..d2aaedeb2cd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class ObjectWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index a1be23e30a4..14807406e65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -10,10 +10,15 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" PetId: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" Quantity: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" ShipDate: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] +"""todo define mapping here""" class Status( @@ -45,6 +50,7 @@ def APPROVED(cls) -> Status[str]: @schemas.classproperty def DELIVERED(cls) -> Status[str]: return cls("delivered") # type: ignore +"""todo define mapping here""" class Complete( @@ -69,40 +75,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "complete": typing.Type[Complete], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - "petId": typing.Union[ - PetId[decimal.Decimal], - decimal.Decimal, - int - ], - "quantity": typing.Union[ - Quantity[decimal.Decimal], - decimal.Decimal, - int - ], - "shipDate": typing.Union[ - ShipDate[str], - str, - datetime.datetime - ], - "status": typing.Union[ - Status[str], - str - ], - "complete": typing.Union[ - Complete[schemas.BoolClass], - bool - ], - }, - total=False -) +"""todo define mapping here""" class Order( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index c62530ee4e9..66397d241f8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class ParentPet( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index ea36e81a912..6e58425ed19 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -10,9 +10,14 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class PhotoUrls( @@ -49,6 +54,8 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) +"""todo define mapping here""" +"""todo define mapping here""" class Tags( @@ -86,6 +93,7 @@ def __new__( def __getitem__(self, name: int) -> tag.Tag[frozendict.frozendict]: return super().__getitem__(name) +"""todo define mapping here""" class Status( @@ -117,20 +125,7 @@ def PENDING(cls) -> Status[str]: @schemas.classproperty def SOLD(cls) -> Status[str]: return cls("sold") # type: ignore -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "name": typing.Union[ - Name[str], - str - ], - "photoUrls": typing.Union[ - PhotoUrls[tuple], - list, - tuple - ], - } -) +"""todo define mapping here""" class Pet( @@ -240,32 +235,3 @@ def __new__( "status": typing.Type[Status], } ) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - "category": typing.Union[ - category.Category[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "tags": typing.Union[ - Tags[tuple], - list, - tuple - ], - "status": typing.Union[ - Status[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index 48ca691cb40..f58a2a5f880 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Pig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index fb5e776d951..5738f4d41e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -10,7 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" class Player( @@ -85,18 +88,3 @@ def __new__( "enemyPlayer": typing.Type[Player], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "name": typing.Union[ - Name[str], - str - ], - "enemyPlayer": typing.Union[ - Player[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 00cf4dd2209..25fdc9ce65f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Quadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 2153a7e126d..3f51bb390ec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class ShapeType( @@ -31,6 +32,7 @@ class Schema_(metaclass=schemas.SingletonMeta): @schemas.classproperty def QUADRILATERAL(cls) -> ShapeType[str]: return cls("Quadrilateral") # type: ignore +"""todo define mapping here""" QuadrilateralType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -39,19 +41,7 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "quadrilateralType": typing.Union[ - QuadrilateralType[str], - str - ], - "shapeType": typing.Union[ - ShapeType[str], - str - ], - } -) +"""todo define mapping here""" class QuadrilateralInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index ff406478aa9..51913c83627 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Bar: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Baz: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,20 +21,7 @@ "baz": typing.Type[Baz], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "bar": typing.Union[ - Bar[str], - str - ], - "baz": typing.Union[ - Baz[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class ReadOnlyFirst( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 9cc6d7e81dd..754fb1e5645 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -10,20 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "invalid-name": typing.Union[ - AdditionalProperties[str], - str - ], - "validName": typing.Union[ - AdditionalProperties[str], - str - ], - } -) +"""todo define mapping here""" class ReqPropsFromExplicitAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 3d69449dc72..844e41cf030 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -10,54 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "invalid-name": typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "validName": typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - } -) +"""todo define mapping here""" class ReqPropsFromTrueAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index 7468a125c13..c25a2b302dc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,67 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "invalid-name": typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "validName": typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - frozendict.frozendict, - str, - decimal.Decimal, - schemas.BoolClass, - schemas.NoneClass, - tuple, - bytes, - schemas.FileIO - ]], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - } -) +"""todo define mapping here""" class ReqPropsFromUnsetAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 786cba2fb65..79d26566192 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class TriangleType( @@ -37,16 +39,7 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "triangleType": typing.Union[ - TriangleType[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -103,6 +96,7 @@ def __new__( ) return inst +"""todo define mapping here""" class ScaleneTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index 9373e77a05d..0b78bde681e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class SelfReferencingArrayModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 730ebd0ae10..6c6021708bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class SelfReferencingObjectModel( @@ -69,14 +72,3 @@ def __new__( "selfRef": typing.Type[SelfReferencingObjectModel], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "selfRef": typing.Union[ - SelfReferencingObjectModel[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index b20b0bef294..004201231cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -10,6 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Shape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 6fd7927d42e..2d2826c12cf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -10,7 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class ShapeOrNull( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 5900b2d64c5..a37534cb67c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class QuadrilateralType( @@ -37,16 +39,7 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "quadrilateralType": typing.Union[ - QuadrilateralType[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class _1( @@ -103,6 +96,7 @@ def __new__( ) return inst +"""todo define mapping here""" class SimpleQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index cf8f767c634..c9d06ab8efb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class SomeObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 1c195312e4e..3dd16a5e843 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" A: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "a": typing.Type[A], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "a": typing.Union[ - A[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class SpecialModelName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py index 0320d99e128..e3cba117b56 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" String: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index 43703f2e993..60f4d56b2f8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] +"""todo define mapping here""" class StringBooleanMap( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index 2aa895efdec..968512e8921 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class StringEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py index b095711545d..f1868dedacc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class StringEnumWithDefaultValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py index 92bddce0b54..cbfb66e87cf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class StringWithValidation( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index ed9154ddef5..f19aeac5d73 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,21 +21,7 @@ "name": typing.Type[Name], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - "name": typing.Union[ - Name[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Tag( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index 3673f084a5a..bb37411bb89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -10,6 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" +"""todo define mapping here""" class Triangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index fd43ff3af34..c00cb0ecb96 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class ShapeType( @@ -31,6 +32,7 @@ class Schema_(metaclass=schemas.SingletonMeta): @schemas.classproperty def TRIANGLE(cls) -> ShapeType[str]: return cls("Triangle") # type: ignore +"""todo define mapping here""" TriangleType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -39,19 +41,7 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "shapeType": typing.Union[ - ShapeType[str], - str - ], - "triangleType": typing.Union[ - TriangleType[str], - str - ], - } -) +"""todo define mapping here""" class TriangleInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 9e761f6dc9a..e08954044de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -10,15 +10,25 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" Username: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" FirstName: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" LastName: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Email: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Password: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Phone: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" UserStatus: typing_extensions.TypeAlias = schemas.Int32Schema[U] +"""todo define mapping here""" ObjectWithNoDeclaredProps: typing_extensions.TypeAlias = schemas.DictSchema[U] +"""todo define mapping here""" class ObjectWithNoDeclaredPropsNullable( @@ -67,8 +77,11 @@ def __new__( ) return inst +"""todo define mapping here""" AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" _Not: typing_extensions.TypeAlias = schemas.NoneSchema[U] +"""todo define mapping here""" class AnyTypeExceptNullProp( @@ -120,6 +133,7 @@ def __new__( ) return inst +"""todo define mapping here""" AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -139,123 +153,7 @@ def __new__( "anyTypePropNullable": typing.Type[AnyTypePropNullable], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "id": typing.Union[ - Id[decimal.Decimal], - decimal.Decimal, - int - ], - "username": typing.Union[ - Username[str], - str - ], - "firstName": typing.Union[ - FirstName[str], - str - ], - "lastName": typing.Union[ - LastName[str], - str - ], - "email": typing.Union[ - Email[str], - str - ], - "password": typing.Union[ - Password[str], - str - ], - "phone": typing.Union[ - Phone[str], - str - ], - "userStatus": typing.Union[ - UserStatus[decimal.Decimal], - decimal.Decimal, - int - ], - "objectWithNoDeclaredProps": typing.Union[ - ObjectWithNoDeclaredProps[frozendict.frozendict], - dict, - frozendict.frozendict - ], - "objectWithNoDeclaredPropsNullable": typing.Union[ - ObjectWithNoDeclaredPropsNullable[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ], - "anyTypeProp": typing.Union[ - AnyTypeProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "anyTypeExceptNullProp": typing.Union[ - AnyTypeExceptNullProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - "anyTypePropNullable": typing.Union[ - AnyTypePropNullable[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class User( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py index e73573753c9..54762036c6c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class UUIDString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 603ddbc4519..8650c81297c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -10,8 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" HasBaleen: typing_extensions.TypeAlias = schemas.BoolSchema[U] +"""todo define mapping here""" HasTeeth: typing_extensions.TypeAlias = schemas.BoolSchema[U] +"""todo define mapping here""" class ClassName( @@ -41,33 +44,7 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "className": typing.Union[ - ClassName[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "hasBaleen": typing.Union[ - HasBaleen[schemas.BoolClass], - bool - ], - "hasTeeth": typing.Union[ - HasTeeth[schemas.BoolClass], - bool - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index edcd952cf25..a7274c14b4d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +"""todo define mapping here""" class Type( @@ -42,6 +44,7 @@ def MOUNTAIN(cls) -> Type[str]: @schemas.classproperty def GREVYS(cls) -> Type[str]: return cls("grevys") # type: ignore +"""todo define mapping here""" class ClassName( @@ -70,29 +73,7 @@ def ZEBRA(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "className": typing.Union[ - ClassName[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "type": typing.Union[ - Type[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Zebra( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py index beefb32f1d0..4fb508ec95c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py index beefb32f1d0..4fb508ec95c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 8017187a20e..43f0dd4de7d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Items( @@ -37,6 +38,7 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py index 7a71abacd02..ae1a7a58cd8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 8017187a20e..43f0dd4de7d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Items( @@ -37,6 +38,7 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py index 7a71abacd02..ae1a7a58cd8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py index 9a0a26920d0..077435912c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py index c4ee010af0c..bfc8f0c77bf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 62ea1688a61..1fb7ba7e708 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Items( @@ -37,6 +38,7 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore +"""todo define mapping here""" class EnumFormStringArray( @@ -73,6 +75,7 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) +"""todo define mapping here""" class EnumFormString( @@ -112,21 +115,7 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: "enum_form_string": typing.Type[EnumFormString], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "enum_form_string_array": typing.Union[ - EnumFormStringArray[tuple], - list, - tuple - ], - "enum_form_string": typing.Union[ - EnumFormString[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py index b8bcb2051e9..01b4dbc9104 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 3f3a94cb096..389e541e926 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Integer( @@ -25,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int' inclusive_maximum: typing.Union[int, float] = 100 inclusive_minimum: typing.Union[int, float] = 10 +"""todo define mapping here""" class Int32( @@ -40,7 +42,9 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int32' inclusive_maximum: typing.Union[int, float] = 200 inclusive_minimum: typing.Union[int, float] = 20 +"""todo define mapping here""" Int64: typing_extensions.TypeAlias = schemas.Int64Schema[U] +"""todo define mapping here""" class Number( @@ -55,6 +59,7 @@ class Schema_(metaclass=schemas.SingletonMeta): }) inclusive_maximum: typing.Union[int, float] = 543.2 inclusive_minimum: typing.Union[int, float] = 32.1 +"""todo define mapping here""" class _Float( @@ -69,6 +74,7 @@ class Schema_(metaclass=schemas.SingletonMeta): }) format: str = 'float' inclusive_maximum: typing.Union[int, float] = 987.6 +"""todo define mapping here""" class Double( @@ -84,6 +90,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'double' inclusive_maximum: typing.Union[int, float] = 123.4 inclusive_minimum: typing.Union[int, float] = 67.8 +"""todo define mapping here""" class String( @@ -100,6 +107,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'[a-z]', # noqa: E501 flags=re.I, ) +"""todo define mapping here""" class PatternWithoutDelimiter( @@ -115,9 +123,13 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^[A-Z].*' # noqa: E501 ) +"""todo define mapping here""" Byte: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Binary: typing_extensions.TypeAlias = schemas.BinarySchema[U] +"""todo define mapping here""" Date: typing_extensions.TypeAlias = schemas.DateSchema[U] +"""todo define mapping here""" class DateTime( @@ -131,6 +143,7 @@ class Schema_(metaclass=schemas.SingletonMeta): str, }) format: str = 'date-time' +"""todo define mapping here""" class Password( @@ -146,6 +159,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'password' max_length: int = 64 min_length: int = 10 +"""todo define mapping here""" Callback: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -166,90 +180,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "byte": typing.Union[ - Byte[str], - str - ], - "double": typing.Union[ - Double[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "number": typing.Union[ - Number[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "pattern_without_delimiter": typing.Union[ - PatternWithoutDelimiter[str], - str - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "integer": typing.Union[ - Integer[decimal.Decimal], - decimal.Decimal, - int - ], - "int32": typing.Union[ - Int32[decimal.Decimal], - decimal.Decimal, - int - ], - "int64": typing.Union[ - Int64[decimal.Decimal], - decimal.Decimal, - int - ], - "float": typing.Union[ - _Float[decimal.Decimal], - decimal.Decimal, - int, - float - ], - "string": typing.Union[ - String[str], - str - ], - "binary": typing.Union[ - Binary[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - "date": typing.Union[ - Date[str], - str, - datetime.date - ], - "dateTime": typing.Union[ - DateTime[str], - str, - datetime.datetime - ], - "password": typing.Union[ - Password[str], - str - ], - "callback": typing.Union[ - Callback[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 64db42e7c28..993db82b06a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index 1ed2dbac7a4..d67d308aed1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 886bc3d3ab5..8b3219ff80f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class SomeProp( @@ -83,33 +85,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "someProp": typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index 1ed2dbac7a4..d67d308aed1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 886bc3d3ab5..8b3219ff80f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class SomeProp( @@ -83,33 +85,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "someProp": typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index 1ed2dbac7a4..d67d308aed1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 886bc3d3ab5..8b3219ff80f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class _0( @@ -26,6 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +"""todo define mapping here""" class SomeProp( @@ -83,33 +85,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "someProp": typing.Union[ - SomeProp[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index e509da1c806..19d255201cd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Param: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Param2: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,19 +21,7 @@ "param2": typing.Type[Param2], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "param": typing.Union[ - Param[str], - str - ], - "param2": typing.Union[ - Param2[str], - str - ], - } -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index fc33a4b288f..609a35d5eee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Keyword: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,16 +18,7 @@ "keyword": typing.Type[Keyword], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "keyword": typing.Union[ - Keyword[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index ecc5d7d8b47..09171e671ee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" RequiredFile: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,31 +21,7 @@ "requiredFile": typing.Type[RequiredFile], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "requiredFile": typing.Union[ - RequiredFile[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "additionalMetadata": typing.Union[ - AdditionalMetadata[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py index 2d4bbce1d22..04fa8dc32f1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.BinarySchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py index 2d4bbce1d22..04fa8dc32f1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.BinarySchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 6f0c4f25558..7da3f9f0932 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" File: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,31 +21,7 @@ "file": typing.Type[File], } ) -RequiredDictInput = typing_extensions.TypedDict( - 'RequiredDictInput', - { - "file": typing.Union[ - File[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - } -) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "additionalMetadata": typing.Union[ - AdditionalMetadata[str], - str - ], - }, - total=False -) - - -class DictInput(RequiredDictInput, OptionalDictInput): - pass +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 74099b6edc7..a9e2a55aafc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.BinarySchema[U] +"""todo define mapping here""" class Files( @@ -55,17 +57,7 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: "files": typing.Type[Files], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "files": typing.Union[ - Files[tuple], - list, - tuple - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py index 072e994d56d..dfccd99523e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 753dd8038ef..9a3d6b0603d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" +"""todo define mapping here""" class Schema( @@ -74,14 +76,3 @@ def __new__( "string": typing.Type[foo.Foo], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "string": typing.Union[ - foo.Foo[frozendict.frozendict], - dict, - frozendict.frozendict - ], - }, - total=False -) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index c16851c05c0..a0d807b3f2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -7,6 +7,7 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" class Version( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index d0b062b4b28..df4b4a506cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Items( @@ -42,6 +43,7 @@ def PENDING(cls) -> Items[str]: @schemas.classproperty def SOLD(cls) -> Items[str]: return cls("sold") # type: ignore +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index c16851c05c0..a0d807b3f2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -7,6 +7,7 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" class Version( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index 872a0bd631a..c8725aeb3ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 151e112a450..b22e545d9df 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" Status: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,20 +21,7 @@ "status": typing.Type[Status], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "name": typing.Union[ - Name[str], - str - ], - "status": typing.Union[ - Status[str], - str - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py index db592ea3e5b..64736c889fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 1c143ec8f8d..d846b9451c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] +"""todo define mapping here""" File: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,22 +21,7 @@ "file": typing.Type[File], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', - { - "additionalMetadata": typing.Union[ - AdditionalMetadata[str], - str - ], - "file": typing.Union[ - File[typing.Union[bytes, schemas.FileIO]], - bytes, - io.FileIO, - io.BufferedReader - ], - }, - total=False -) +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py index 5bf2461e229..6ae59ad0d46 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py index 1f544f8f747..8d47affcad3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py index 6354f6d5744..5d7844f1ac1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py index 5af8b8a8ede..a2b686b0b4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int32Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 1112afc71d8..904b8ca75bd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -7,6 +7,7 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" class Server( @@ -39,6 +40,7 @@ def QA_HYPHEN_MINUS_PETSTORE(cls) -> Server[str]: @schemas.classproperty def DEV_HYPHEN_MINUS_PETSTORE(cls) -> Server[str]: return cls("dev-petstore") # type: ignore +"""todo define mapping here""" class Port( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 6ba3cc4062c..db45a812d0b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -7,6 +7,7 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +"""todo define mapping here""" class Version( From 7f0e206a5d6050d03daf76bc829ae58c464f77dc Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 9 Jun 2023 23:20:45 -0700 Subject: [PATCH 11/36] Tweaks when reqanoptprops are generated --- .../codegen/DefaultCodegen.java | 8 +- .../codegen/model/CodegenSchema.java | 2 +- .../content/application_json/schema.py | 1 - .../headers/header_number_header/schema.py | 1 - .../headers/header_string_header/schema.py | 1 - .../parameter_path_user_name/schema.py | 1 - .../content/application_json/schema.py | 2 - .../content/application_json/schema.py | 11 +-- .../headers/header_some_header/schema.py | 1 - .../content/application_json/schema.py | 2 - .../content/application_xml/schema.py | 2 - .../components/schema/_200_response.py | 3 - .../petstore_api/components/schema/_return.py | 2 - .../schema/abstract_step_message.py | 3 - .../schema/additional_properties_class.py | 73 ++++------------- .../schema/additional_properties_validator.py | 82 ++----------------- ...ditional_properties_with_array_of_enums.py | 12 +-- .../petstore_api/components/schema/address.py | 11 +-- .../petstore_api/components/schema/animal.py | 3 - .../components/schema/animal_farm.py | 2 - .../components/schema/any_type_and_format.py | 10 --- .../components/schema/any_type_not_string.py | 2 - .../components/schema/api_response.py | 4 - .../petstore_api/components/schema/apple.py | 3 - .../components/schema/apple_req.py | 2 - .../schema/array_holding_any_type.py | 2 - .../schema/array_of_array_of_number_only.py | 4 - .../components/schema/array_of_enums.py | 2 - .../components/schema/array_of_number_only.py | 3 - .../components/schema/array_test.py | 9 -- .../schema/array_with_validations_in_items.py | 2 - .../petstore_api/components/schema/banana.py | 2 - .../components/schema/banana_req.py | 2 - .../src/petstore_api/components/schema/bar.py | 1 - .../components/schema/basque_pig.py | 2 - .../petstore_api/components/schema/boolean.py | 1 - .../components/schema/boolean_enum.py | 1 - .../components/schema/capitalization.py | 7 -- .../src/petstore_api/components/schema/cat.py | 4 - .../components/schema/category.py | 3 - .../components/schema/child_cat.py | 4 - .../components/schema/class_model.py | 2 - .../petstore_api/components/schema/client.py | 2 - .../schema/complex_quadrilateral.py | 4 - ...d_any_of_different_types_no_validations.py | 18 ---- .../components/schema/composed_array.py | 2 - .../components/schema/composed_bool.py | 2 - .../components/schema/composed_none.py | 2 - .../components/schema/composed_number.py | 2 - .../components/schema/composed_object.py | 2 - .../schema/composed_one_of_different_types.py | 9 -- .../components/schema/composed_string.py | 2 - .../components/schema/currency.py | 1 - .../components/schema/danish_pig.py | 2 - .../components/schema/date_time_test.py | 1 - .../schema/date_time_with_validations.py | 1 - .../schema/date_with_validations.py | 1 - .../components/schema/decimal_payload.py | 1 - .../src/petstore_api/components/schema/dog.py | 4 - .../petstore_api/components/schema/drawing.py | 6 -- .../components/schema/enum_arrays.py | 4 - .../components/schema/enum_class.py | 1 - .../components/schema/enum_test.py | 10 --- .../components/schema/equilateral_triangle.py | 4 - .../petstore_api/components/schema/file.py | 2 - .../schema/file_schema_test_class.py | 4 - .../src/petstore_api/components/schema/foo.py | 2 - .../components/schema/format_test.py | 23 ------ .../components/schema/from_schema.py | 3 - .../petstore_api/components/schema/fruit.py | 4 - .../components/schema/fruit_req.py | 4 - .../components/schema/gm_fruit.py | 4 - .../components/schema/grandparent_animal.py | 2 - .../components/schema/has_only_read_only.py | 3 - .../components/schema/health_check_result.py | 2 - .../components/schema/integer_enum.py | 1 - .../components/schema/integer_enum_big.py | 1 - .../schema/integer_enum_one_value.py | 1 - .../schema/integer_enum_with_default_value.py | 1 - .../components/schema/integer_max10.py | 1 - .../components/schema/integer_min15.py | 1 - .../components/schema/isosceles_triangle.py | 4 - .../petstore_api/components/schema/items.py | 2 - .../components/schema/json_patch_request.py | 5 -- .../json_patch_request_add_replace_test.py | 3 - .../schema/json_patch_request_move_copy.py | 3 - .../schema/json_patch_request_remove.py | 2 - .../petstore_api/components/schema/mammal.py | 4 - .../components/schema/map_test.py | 44 +++------- ...perties_and_additional_properties_class.py | 32 +------- .../petstore_api/components/schema/money.py | 3 - .../petstore_api/components/schema/name.py | 4 - .../schema/no_additional_properties.py | 2 - .../components/schema/nullable_class.py | 32 +------- .../components/schema/nullable_shape.py | 4 - .../components/schema/nullable_string.py | 1 - .../petstore_api/components/schema/number.py | 1 - .../components/schema/number_only.py | 2 - .../schema/number_with_validations.py | 1 - .../schema/obj_with_required_props.py | 3 - .../schema/obj_with_required_props_base.py | 2 - .../components/schema/object_interface.py | 1 - ...ject_model_with_arg_and_args_properties.py | 3 - .../schema/object_model_with_ref_props.py | 4 - ..._with_req_test_prop_from_unset_add_prop.py | 4 - .../object_with_colliding_properties.py | 3 - .../schema/object_with_decimal_properties.py | 4 - .../object_with_difficultly_named_props.py | 4 - ...object_with_inline_composition_property.py | 3 - ...ect_with_invalid_named_refed_properties.py | 3 - .../schema/object_with_optional_test_prop.py | 2 - .../schema/object_with_validations.py | 1 - .../petstore_api/components/schema/order.py | 7 -- .../components/schema/parent_pet.py | 2 - .../src/petstore_api/components/schema/pet.py | 9 -- .../src/petstore_api/components/schema/pig.py | 3 - .../petstore_api/components/schema/player.py | 3 - .../components/schema/quadrilateral.py | 3 - .../schema/quadrilateral_interface.py | 3 - .../components/schema/read_only_first.py | 3 - .../req_props_from_explicit_add_props.py | 1 - .../schema/req_props_from_true_add_props.py | 1 - .../schema/req_props_from_unset_add_props.py | 1 - .../components/schema/scalene_triangle.py | 4 - .../schema/self_referencing_array_model.py | 2 - .../schema/self_referencing_object_model.py | 2 - .../petstore_api/components/schema/shape.py | 3 - .../components/schema/shape_or_null.py | 4 - .../components/schema/simple_quadrilateral.py | 4 - .../components/schema/some_object.py | 2 - .../components/schema/special_model_name.py | 2 - .../petstore_api/components/schema/string.py | 1 - .../components/schema/string_boolean_map.py | 10 +-- .../components/schema/string_enum.py | 1 - .../schema/string_enum_with_default_value.py | 1 - .../schema/string_with_validation.py | 1 - .../src/petstore_api/components/schema/tag.py | 3 - .../components/schema/triangle.py | 4 - .../components/schema/triangle_interface.py | 3 - .../petstore_api/components/schema/user.py | 15 ---- .../components/schema/uuid_string.py | 1 - .../petstore_api/components/schema/whale.py | 4 - .../petstore_api/components/schema/zebra.py | 3 - .../delete/parameters/parameter_0/schema.py | 1 - .../delete/parameters/parameter_1/schema.py | 1 - .../delete/parameters/parameter_2/schema.py | 1 - .../delete/parameters/parameter_3/schema.py | 1 - .../delete/parameters/parameter_4/schema.py | 1 - .../delete/parameters/parameter_5/schema.py | 1 - .../fake/get/parameters/parameter_0/schema.py | 2 - .../fake/get/parameters/parameter_1/schema.py | 1 - .../fake/get/parameters/parameter_2/schema.py | 2 - .../fake/get/parameters/parameter_3/schema.py | 1 - .../fake/get/parameters/parameter_4/schema.py | 1 - .../fake/get/parameters/parameter_5/schema.py | 1 - .../schema.py | 4 - .../content/application_json/schema.py | 1 - .../schema.py | 15 ---- .../put/parameters/parameter_0/schema.py | 1 - .../put/parameters/parameter_0/schema.py | 1 - .../put/parameters/parameter_1/schema.py | 1 - .../put/parameters/parameter_2/schema.py | 1 - .../delete/parameters/parameter_0/schema.py | 1 - .../content/application_json/schema.py | 10 +-- .../post/parameters/parameter_0/schema.py | 2 - .../post/parameters/parameter_1/schema.py | 3 - .../content/application_json/schema.py | 2 - .../content/multipart_form_data/schema.py | 3 - .../content/application_json/schema.py | 2 - .../content/multipart_form_data/schema.py | 3 - .../schema.py | 3 - .../application_json_charsetutf8/schema.py | 1 - .../application_json_charsetutf8/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../get/parameters/parameter_0/schema.py | 2 - .../post/parameters/parameter_0/schema.py | 1 - .../post/parameters/parameter_1/schema.py | 1 - .../post/parameters/parameter_10/schema.py | 1 - .../post/parameters/parameter_11/schema.py | 1 - .../post/parameters/parameter_12/schema.py | 1 - .../post/parameters/parameter_13/schema.py | 1 - .../post/parameters/parameter_14/schema.py | 1 - .../post/parameters/parameter_15/schema.py | 1 - .../post/parameters/parameter_16/schema.py | 1 - .../post/parameters/parameter_17/schema.py | 1 - .../post/parameters/parameter_18/schema.py | 1 - .../post/parameters/parameter_2/schema.py | 1 - .../post/parameters/parameter_3/schema.py | 1 - .../post/parameters/parameter_4/schema.py | 1 - .../post/parameters/parameter_5/schema.py | 1 - .../post/parameters/parameter_6/schema.py | 1 - .../post/parameters/parameter_7/schema.py | 1 - .../post/parameters/parameter_8/schema.py | 1 - .../post/parameters/parameter_9/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../post/parameters/parameter_0/schema.py | 1 - .../content/multipart_form_data/schema.py | 3 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../put/parameters/parameter_0/schema.py | 2 - .../put/parameters/parameter_1/schema.py | 2 - .../put/parameters/parameter_2/schema.py | 2 - .../put/parameters/parameter_3/schema.py | 2 - .../put/parameters/parameter_4/schema.py | 2 - .../application_octet_stream/schema.py | 1 - .../application_octet_stream/schema.py | 1 - .../content/multipart_form_data/schema.py | 3 - .../content/multipart_form_data/schema.py | 3 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_json/schema.py | 2 - .../paths/foo/get/servers/server_1.py | 1 - .../get/parameters/parameter_0/schema.py | 2 - .../pet_find_by_status/servers/server_1.py | 1 - .../get/parameters/parameter_0/schema.py | 2 - .../delete/parameters/parameter_0/schema.py | 1 - .../delete/parameters/parameter_1/schema.py | 1 - .../get/parameters/parameter_0/schema.py | 1 - .../post/parameters/parameter_0/schema.py | 1 - .../schema.py | 3 - .../post/parameters/parameter_0/schema.py | 1 - .../content/multipart_form_data/schema.py | 3 - .../delete/parameters/parameter_0/schema.py | 1 - .../get/parameters/parameter_0/schema.py | 1 - .../get/parameters/parameter_0/schema.py | 1 - .../get/parameters/parameter_1/schema.py | 1 - .../content/application_json/schema.py | 1 - .../content/application_xml/schema.py | 1 - .../headers/header_x_expires_after/schema.py | 1 - .../content/application_json/schema.py | 1 - .../src/petstore_api/servers/server_0.py | 2 - .../src/petstore_api/servers/server_1.py | 1 - 239 files changed, 69 insertions(+), 813 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index 1393b5fb48e..0bf789483ab 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -430,6 +430,8 @@ public void processOpts() { this.setEnumUnknownDefaultCase(Boolean.parseBoolean(additionalProperties .get(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE).toString())); } + requiredAddPropUnsetSchema = fromSchema(new Schema(), null, null); + } /*** @@ -1560,7 +1562,7 @@ public String toModelName(final String name, String jsonPath) { Map codegenParameterCache = new HashMap<>(); HashMap> sourceJsonPathToKeyToQty = new HashMap<>(); Map codegenTagCache = new HashMap<>(); - private final CodegenSchema requiredAddPropUnsetSchema = fromSchema(new Schema(), null, null); + private CodegenSchema requiredAddPropUnsetSchema = null; protected void updateModelForComposedSchema(CodegenSchema m, Schema schema, String sourceJsonPath) { final ComposedSchema composed = (ComposedSchema) schema; @@ -2302,6 +2304,10 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ property.requiredAndOptionalProperties = reqAndOptionalProps; CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); property.requiredAndOptionalProperties.setJsonPathPiece(jsonPathPiece); + } else if (property.additionalProperties != null && !property.additionalProperties.isBooleanSchemaFalse && sourceJsonPath != null) { + property.requiredAndOptionalProperties = reqAndOptionalProps; + CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); + property.requiredAndOptionalProperties.setJsonPathPiece(jsonPathPiece); } // end of properties that need to be ordered to set correct camelCase jsonPathPieces diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index 9ec81730838..c06b50e0853 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -246,7 +246,7 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL boolean typedDictReqAndOptional = ( requiredProperties != null && optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse ); - if (typedDictReqAndOptional || !additionalPropertiesIsBooleanSchemaFalse) { + if (typedDictReqAndOptional || (additionalProperties != null && !additionalProperties.isBooleanSchemaFalse)) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "propertiesInputType"; extraSchema.optionalProperties = optionalProperties; diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py index a2b686b0b4a..5af8b8a8ede 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int32Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py index dc58c8056f0..e394930dca7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_number_header/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DecimalSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/headers/header_string_header/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/parameters/parameter_path_user_name/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index 398c0c7a7fb..0b305f816fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index faa90a872ca..2d6cbf957db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.Int32Schema[U] """todo define mapping here""" @@ -31,13 +30,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[decimal.Decimal], - decimal.Decimal, - int - ] + arg_: typing.Union[ + DictInput, + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index 50f5571f779..0810c0c68e0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index dc0d071a63c..d8b4895eba5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 25daf316881..e7e37ece058 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" _Class: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "class": typing.Type[_Class], } ) -"""todo define mapping here""" class _200Response( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 7723b7c2a1f..1f3e8c07b89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _Return: typing_extensions.TypeAlias = schemas.Int32Schema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "return": typing.Type[_Return], } ) -"""todo define mapping here""" class _Return( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index 9f90347523c..db1006fba16 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Discriminator: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "discriminator": typing.Type[Discriminator], } ) -"""todo define mapping here""" class AbstractStepMessage( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index cb8b7fe1741..084d1b88e8b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" @@ -31,12 +30,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[str], - str - ] + arg_: typing.Union[ + DictInput, + MapProperty[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapProperty[frozendict.frozendict]: @@ -51,7 +47,6 @@ def __new__( ) return inst -"""todo define mapping here""" AdditionalProperties3: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" @@ -72,12 +67,9 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties3[str], - str - ] + arg_: typing.Union[ + DictInput2, + AdditionalProperties2[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[frozendict.frozendict]: @@ -111,13 +103,9 @@ def __getitem__(self, name: str) -> AdditionalProperties2[frozendict.frozendict] def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties2[frozendict.frozendict], - dict, - frozendict.frozendict - ] + arg_: typing.Union[ + DictInput3, + MapOfMapProperty[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfMapProperty[frozendict.frozendict]: @@ -132,13 +120,9 @@ def __new__( ) return inst -"""todo define mapping here""" Anytype1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] """todo define mapping here""" @@ -168,29 +152,9 @@ def __getitem__(self, name: str) -> AdditionalProperties4[typing.Union[ def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties4[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + arg_: typing.Union[ + DictInput4, + MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict]: @@ -234,7 +198,6 @@ def __new__( ) return inst -"""todo define mapping here""" AdditionalProperties6: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" @@ -255,12 +218,9 @@ def __getitem__(self, name: str) -> AdditionalProperties6[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties6[str], - str - ] + arg_: typing.Union[ + DictInput5, + MapWithUndeclaredPropertiesString[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesString[frozendict.frozendict]: @@ -288,7 +248,6 @@ def __new__( "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], } ) -"""todo define mapping here""" class AdditionalPropertiesClass( @@ -371,7 +330,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput6, AdditionalPropertiesClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 36d420a95cf..3236fe1af24 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] """todo define mapping here""" @@ -40,29 +39,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[typing.Union[ def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + arg_: typing.Union[ + DictInput, + _0[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[frozendict.frozendict]: @@ -77,7 +56,6 @@ def __new__( ) return inst -"""todo define mapping here""" class AdditionalProperties2( @@ -157,29 +135,9 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties2[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + arg_: typing.Union[ + DictInput2, + _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: @@ -194,7 +152,6 @@ def __new__( ) return inst -"""todo define mapping here""" class AdditionalProperties3( @@ -274,29 +231,9 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties3[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + arg_: typing.Union[ + DictInput3, + _2[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _2[frozendict.frozendict]: @@ -316,7 +253,6 @@ def __new__( typing.Type[_1[schemas.U]], typing.Type[_2[schemas.U]], ] -"""todo define mapping here""" class AdditionalPropertiesValidator( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 9f06b171f67..ce158c2ca81 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class AdditionalProperties( @@ -72,13 +70,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[tuple]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[tuple], - list, - tuple - ] + arg_: typing.Union[ + DictInput, + AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index 59ac936e89b..9a656635588 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema[U] """todo define mapping here""" @@ -36,13 +35,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[decimal.Decimal], - decimal.Decimal, - int - ] + arg_: typing.Union[ + DictInput, + Address[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Address[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index fb298374c4d..8c61ecfbd13 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" ClassName: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Color( @@ -33,7 +31,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) -"""todo define mapping here""" class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index ef982971289..281437ad0c8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class AnimalFarm( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 3be9c019a85..95f7c08f088 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Uuid( @@ -63,7 +62,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Date( @@ -116,7 +114,6 @@ def __new__( ) return inst -"""todo define mapping here""" class DateTime( @@ -169,7 +166,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Number( @@ -222,7 +218,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Binary( @@ -274,7 +269,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Int32( @@ -326,7 +320,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Int64( @@ -378,7 +371,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Double( @@ -430,7 +422,6 @@ def __new__( ) return inst -"""todo define mapping here""" class _Float( @@ -496,7 +487,6 @@ def __new__( "float": typing.Type[_Float], } ) -"""todo define mapping here""" class AnyTypeAndFormat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 0c8007d9035..38ce281842a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _Not: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class AnyTypeNotString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index ced3ec25407..a23a0db4938 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -10,11 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Code: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" Type: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Message: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -24,7 +21,6 @@ "message": typing.Type[Message], } ) -"""todo define mapping here""" class ApiResponse( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 73b2da343f9..05a7acf577c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Cultivar( @@ -26,7 +25,6 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^[a-zA-Z\s]*$' # noqa: E501 ) -"""todo define mapping here""" class Origin( @@ -50,7 +48,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) -"""todo define mapping here""" class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 1234d7babd4..a2b5a84a1c4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -11,9 +11,7 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" Cultivar: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Mealy: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index 6b90dbdf74a..e1370170a48 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class ArrayHoldingAnyType( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 4d140a7d379..bac113d7ca0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items2: typing_extensions.TypeAlias = schemas.NumberSchema[U] -"""todo define mapping here""" class Items( @@ -51,7 +49,6 @@ def __new__( def __getitem__(self, name: int) -> Items2[decimal.Decimal]: return super().__getitem__(name) -"""todo define mapping here""" class ArrayArrayNumber( @@ -95,7 +92,6 @@ def __getitem__(self, name: int) -> Items[tuple]: "ArrayArrayNumber": typing.Type[ArrayArrayNumber], } ) -"""todo define mapping here""" class ArrayOfArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 93a29152853..07da4cccb04 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class ArrayOfEnums( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index ca1f864a5d7..dac65e34a38 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.NumberSchema[U] -"""todo define mapping here""" class ArrayNumber( @@ -57,7 +55,6 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: "ArrayNumber": typing.Type[ArrayNumber], } ) -"""todo define mapping here""" class ArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 9c2de151106..dd6201c7b96 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class ArrayOfString( @@ -49,9 +47,7 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) -"""todo define mapping here""" Items3: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" class Items2( @@ -89,7 +85,6 @@ def __new__( def __getitem__(self, name: int) -> Items3[decimal.Decimal]: return super().__getitem__(name) -"""todo define mapping here""" class ArrayArrayOfInteger( @@ -127,8 +122,6 @@ def __new__( def __getitem__(self, name: int) -> Items2[tuple]: return super().__getitem__(name) -"""todo define mapping here""" -"""todo define mapping here""" class Items4( @@ -166,7 +159,6 @@ def __new__( def __getitem__(self, name: int) -> read_only_first.ReadOnlyFirst[frozendict.frozendict]: return super().__getitem__(name) -"""todo define mapping here""" class ArrayArrayOfModel( @@ -212,7 +204,6 @@ def __getitem__(self, name: int) -> Items4[tuple]: "array_array_of_model": typing.Type[ArrayArrayOfModel], } ) -"""todo define mapping here""" class ArrayTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index feeb822ece4..00cc8d64ab8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Items( @@ -25,7 +24,6 @@ class Schema_(metaclass=schemas.SingletonMeta): }) format: str = 'int64' inclusive_maximum: typing.Union[int, float] = 7 -"""todo define mapping here""" class ArrayWithValidationsInItems( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index f71698e684a..b750d9bf4f3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "lengthCm": typing.Type[LengthCm], } ) -"""todo define mapping here""" class Banana( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index db8150b9885..96b4c4be498 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -11,9 +11,7 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema[U] -"""todo define mapping here""" Sweet: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py index 394e40ed703..fdaa22c4d9e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/bar.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Bar( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index c3030f87572..c76fca3cac1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ClassName( @@ -38,7 +37,6 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -"""todo define mapping here""" class BasquePig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py index bba29cc435b..04cd54e9c82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Boolean: typing_extensions.TypeAlias = schemas.BoolSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py index baf260af254..4e82fcace6c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/boolean_enum.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class BooleanEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index cf5f9976373..7bfc6551114 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -10,17 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" SmallCamel: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" CapitalCamel: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" SmallSnake: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" CapitalSnake: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" SCAETHFlowPoints: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" ATTNAME: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -33,7 +27,6 @@ "ATT_NAME": typing.Type[ATTNAME], } ) -"""todo define mapping here""" class Capitalization( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 97fba5d191f..b5fc0a15597 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Declawed: typing_extensions.TypeAlias = schemas.BoolSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "declawed": typing.Type[Declawed], } ) -"""todo define mapping here""" class _1( @@ -76,7 +73,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Cat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 98d612a13ac..f37e1108c1e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" class Name( @@ -33,7 +31,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) -"""todo define mapping here""" class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 6300c9350e2..6474cc21561 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "name": typing.Type[Name], } ) -"""todo define mapping here""" class _1( @@ -76,7 +73,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ChildCat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index 08d2da737cb..fa69b67ae74 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _Class: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "_class": typing.Type[_Class], } ) -"""todo define mapping here""" class ClassModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 8f8309185b9..7d11206ff9f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Client: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "client": typing.Type[Client], } ) -"""todo define mapping here""" class Client( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index eefdb7d712a..a01fed1d0ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class QuadrilateralType( @@ -39,7 +37,6 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -"""todo define mapping here""" class _1( @@ -96,7 +93,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ComplexQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 3c4289dc600..32242708521 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -10,27 +10,16 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" _1: typing_extensions.TypeAlias = schemas.DateSchema[U] -"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] -"""todo define mapping here""" _3: typing_extensions.TypeAlias = schemas.BinarySchema[U] -"""todo define mapping here""" _4: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" _5: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" _6: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" _7: typing_extensions.TypeAlias = schemas.BoolSchema[U] -"""todo define mapping here""" _8: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class _9( @@ -93,17 +82,11 @@ def __getitem__(self, name: int) -> Items[typing.Union[ ]]: return super().__getitem__(name) -"""todo define mapping here""" _10: typing_extensions.TypeAlias = schemas.NumberSchema[U] -"""todo define mapping here""" _11: typing_extensions.TypeAlias = schemas.Float32Schema[U] -"""todo define mapping here""" _12: typing_extensions.TypeAlias = schemas.Float64Schema[U] -"""todo define mapping here""" _13: typing_extensions.TypeAlias = schemas.IntSchema[U] -"""todo define mapping here""" _14: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" _15: typing_extensions.TypeAlias = schemas.Int64Schema[U] AnyOf = typing.Tuple[ typing.Type[_0[schemas.U]], @@ -123,7 +106,6 @@ def __getitem__(self, name: int) -> Items[typing.Union[ typing.Type[_14[schemas.U]], typing.Type[_15[schemas.U]], ] -"""todo define mapping here""" class ComposedAnyOfDifferentTypesNoValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 4ef2f6deeb8..06177ddf24b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class ComposedArray( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index 7e97d41aaf3..80edc370de9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -10,12 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class ComposedBool( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index 43be59a6315..716a7bb2ddb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -10,12 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class ComposedNone( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index 9ac6a223dfb..bee636d9943 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -10,12 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class ComposedNumber( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 8eab82eb122..0bf85f09d74 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -10,12 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class ComposedObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index e454e34e14d..5fc82c44700 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -10,13 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" _3: typing_extensions.TypeAlias = schemas.DateSchema[U] -"""todo define mapping here""" class _4( @@ -46,9 +41,7 @@ def __new__( ) return inst -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class _5( @@ -113,7 +106,6 @@ def __getitem__(self, name: int) -> Items[typing.Union[ ]]: return super().__getitem__(name) -"""todo define mapping here""" class _6( @@ -130,7 +122,6 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^2020.*' # noqa: E501 ) -"""todo define mapping here""" class ComposedOneOfDifferentTypes( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index 833c7b92306..ddada15171f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -10,12 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class ComposedString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py index fe85afd79e1..9bb07dbaf6c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/currency.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Currency( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index 058d004cfbb..4036dc6d5c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ClassName( @@ -38,7 +37,6 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -"""todo define mapping here""" class DanishPig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py index 9c64d188039..afc7412ca35 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_test.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class DateTimeTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py index 546145fec79..9482d8c17e0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_time_with_validations.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class DateTimeWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py index 7aa537a25b4..9cc20254e25 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/date_with_validations.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class DateWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py index c09d25d24f0..bd611d27d8e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/decimal_payload.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" DecimalPayload: typing_extensions.TypeAlias = schemas.DecimalSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 4eb1609a56e..fc73d7e24c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Breed: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "breed": typing.Type[Breed], } ) -"""todo define mapping here""" class _1( @@ -76,7 +73,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Dog( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 4d434d943e2..9fbcf417bcf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -10,12 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Shapes( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index d9d00feb895..85c849f968a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class JustSymbol( @@ -37,7 +36,6 @@ def GREATER_THAN_SIGN_EQUALS_SIGN(cls) -> JustSymbol[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> JustSymbol[str]: return cls("$") # type: ignore -"""todo define mapping here""" class Items( @@ -64,7 +62,6 @@ def FISH(cls) -> Items[str]: @schemas.classproperty def CRAB(cls) -> Items[str]: return cls("crab") # type: ignore -"""todo define mapping here""" class ArrayEnum( @@ -108,7 +105,6 @@ def __getitem__(self, name: int) -> Items[str]: "array_enum": typing.Type[ArrayEnum], } ) -"""todo define mapping here""" class EnumArrays( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py index 48448410cf5..2c5bb7f1db7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_class.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class EnumClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 48ed8443171..fc0677bb041 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class EnumString( @@ -42,7 +41,6 @@ def LOWER(cls) -> EnumString[str]: @schemas.classproperty def EMPTY(cls) -> EnumString[str]: return cls("") # type: ignore -"""todo define mapping here""" class EnumStringRequired( @@ -74,7 +72,6 @@ def LOWER(cls) -> EnumStringRequired[str]: @schemas.classproperty def EMPTY(cls) -> EnumStringRequired[str]: return cls("") # type: ignore -"""todo define mapping here""" class EnumInteger( @@ -102,7 +99,6 @@ def POSITIVE_1(cls) -> EnumInteger[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1(cls) -> EnumInteger[decimal.Decimal]: return cls(-1) # type: ignore -"""todo define mapping here""" class EnumNumber( @@ -130,12 +126,6 @@ def POSITIVE_1_PT_1(cls) -> EnumNumber[decimal.Decimal]: @schemas.classproperty def NEGATIVE_1_PT_2(cls) -> EnumNumber[decimal.Decimal]: return cls(-1.2) # type: ignore -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class EnumTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index a4bbcfe67ef..e4d9a339931 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class TriangleType( @@ -39,7 +37,6 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -"""todo define mapping here""" class _1( @@ -96,7 +93,6 @@ def __new__( ) return inst -"""todo define mapping here""" class EquilateralTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index f430a24e35b..2a344893db2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" SourceURI: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "sourceURI": typing.Type[SourceURI], } ) -"""todo define mapping here""" class File( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index e2b505c066e..27b75514d7a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Files( @@ -50,7 +47,6 @@ def __new__( def __getitem__(self, name: int) -> file.File[frozendict.frozendict]: return super().__getitem__(name) -"""todo define mapping here""" class FileSchemaTestClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index 57a47ec367d..494e8a1e971 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class Foo( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 9d9da9ac6b0..06759b43cf4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Integer( @@ -27,9 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): inclusive_maximum: typing.Union[int, float] = 100 inclusive_minimum: typing.Union[int, float] = 10 multiple_of: typing.Union[int, float] = 2 -"""todo define mapping here""" Int32: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" class Int32withValidations( @@ -45,9 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int32' inclusive_maximum: typing.Union[int, float] = 200 inclusive_minimum: typing.Union[int, float] = 20 -"""todo define mapping here""" Int64: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" class Number( @@ -63,7 +58,6 @@ class Schema_(metaclass=schemas.SingletonMeta): inclusive_maximum: typing.Union[int, float] = 543.2 inclusive_minimum: typing.Union[int, float] = 32.1 multiple_of: typing.Union[int, float] = 32.5 -"""todo define mapping here""" class _Float( @@ -79,9 +73,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'float' inclusive_maximum: typing.Union[int, float] = 987.6 inclusive_minimum: typing.Union[int, float] = 54.3 -"""todo define mapping here""" Float32: typing_extensions.TypeAlias = schemas.Float32Schema[U] -"""todo define mapping here""" class Double( @@ -97,11 +89,8 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'double' inclusive_maximum: typing.Union[int, float] = 123.4 inclusive_minimum: typing.Union[int, float] = 67.8 -"""todo define mapping here""" Float64: typing_extensions.TypeAlias = schemas.Float64Schema[U] -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.NumberSchema[U] -"""todo define mapping here""" class ArrayWithUniqueItems( @@ -141,7 +130,6 @@ def __new__( def __getitem__(self, name: int) -> Items[decimal.Decimal]: return super().__getitem__(name) -"""todo define mapping here""" class String( @@ -158,19 +146,12 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'[a-z]', # noqa: E501 flags=re.I, ) -"""todo define mapping here""" Byte: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Binary: typing_extensions.TypeAlias = schemas.BinarySchema[U] -"""todo define mapping here""" Date: typing_extensions.TypeAlias = schemas.DateSchema[U] -"""todo define mapping here""" DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] -"""todo define mapping here""" Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] -"""todo define mapping here""" UuidNoExample: typing_extensions.TypeAlias = schemas.UUIDSchema[U] -"""todo define mapping here""" class Password( @@ -186,7 +167,6 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'password' max_length: int = 64 min_length: int = 10 -"""todo define mapping here""" class PatternWithDigits( @@ -202,7 +182,6 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^\d{10}$' # noqa: E501 ) -"""todo define mapping here""" class PatternWithDigitsAndDelimiter( @@ -219,7 +198,6 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'^image_\d{1,3}$', # noqa: E501 flags=re.I, ) -"""todo define mapping here""" NoneProp: typing_extensions.TypeAlias = schemas.NoneSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -247,7 +225,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) -"""todo define mapping here""" class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 1f0ee90237b..1d192defa12 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Data: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.IntSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "id": typing.Type[Id], } ) -"""todo define mapping here""" class FromSchema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 4b821ce075e..e00adefb9ba 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" Color: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -20,7 +17,6 @@ "color": typing.Type[Color], } ) -"""todo define mapping here""" class Fruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 6dc58a05ea2..37abb7ef3aa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -10,11 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class FruitReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index 22bfc175192..fffa86a0107 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" Color: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -20,7 +17,6 @@ "color": typing.Type[Color], } ) -"""todo define mapping here""" class GmFruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 3c168e83602..56ad0618e62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" PetType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "pet_type": typing.Type[PetType], } ) -"""todo define mapping here""" class GrandparentAnimal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index e8b0948da5c..c517ce283d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Bar: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Foo: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "foo": typing.Type[Foo], } ) -"""todo define mapping here""" class HasOnlyReadOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index bfb5a466616..4dda11fbc7f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class NullableMessage( @@ -64,7 +63,6 @@ def __new__( "NullableMessage": typing.Type[NullableMessage], } ) -"""todo define mapping here""" class HealthCheckResult( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py index 58ac1cd04fb..ffdb3682e9c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py index d14c7c84319..5bc35b3ff36 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_big.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerEnumBig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py index b719a30954d..6d6de983418 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_one_value.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerEnumOneValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py index 8f2e59809bf..fc043b6aac4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_enum_with_default_value.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerEnumWithDefaultValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py index d4d337e576d..1577a992b9c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_max10.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerMax10( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py index 255797baa66..3450802af3f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/integer_min15.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class IntegerMin15( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 5e981c9b4b3..515925aab3b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class TriangleType( @@ -39,7 +37,6 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -"""todo define mapping here""" class _1( @@ -96,7 +93,6 @@ def __new__( ) return inst -"""todo define mapping here""" class IsoscelesTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index 95bc41a2850..c173929681a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" class Items( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index efa51d2eade..916f26c158b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -10,10 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Items( @@ -65,7 +61,6 @@ def __new__( ) return inst -"""todo define mapping here""" class JSONPatchRequest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index 53eb2ef4512..f4b965d3707 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -11,11 +11,8 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Value: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 73d95787161..4fd56649412 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -11,11 +11,8 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" _From: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index 1ca5c52e2ca..baddbcc6b4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -11,9 +11,7 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" Path: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Op( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 2731720e938..398d796b5dd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -10,10 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Mammal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 7828a3690d7..20fc7111398 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties2: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" @@ -31,12 +30,9 @@ def __getitem__(self, name: str) -> AdditionalProperties2[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties2[str], - str - ] + arg_: typing.Union[ + DictInput, + AdditionalProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties[frozendict.frozendict]: @@ -70,13 +66,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[frozendict.frozendict], - dict, - frozendict.frozendict - ] + arg_: typing.Union[ + DictInput2, + MapMapOfString[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapMapOfString[frozendict.frozendict]: @@ -91,7 +83,6 @@ def __new__( ) return inst -"""todo define mapping here""" class AdditionalProperties3( @@ -137,12 +128,9 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties3[str], - str - ] + arg_: typing.Union[ + DictInput3, + MapOfEnumString[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfEnumString[frozendict.frozendict]: @@ -157,7 +145,6 @@ def __new__( ) return inst -"""todo define mapping here""" AdditionalProperties4: typing_extensions.TypeAlias = schemas.BoolSchema[U] """todo define mapping here""" @@ -178,12 +165,9 @@ def __getitem__(self, name: str) -> AdditionalProperties4[schemas.BoolClass]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties4[schemas.BoolClass], - bool - ] + arg_: typing.Union[ + DictInput4, + DirectMap[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DirectMap[frozendict.frozendict]: @@ -198,8 +182,6 @@ def __new__( ) return inst -"""todo define mapping here""" -"""todo define mapping here""" class MapTest( @@ -257,7 +239,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput5, MapTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 1719e907aa1..3fb80fdc46d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -10,12 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] -"""todo define mapping here""" DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] """todo define mapping here""" -"""todo define mapping here""" class Map( @@ -34,29 +31,9 @@ def __getitem__(self, name: str) -> animal.Animal[frozendict.frozendict]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + arg_: typing.Union[ + DictInput, + Map[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Map[frozendict.frozendict]: @@ -79,7 +56,6 @@ def __new__( "map": typing.Type[Map], } ) -"""todo define mapping here""" class MixedPropertiesAndAdditionalPropertiesClass( @@ -133,7 +109,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index 846b9d6c5db..7201428a84a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -10,10 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Amount: typing_extensions.TypeAlias = schemas.DecimalSchema[U] -"""todo define mapping here""" -"""todo define mapping here""" class Money( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index a9239306dcf..af600180c25 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -10,11 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" _Property: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -24,7 +21,6 @@ "property": typing.Type[_Property], } ) -"""todo define mapping here""" class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 81074028323..7ba083a24de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -11,9 +11,7 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" PetId: typing_extensions.TypeAlias = schemas.Int64Schema[U] Properties = typing_extensions.TypedDict( 'Properties', diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 3b2328d4d67..65c509c0e17 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class AdditionalProperties4( @@ -59,7 +58,6 @@ def __new__( ) return inst -"""todo define mapping here""" class IntegerProp( @@ -109,7 +107,6 @@ def __new__( ) return inst -"""todo define mapping here""" class NumberProp( @@ -159,7 +156,6 @@ def __new__( ) return inst -"""todo define mapping here""" class BooleanProp( @@ -207,7 +203,6 @@ def __new__( ) return inst -"""todo define mapping here""" class StringProp( @@ -255,7 +250,6 @@ def __new__( ) return inst -"""todo define mapping here""" class DateProp( @@ -306,7 +300,6 @@ def __new__( ) return inst -"""todo define mapping here""" class DatetimeProp( @@ -357,9 +350,7 @@ def __new__( ) return inst -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" class ArrayNullableProp( @@ -409,7 +400,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Items2( @@ -458,7 +448,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ArrayAndItemsNullableProp( @@ -508,7 +497,6 @@ def __new__( ) return inst -"""todo define mapping here""" class Items3( @@ -557,7 +545,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ArrayItemsNullable( @@ -602,7 +589,6 @@ def __getitem__(self, name: int) -> Items3[typing.Union[ ]]: return super().__getitem__(name) -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema[U] """todo define mapping here""" @@ -658,7 +644,6 @@ def __new__( ) return inst -"""todo define mapping here""" class AdditionalProperties2( @@ -764,7 +749,6 @@ def __new__( ) return inst -"""todo define mapping here""" class AdditionalProperties3( @@ -835,17 +819,9 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties3[typing.Union[ - schemas.NoneClass, - frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict - ] + arg_: typing.Union[ + DictInput3, + ObjectItemsNullable[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectItemsNullable[frozendict.frozendict]: @@ -992,7 +968,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput4, NullableClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index e8924257915..7bc3f52e136 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -10,11 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" class NullableShape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index 46df2a3bdcc..24112af86f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class NullableString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py index 564f5d7fec5..286584e8a0d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Number: typing_extensions.TypeAlias = schemas.NumberSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index ce12ba49ea6..0f971181f77 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" JustNumber: typing_extensions.TypeAlias = schemas.NumberSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "JustNumber": typing.Type[JustNumber], } ) -"""todo define mapping here""" class NumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py index 8816ea61e02..3124211076b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_with_validations.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class NumberWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index de1068704b6..304a781c068 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" A: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "a": typing.Type[A], } ) -"""todo define mapping here""" class ObjWithRequiredProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index a000fd62f32..57fea976a43 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" B: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "b": typing.Type[B], } ) -"""todo define mapping here""" class ObjWithRequiredPropsBase( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py index 646f376fb18..1a3c6279e36 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" ObjectInterface: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 77ce442bbab..54df90929b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Arg: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Args: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "args": typing.Type[Args], } ) -"""todo define mapping here""" class ObjectModelWithArgAndArgsProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 400d51ff0b4..047bf966a18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -10,10 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class ObjectModelWithRefProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index b13bde9aee2..5520440dfd1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,7 +17,6 @@ "name": typing.Type[Name], } ) -"""todo define mapping here""" class _1( @@ -105,7 +102,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 9d4252a9cfe..9a97ff70505 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" SomeProp: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" Someprop: typing_extensions.TypeAlias = schemas.DictSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "someprop": typing.Type[Someprop], } ) -"""todo define mapping here""" class ObjectWithCollidingProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 5033a05b0db..9c3cb84c9cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -10,11 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" Width: typing_extensions.TypeAlias = schemas.DecimalSchema[U] -"""todo define mapping here""" -"""todo define mapping here""" class ObjectWithDecimalProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 2c4c864b1f5..8a15578f9a2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -10,11 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" SpecialPropertyName: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" _123List: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" _123Number: typing_extensions.TypeAlias = schemas.IntSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -24,7 +21,6 @@ "123Number": typing.Type[_123Number], } ) -"""todo define mapping here""" class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 5e005daa497..1332645d91a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class SomeProp( @@ -85,7 +83,6 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -"""todo define mapping here""" class ObjectWithInlineCompositionProperty( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index e994ad8f4d9..dcc76c14974 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class ObjectWithInvalidNamedRefedProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 102be9a4f89..05b6e41180e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Test: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "test": typing.Type[Test], } ) -"""todo define mapping here""" class ObjectWithOptionalTestProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index d2aaedeb2cd..96c73b2795e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ObjectWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 14807406e65..a460be60404 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -10,15 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" PetId: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" Quantity: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" ShipDate: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] -"""todo define mapping here""" class Status( @@ -50,7 +45,6 @@ def APPROVED(cls) -> Status[str]: @schemas.classproperty def DELIVERED(cls) -> Status[str]: return cls("delivered") # type: ignore -"""todo define mapping here""" class Complete( @@ -75,7 +69,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "complete": typing.Type[Complete], } ) -"""todo define mapping here""" class Order( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 66397d241f8..c62530ee4e9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class ParentPet( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 6e58425ed19..d578c95f069 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -10,14 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class PhotoUrls( @@ -54,8 +49,6 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) -"""todo define mapping here""" -"""todo define mapping here""" class Tags( @@ -93,7 +86,6 @@ def __new__( def __getitem__(self, name: int) -> tag.Tag[frozendict.frozendict]: return super().__getitem__(name) -"""todo define mapping here""" class Status( @@ -125,7 +117,6 @@ def PENDING(cls) -> Status[str]: @schemas.classproperty def SOLD(cls) -> Status[str]: return cls("sold") # type: ignore -"""todo define mapping here""" class Pet( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index f58a2a5f880..48ca691cb40 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Pig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 5738f4d41e5..bf3d9f3d081 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -10,10 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" -"""todo define mapping here""" class Player( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 25fdc9ce65f..00cf4dd2209 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Quadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 3f51bb390ec..ebcb62e5e4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ShapeType( @@ -32,7 +31,6 @@ class Schema_(metaclass=schemas.SingletonMeta): @schemas.classproperty def QUADRILATERAL(cls) -> ShapeType[str]: return cls("Quadrilateral") # type: ignore -"""todo define mapping here""" QuadrilateralType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -41,7 +39,6 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -"""todo define mapping here""" class QuadrilateralInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 51913c83627..9c20be172f3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Bar: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Baz: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "baz": typing.Type[Baz], } ) -"""todo define mapping here""" class ReadOnlyFirst( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 754fb1e5645..12088ddb420 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 844e41cf030..12195d70de7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] """todo define mapping here""" diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index c25a2b302dc..a4393b15d6d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ReqPropsFromUnsetAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 79d26566192..e048c49568d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class TriangleType( @@ -39,7 +37,6 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -"""todo define mapping here""" class _1( @@ -96,7 +93,6 @@ def __new__( ) return inst -"""todo define mapping here""" class ScaleneTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index 0b78bde681e..9373e77a05d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class SelfReferencingArrayModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 6c6021708bb..040517a6455 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -11,8 +11,6 @@ from petstore_api.shared_imports.schema_imports import * """todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class SelfReferencingObjectModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index 004201231cb..b20b0bef294 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -10,9 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Shape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 2d2826c12cf..6fd7927d42e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -10,11 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class ShapeOrNull( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index a37534cb67c..6e1421830c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class QuadrilateralType( @@ -39,7 +37,6 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -"""todo define mapping here""" class _1( @@ -96,7 +93,6 @@ def __new__( ) return inst -"""todo define mapping here""" class SimpleQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index c9d06ab8efb..cf8f767c634 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class SomeObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 3dd16a5e843..16c8ec73718 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" A: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "a": typing.Type[A], } ) -"""todo define mapping here""" class SpecialModelName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py index e3cba117b56..0320d99e128 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" String: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index 60f4d56b2f8..b33c030d250 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] """todo define mapping here""" @@ -36,12 +35,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[schemas.BoolClass], - bool - ] + arg_: typing.Union[ + DictInput, + StringBooleanMap[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringBooleanMap[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index 968512e8921..2aa895efdec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class StringEnum( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py index f1868dedacc..b095711545d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum_with_default_value.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class StringEnumWithDefaultValue( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py index cbfb66e87cf..92bddce0b54 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_with_validation.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class StringWithValidation( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index f19aeac5d73..47b1f26dab7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "name": typing.Type[Name], } ) -"""todo define mapping here""" class Tag( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index bb37411bb89..3673f084a5a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -10,10 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" -"""todo define mapping here""" class Triangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index c00cb0ecb96..a4dbd719e5c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class ShapeType( @@ -32,7 +31,6 @@ class Schema_(metaclass=schemas.SingletonMeta): @schemas.classproperty def TRIANGLE(cls) -> ShapeType[str]: return cls("Triangle") # type: ignore -"""todo define mapping here""" TriangleType: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -41,7 +39,6 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) -"""todo define mapping here""" class TriangleInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index e08954044de..8615eaf7efe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -10,25 +10,15 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Id: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" Username: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" FirstName: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" LastName: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Email: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Password: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Phone: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" UserStatus: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" ObjectWithNoDeclaredProps: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" class ObjectWithNoDeclaredPropsNullable( @@ -77,11 +67,8 @@ def __new__( ) return inst -"""todo define mapping here""" AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" _Not: typing_extensions.TypeAlias = schemas.NoneSchema[U] -"""todo define mapping here""" class AnyTypeExceptNullProp( @@ -133,7 +120,6 @@ def __new__( ) return inst -"""todo define mapping here""" AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -153,7 +139,6 @@ def __new__( "anyTypePropNullable": typing.Type[AnyTypePropNullable], } ) -"""todo define mapping here""" class User( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py index 54762036c6c..e73573753c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/uuid_string.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class UUIDString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 8650c81297c..cef6ec068b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -10,11 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" HasBaleen: typing_extensions.TypeAlias = schemas.BoolSchema[U] -"""todo define mapping here""" HasTeeth: typing_extensions.TypeAlias = schemas.BoolSchema[U] -"""todo define mapping here""" class ClassName( @@ -44,7 +41,6 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -"""todo define mapping here""" class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index a7274c14b4d..62cf29bef82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" class Type( @@ -44,7 +42,6 @@ def MOUNTAIN(cls) -> Type[str]: @schemas.classproperty def GREVYS(cls) -> Type[str]: return cls("grevys") # type: ignore -"""todo define mapping here""" class ClassName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py index 4fb508ec95c..beefb32f1d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py index 4fb508ec95c..beefb32f1d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 43f0dd4de7d..8017187a20e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Items( @@ -38,7 +37,6 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py index ae1a7a58cd8..7a71abacd02 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 43f0dd4de7d..8017187a20e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Items( @@ -38,7 +37,6 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py index ae1a7a58cd8..7a71abacd02 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py index 077435912c9..9a0a26920d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py index bfc8f0c77bf..c4ee010af0c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 1fb7ba7e708..d141f434e24 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Items( @@ -38,7 +37,6 @@ def GREATER_THAN_SIGN(cls) -> Items[str]: @schemas.classproperty def DOLLAR_SIGN(cls) -> Items[str]: return cls("$") # type: ignore -"""todo define mapping here""" class EnumFormStringArray( @@ -75,7 +73,6 @@ def __new__( def __getitem__(self, name: int) -> Items[str]: return super().__getitem__(name) -"""todo define mapping here""" class EnumFormString( @@ -115,7 +112,6 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: "enum_form_string": typing.Type[EnumFormString], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py index 01b4dbc9104..b8bcb2051e9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 389e541e926..fe0007736d6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Integer( @@ -26,7 +25,6 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int' inclusive_maximum: typing.Union[int, float] = 100 inclusive_minimum: typing.Union[int, float] = 10 -"""todo define mapping here""" class Int32( @@ -42,9 +40,7 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'int32' inclusive_maximum: typing.Union[int, float] = 200 inclusive_minimum: typing.Union[int, float] = 20 -"""todo define mapping here""" Int64: typing_extensions.TypeAlias = schemas.Int64Schema[U] -"""todo define mapping here""" class Number( @@ -59,7 +55,6 @@ class Schema_(metaclass=schemas.SingletonMeta): }) inclusive_maximum: typing.Union[int, float] = 543.2 inclusive_minimum: typing.Union[int, float] = 32.1 -"""todo define mapping here""" class _Float( @@ -74,7 +69,6 @@ class Schema_(metaclass=schemas.SingletonMeta): }) format: str = 'float' inclusive_maximum: typing.Union[int, float] = 987.6 -"""todo define mapping here""" class Double( @@ -90,7 +84,6 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'double' inclusive_maximum: typing.Union[int, float] = 123.4 inclusive_minimum: typing.Union[int, float] = 67.8 -"""todo define mapping here""" class String( @@ -107,7 +100,6 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern=r'[a-z]', # noqa: E501 flags=re.I, ) -"""todo define mapping here""" class PatternWithoutDelimiter( @@ -123,13 +115,9 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^[A-Z].*' # noqa: E501 ) -"""todo define mapping here""" Byte: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Binary: typing_extensions.TypeAlias = schemas.BinarySchema[U] -"""todo define mapping here""" Date: typing_extensions.TypeAlias = schemas.DateSchema[U] -"""todo define mapping here""" class DateTime( @@ -143,7 +131,6 @@ class Schema_(metaclass=schemas.SingletonMeta): str, }) format: str = 'date-time' -"""todo define mapping here""" class Password( @@ -159,7 +146,6 @@ class Schema_(metaclass=schemas.SingletonMeta): format: str = 'password' max_length: int = 64 min_length: int = 10 -"""todo define mapping here""" Callback: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -180,7 +166,6 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 993db82b06a..fc8e459cc23 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] """todo define mapping here""" @@ -31,12 +30,9 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - arg_: typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[str], - str - ] + arg_: typing.Union[ + DictInput, + Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index d67d308aed1..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 8b3219ff80f..e4c355da0f8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class SomeProp( @@ -85,7 +83,6 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index d67d308aed1..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 8b3219ff80f..e4c355da0f8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class SomeProp( @@ -85,7 +83,6 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index d67d308aed1..1ed2dbac7a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 8b3219ff80f..e4c355da0f8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class _0( @@ -27,7 +26,6 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] -"""todo define mapping here""" class SomeProp( @@ -85,7 +83,6 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 19d255201cd..5709d75b258 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Param: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Param2: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "param2": typing.Type[Param2], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 609a35d5eee..4ff77670463 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Keyword: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,7 +17,6 @@ "keyword": typing.Type[Keyword], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 09171e671ee..44873af2603 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" RequiredFile: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "requiredFile": typing.Type[RequiredFile], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py index 04fa8dc32f1..2d4bbce1d22 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.BinarySchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py index 04fa8dc32f1..2d4bbce1d22 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.BinarySchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 7da3f9f0932..f006f275485 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" File: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "file": typing.Type[File], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index a9e2a55aafc..bcc3fe03ead 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.BinarySchema[U] -"""todo define mapping here""" class Files( @@ -57,7 +55,6 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: "files": typing.Type[Files], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py index dfccd99523e..072e994d56d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 9a3d6b0603d..308ed3ea839 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index a0d807b3f2a..c16851c05c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -7,7 +7,6 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" class Version( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index df4b4a506cb..d0b062b4b28 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Items( @@ -43,7 +42,6 @@ def PENDING(cls) -> Items[str]: @schemas.classproperty def SOLD(cls) -> Items[str]: return cls("sold") # type: ignore -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index a0d807b3f2a..c16851c05c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -7,7 +7,6 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" class Version( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index c8725aeb3ce..872a0bd631a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Items: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index b22e545d9df..22c1d067346 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Name: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" Status: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "status": typing.Type[Status], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py index 64736c889fa..db592ea3e5b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int64Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index d846b9451c0..a52c4d2920a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -10,9 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" File: typing_extensions.TypeAlias = schemas.BinarySchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -21,7 +19,6 @@ "file": typing.Type[File], } ) -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py index 6ae59ad0d46..5bf2461e229 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py @@ -10,7 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py index 8d47affcad3..1f544f8f747 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.StrSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py index 5d7844f1ac1..6354f6d5744 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py index a2b686b0b4a..5af8b8a8ede 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py @@ -10,5 +10,4 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" Schema: typing_extensions.TypeAlias = schemas.Int32Schema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 904b8ca75bd..1112afc71d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -7,7 +7,6 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" class Server( @@ -40,7 +39,6 @@ def QA_HYPHEN_MINUS_PETSTORE(cls) -> Server[str]: @schemas.classproperty def DEV_HYPHEN_MINUS_PETSTORE(cls) -> Server[str]: return cls("dev-petstore") # type: ignore -"""todo define mapping here""" class Port( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index db45a812d0b..6ba3cc4062c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -7,7 +7,6 @@ from petstore_api.shared_imports.schema_imports import * from petstore_api.shared_imports.server_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] -"""todo define mapping here""" class Version( From 6c5bd9e7a1a9f5eff5a6ffbc6c6bb8a5c8c9cedb Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sat, 10 Jun 2023 22:58:24 -0700 Subject: [PATCH 12/36] Adds types to dictchema input --- .../src/main/resources/python/schemas.hbs | 2 +- .../openapi3/client/petstore/python/src/petstore_api/schemas.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index 640cb5365b7..1078b92d892 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -2657,7 +2657,7 @@ class DictSchema( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *args_: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py index b16bbe4431c..89dda66ed27 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py @@ -2570,7 +2570,7 @@ def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: t def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], + *args_: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: From 575e952efefc6f21bb9f700a40e6a4f6281bd676 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 10:47:14 -0700 Subject: [PATCH 13/36] Adds many use cases object inputs --- .../codegen/DefaultCodegen.java | 26 +++++++-------- .../codegen/model/CodegenSchema.java | 6 +++- .../components/schemas/_helper_getschemas.hbs | 13 ++------ .../python/components/schemas/_helper_new.hbs | 24 +------------- ...helper_optional_properties_input_type.hbs} | 8 +++++ .../schemas/_helper_properties_input_type.hbs | 33 +++++++++++++++++++ ...helper_required_properties_input_type.hbs} | 8 +++++ 7 files changed, 69 insertions(+), 49 deletions(-) rename modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/{_helper_optional_properties_type.hbs => _helper_optional_properties_input_type.hbs} (73%) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs rename modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/{_helper_required_properties_type.hbs => _helper_required_properties_input_type.hbs} (81%) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index 0bf789483ab..d0857dcb555 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -2293,21 +2293,17 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ // ideally requiredProperties would come before properties property.requiredProperties = getRequiredProperties(required, property.properties, property.additionalProperties, requiredAndOptionalProperties, sourceJsonPath, ((Schema) p).getProperties()); property.optionalProperties = getOptionalProperties(property.properties, required, sourceJsonPath); - LinkedHashMapWithContext reqAndOptionalProps = new LinkedHashMapWithContext<>(); - if (property.requiredProperties != null && property.optionalProperties == null) { - property.requiredAndOptionalProperties = reqAndOptionalProps; - property.requiredAndOptionalProperties.setJsonPathPiece(property.requiredProperties.jsonPathPiece()); - } else if (property.requiredProperties == null && property.optionalProperties != null) { - property.requiredAndOptionalProperties = reqAndOptionalProps; - property.requiredAndOptionalProperties.setJsonPathPiece(property.optionalProperties.jsonPathPiece()); - } else if (property.requiredProperties != null && property.optionalProperties != null) { - property.requiredAndOptionalProperties = reqAndOptionalProps; - CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); - property.requiredAndOptionalProperties.setJsonPathPiece(jsonPathPiece); - } else if (property.additionalProperties != null && !property.additionalProperties.isBooleanSchemaFalse && sourceJsonPath != null) { - property.requiredAndOptionalProperties = reqAndOptionalProps; - CodegenKey jsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); - property.requiredAndOptionalProperties.setJsonPathPiece(jsonPathPiece); + if ((property.types == null || property.types.contains("object")) && sourceJsonPath != null) { + // only set mapInputJsonPathPiece when object input is possible + if (property.requiredProperties != null && property.optionalProperties == null) { + property.mapInputJsonPathPiece = property.requiredProperties.jsonPathPiece(); + } else if (property.requiredProperties == null && property.optionalProperties != null) { + property.mapInputJsonPathPiece = property.optionalProperties.jsonPathPiece(); + } else if (property.requiredProperties != null && property.optionalProperties != null) { + property.mapInputJsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); + } else { + property.mapInputJsonPathPiece = getKey("DictInput", "schemaProperty", sourceJsonPath); + } } // end of properties that need to be ordered to set correct camelCase jsonPathPieces diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index c06b50e0853..01121530fb6 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -86,6 +86,7 @@ public class CodegenSchema { public String unescapedDescription; public LinkedHashMapWithContext optionalProperties; public LinkedHashMapWithContext requiredAndOptionalProperties; + public CodegenKey mapInputJsonPathPiece; public boolean schemaIsFromAdditionalProperties; public HashMap testCases = new HashMap<>(); /** @@ -223,10 +224,13 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL } } boolean additionalPropertiesIsBooleanSchemaFalse = (additionalProperties != null && additionalProperties.isBooleanSchemaFalse); - if (requiredProperties != null && additionalPropertiesIsBooleanSchemaFalse) { + boolean typedDictRequiredPropsUseCase = (requiredProperties != null && additionalPropertiesIsBooleanSchemaFalse); + boolean mappingUseCase = (requiredProperties != null && !additionalPropertiesIsBooleanSchemaFalse && optionalProperties == null); + if (typedDictRequiredPropsUseCase || mappingUseCase) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "requiredPropertiesInputType"; extraSchema.requiredProperties = requiredProperties; + extraSchema.additionalProperties = additionalProperties; if (requiredProperties.allAreInline()) { schemasBeforeImports.add(extraSchema); } else { diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs index ad71bb9717f..6bd85772d14 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_getschemas.hbs @@ -16,20 +16,13 @@ {{> components/schemas/_helper_properties_type }} {{else}} {{#eq instanceType "requiredPropertiesInputType" }} -{{> components/schemas/_helper_required_properties_type }} +{{> components/schemas/_helper_required_properties_input_type }} {{else}} {{#eq instanceType "optionalPropertiesInputType" }} -{{> components/schemas/_helper_optional_properties_type }} +{{> components/schemas/_helper_optional_properties_input_type }} {{else}} {{#eq instanceType "propertiesInputType" }} - {{#and requiredAndOptionalProperties requiredProperties optionalProperties additionalProperties additionalProperties.isBooleanSchemaFalse}} - - -class {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.camelCase}}, {{optionalProperties.jsonPathPiece.camelCase}}): - pass - {{else}} -"""todo define mapping here""" - {{/and}} +{{> components/schemas/_helper_properties_input_type }} {{else}} {{#eq instanceType "importsType" }} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 01e4686c649..c1ea5632c03 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -18,32 +18,10 @@ def __new__( ], {{/contains}} {{#contains types "object"}} - {{#if requiredAndOptionalProperties}} arg_: typing.Union[ - {{requiredAndOptionalProperties.jsonPathPiece.camelCase}}, + {{mapInputJsonPathPiece.camelCase}}, {{jsonPathPiece.camelCase}}[frozendict.frozendict], ], - {{else}} - {{#if additionalProperties}} - {{#if additionalProperties.isBooleanSchemaFalse }} - {{! additionalProperties is False, empty map allowed}} - arg_: typing.Mapping, - {{else}} - {{! additionalProperties is True/schema}} - arg_: typing.Mapping[ - str, - typing.Union[ - {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} - {{/with}} - ] - ], - {{/if}} - {{else}} - {{! additionalProperties is unset}} - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], - {{/if}} - {{/if}} {{/contains}} {{#contains types "string"}} arg_: {{> _helper_schema_python_types }}, diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs similarity index 73% rename from modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs rename to modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs index 84a147dacc1..19e841946f1 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs @@ -1,3 +1,5 @@ +{{#if additionalProperties}} + {{#if additionalProperties.isBooleanSchemaFalse}} {{optionalProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( '{{optionalProperties.jsonPathPiece.camelCase}}', { @@ -17,3 +19,9 @@ }, total=False ) + {{else}} +# todo optional properties mapping w/ addProps set + {{/if}} +{{else}} +# todo optional properties mapping w/ addProps unset +{{/if}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs new file mode 100644 index 00000000000..9d3efa3550d --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs @@ -0,0 +1,33 @@ +{{#if additionalProperties}} + {{#if additionalProperties.isBooleanSchemaFalse}} + {{#and requiredProperties optionalProperties}} + + +class {{mapInputJsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.camelCase}}, {{optionalProperties.jsonPathPiece.camelCase}}): + pass + {{else}} + {{! empty mapping }} +{{mapInputJsonPathPiece.camelCase}} = typing.Mapping # mapping must be empty + {{/and}} + {{else}} + {{! addProps True/schema}} + {{#and requiredProperties optionalProperties}} +# todo properties mapping with required and optional and addprops + {{else}} +{{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + ] +] + {{/and}} + {{/if}} +{{else}} + {{#and requiredProperties optionalProperties}} +# todo properties mapping with required and optional and unset addprops + {{else}} +{{mapInputJsonPathPiece.camelCase}} = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] + {{/and}} +{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs similarity index 81% rename from modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs rename to modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs index 21ca046d69e..684c9f21128 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs @@ -1,3 +1,5 @@ +{{#if additionalProperties}} + {{#if additionalProperties.isBooleanSchemaFalse}} {{requiredProperties.jsonPathPiece.camelCase}} = typing_extensions.TypedDict( '{{requiredProperties.jsonPathPiece.camelCase}}', { @@ -25,3 +27,9 @@ {{/each}} } ) + {{else}} +# todo required properties mapping w/ addProps set + {{/if}} +{{else}} +# todo required properties mapping w/ addProps unset +{{/if}} From 88fb582d32c814293df12d63cd3ae3e32e9cf944 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 11:15:31 -0700 Subject: [PATCH 14/36] Adds req property mapping writing when addprops set --- .../codegen/model/CodegenSchema.java | 3 +- ..._helper_required_properties_input_type.hbs | 31 ++++++- .../content/application_json/schema.py | 9 +- .../schema/abstract_step_message.py | 1 + .../schema/additional_properties_class.py | 69 ++++++++++++-- .../schema/additional_properties_validator.py | 86 +++++++++++++++-- ...ditional_properties_with_array_of_enums.py | 9 +- .../petstore_api/components/schema/address.py | 9 +- .../components/schema/any_type_and_format.py | 2 +- .../components/schema/apple_req.py | 15 +-- .../petstore_api/components/schema/banana.py | 1 + .../components/schema/banana_req.py | 15 +-- .../components/schema/basque_pig.py | 1 + .../components/schema/composed_object.py | 5 +- .../schema/composed_one_of_different_types.py | 5 +- .../components/schema/danish_pig.py | 1 + .../petstore_api/components/schema/drawing.py | 25 ++++- .../components/schema/grandparent_animal.py | 1 + .../json_patch_request_add_replace_test.py | 6 +- .../schema/json_patch_request_move_copy.py | 6 +- .../schema/json_patch_request_remove.py | 6 +- .../components/schema/map_test.py | 33 ++++++- ...perties_and_additional_properties_class.py | 25 ++++- .../petstore_api/components/schema/money.py | 1 + .../schema/no_additional_properties.py | 16 +--- .../components/schema/nullable_class.py | 52 +++++++++-- .../schema/obj_with_required_props.py | 1 + .../schema/obj_with_required_props_base.py | 1 + ...ject_model_with_arg_and_args_properties.py | 1 + .../object_with_colliding_properties.py | 2 +- ...object_with_inline_composition_property.py | 2 +- ...ect_with_invalid_named_refed_properties.py | 1 + .../schema/object_with_validations.py | 5 +- .../components/schema/parent_pet.py | 5 +- .../schema/quadrilateral_interface.py | 1 + .../req_props_from_explicit_add_props.py | 23 ++++- .../schema/req_props_from_true_add_props.py | 93 ++++++++++++++++++- .../schema/req_props_from_unset_add_props.py | 1 + .../schema/self_referencing_object_model.py | 25 ++++- .../components/schema/string_boolean_map.py | 8 +- .../components/schema/triangle_interface.py | 1 + .../petstore_api/components/schema/user.py | 2 +- .../petstore_api/components/schema/zebra.py | 4 +- .../content/application_json/schema.py | 8 +- .../post/parameters/parameter_1/schema.py | 2 +- .../content/multipart_form_data/schema.py | 2 +- .../content/multipart_form_data/schema.py | 2 +- .../schema.py | 1 + .../paths/foo/get/servers/server_1.py | 6 +- .../pet_find_by_status/servers/server_1.py | 6 +- .../src/petstore_api/servers/server_0.py | 6 +- .../src/petstore_api/servers/server_1.py | 6 +- 52 files changed, 537 insertions(+), 111 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index 01121530fb6..e8ad9c947fe 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -85,7 +85,6 @@ public class CodegenSchema { public CodegenKey jsonPathPiece; public String unescapedDescription; public LinkedHashMapWithContext optionalProperties; - public LinkedHashMapWithContext requiredAndOptionalProperties; public CodegenKey mapInputJsonPathPiece; public boolean schemaIsFromAdditionalProperties; public HashMap testCases = new HashMap<>(); @@ -255,7 +254,7 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL extraSchema.instanceType = "propertiesInputType"; extraSchema.optionalProperties = optionalProperties; extraSchema.requiredProperties = requiredProperties; - extraSchema.requiredAndOptionalProperties = requiredAndOptionalProperties; + extraSchema.mapInputJsonPathPiece = mapInputJsonPathPiece; extraSchema.additionalProperties = additionalProperties; boolean allAreInline = true; if (requiredProperties != null && optionalProperties != null && typedDictReqAndOptional) { diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs index 684c9f21128..04d2a9c28ba 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs @@ -28,7 +28,36 @@ } ) {{else}} -# todo required properties mapping w/ addProps set +{{requiredProperties.jsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each requiredProperties}} + {{#with this}} + {{#if refInfo.refClass}} + typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], + {{else}} + {{#if jsonPathPiece}} + typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} + ], + {{else}} + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], + {{/if}} + {{/if}} + {{/with}} + {{/each}} + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + ] +] {{/if}} {{else}} # todo required properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index 2d6cbf957db..34fe719d68d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -11,7 +11,14 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.Int32Schema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index db1006fba16..fb5d95dad82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -17,6 +17,7 @@ "discriminator": typing.Type[Discriminator], } ) +# todo required properties mapping w/ addProps unset class AbstractStepMessage( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 084d1b88e8b..54ff6c32e7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -11,7 +11,13 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[str], + str + ] +] class MapProperty( @@ -48,7 +54,13 @@ def __new__( return inst AdditionalProperties3: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput2 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[str], + str + ] +] class AdditionalProperties2( @@ -84,7 +96,14 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput3 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[frozendict.frozendict], + dict, + frozendict.frozendict + ] +] class MapOfMapProperty( @@ -124,7 +143,30 @@ def __new__( MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema[U] MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema[U] AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" +DictInput8 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties4[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class MapWithUndeclaredPropertiesAnytype3( @@ -153,7 +195,7 @@ def __getitem__(self, name: str) -> AdditionalProperties4[typing.Union[ def __new__( cls, arg_: typing.Union[ - DictInput4, + DictInput8, MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -184,7 +226,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping, + arg_: typing.Union[ + DictInput11, + EmptyMap[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EmptyMap[frozendict.frozendict]: inst = super().__new__( @@ -199,7 +244,13 @@ def __new__( return inst AdditionalProperties6: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput12 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties6[str], + str + ] +] class MapWithUndeclaredPropertiesString( @@ -219,7 +270,7 @@ def __getitem__(self, name: str) -> AdditionalProperties6[str]: def __new__( cls, arg_: typing.Union[ - DictInput5, + DictInput12, MapWithUndeclaredPropertiesString[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -330,7 +381,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput6, + DictInput13, AdditionalPropertiesClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 3236fe1af24..c3962c87f0c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -11,7 +11,30 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" +DictInput2 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class _0( @@ -40,7 +63,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[typing.Union[ def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, _0[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -107,7 +130,30 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput4 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class _1( @@ -136,7 +182,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, arg_: typing.Union[ - DictInput2, + DictInput4, _1[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -203,7 +249,30 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput6 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class _2( @@ -232,7 +301,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, arg_: typing.Union[ - DictInput3, + DictInput6, _2[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -275,7 +344,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Union[ + DictInput7, + AdditionalPropertiesValidator[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesValidator[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index ce158c2ca81..0ba48227b82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -46,7 +46,14 @@ def __new__( def __getitem__(self, name: int) -> enum_class.EnumClass[str]: return super().__getitem__(name) -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[tuple], + list, + tuple + ] +] class AdditionalPropertiesWithArrayOfEnums( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index 9a656635588..f52f1c8b855 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -11,7 +11,14 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ] +] class Address( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 95f7c08f088..83817197524 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -645,7 +645,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput10, AnyTypeAndFormat[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index a2b5a84a1c4..82e5b19184c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -29,19 +29,10 @@ ], } ) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "mealy": typing.Union[ - Mealy[schemas.BoolClass], - bool - ], - }, - total=False -) +# todo optional properties mapping w/ addProps unset -class DictInput(RequiredDictInput, OptionalDictInput): +class DictInput3(RequiredDictInput, OptionalDictInput): pass @@ -87,7 +78,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, AppleReq[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index b750d9bf4f3..03eb76bd22e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -17,6 +17,7 @@ "lengthCm": typing.Type[LengthCm], } ) +# todo required properties mapping w/ addProps unset class Banana( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 96b4c4be498..9fe4af94498 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -31,19 +31,10 @@ ], } ) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "sweet": typing.Union[ - Sweet[schemas.BoolClass], - bool - ], - }, - total=False -) +# todo optional properties mapping w/ addProps unset -class DictInput(RequiredDictInput, OptionalDictInput): +class DictInput3(RequiredDictInput, OptionalDictInput): pass @@ -89,7 +80,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, BananaReq[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index c76fca3cac1..eb7974ac2fc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -37,6 +37,7 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +# todo required properties mapping w/ addProps unset class BasquePig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 0bf85f09d74..50d36a11787 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -36,7 +36,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Union[ + DictInput2, + ComposedObject[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedObject[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 5fc82c44700..330ac477207 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -27,7 +27,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Union[ + DictInput, + _4[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _4[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index 4036dc6d5c6..cbc649734ab 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -37,6 +37,7 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +# todo required properties mapping w/ addProps unset class DanishPig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 9fbcf417bcf..1545da1ca59 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -72,7 +72,30 @@ def __getitem__(self, name: int) -> shape.Shape[typing.Union[ ]]: return super().__getitem__(name) -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class Drawing( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 56ad0618e62..544efae513f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -17,6 +17,7 @@ "pet_type": typing.Type[PetType], } ) +# todo required properties mapping w/ addProps unset class GrandparentAnimal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index f4b965d3707..b5340898d02 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -52,8 +52,8 @@ def TEST(cls) -> Op[str]: "op": typing.Type[Op], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput4 = typing_extensions.TypedDict( + 'DictInput4', { "op": typing.Union[ Op[str], @@ -162,7 +162,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput4, JSONPatchRequestAddReplaceTest[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 4fd56649412..1f8a5b53482 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -47,8 +47,8 @@ def COPY(cls) -> Op[str]: "op": typing.Type[Op], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "from": typing.Union[ _From[str], @@ -118,7 +118,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, JSONPatchRequestMoveCopy[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index baddbcc6b4a..a09bb96ef4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -40,8 +40,8 @@ def REMOVE(cls) -> Op[str]: "op": typing.Type[Op], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "op": typing.Union[ Op[str], @@ -102,7 +102,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, JSONPatchRequestRemove[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 20fc7111398..0ded398edac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -11,7 +11,13 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties2: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[str], + str + ] +] class AdditionalProperties( @@ -47,7 +53,14 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput2 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ] +] class MapMapOfString( @@ -109,7 +122,13 @@ def UPPER(cls) -> AdditionalProperties3[str]: @schemas.classproperty def LOWER(cls) -> AdditionalProperties3[str]: return cls("lower") # type: ignore -"""todo define mapping here""" +DictInput3 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[str], + str + ] +] class MapOfEnumString( @@ -146,7 +165,13 @@ def __new__( return inst AdditionalProperties4: typing_extensions.TypeAlias = schemas.BoolSchema[U] -"""todo define mapping here""" +DictInput4 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties4[schemas.BoolClass], + bool + ] +] class DirectMap( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 3fb80fdc46d..b05dfe990f5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -12,7 +12,30 @@ Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class Map( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index 7201428a84a..c76be3299ac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -97,3 +97,4 @@ def __new__( "currency": typing.Type[currency.Currency], } ) +# todo required properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 7ba083a24de..443f39da5f0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -30,20 +30,10 @@ ], } ) -OptionalDictInput = typing_extensions.TypedDict( - 'OptionalDictInput', - { - "petId": typing.Union[ - PetId[decimal.Decimal], - decimal.Decimal, - int - ], - }, - total=False -) +# todo optional properties mapping w/ addProps unset -class DictInput(RequiredDictInput, OptionalDictInput): +class DictInput3(RequiredDictInput, OptionalDictInput): pass @@ -89,7 +79,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, NoAdditionalProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 65c509c0e17..f9498bbdba6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -590,7 +590,14 @@ def __getitem__(self, name: int) -> Items3[typing.Union[ return super().__getitem__(name) AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema[U] -"""todo define mapping here""" +DictInput5 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ] +] class ObjectNullableProp( @@ -692,7 +699,18 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput7 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties2[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ] +] class ObjectAndItemsNullableProp( @@ -797,7 +815,18 @@ def __new__( ) return inst -"""todo define mapping here""" +DictInput9 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties3[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ] +] class ObjectItemsNullable( @@ -820,7 +849,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, arg_: typing.Union[ - DictInput3, + DictInput9, ObjectItemsNullable[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -853,7 +882,18 @@ def __new__( "object_items_nullable": typing.Type[ObjectItemsNullable], } ) -"""todo define mapping here""" +DictInput11 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties4[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ] +] class NullableClass( @@ -968,7 +1008,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput4, + DictInput11, NullableClass[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 304a781c068..915869c5170 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -17,6 +17,7 @@ "a": typing.Type[A], } ) +# todo required properties mapping w/ addProps unset class ObjWithRequiredProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 57fea976a43..914115397b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -17,6 +17,7 @@ "b": typing.Type[B], } ) +# todo required properties mapping w/ addProps unset class ObjWithRequiredPropsBase( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 54df90929b9..0f8ec1193f1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -19,6 +19,7 @@ "args": typing.Type[Args], } ) +# todo required properties mapping w/ addProps unset class ObjectModelWithArgAndArgsProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 9a97ff70505..c67cecda372 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -70,7 +70,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, ObjectWithCollidingProperties[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 1332645d91a..19380c35de9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -137,7 +137,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, ObjectWithInlineCompositionProperty[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index dcc76c14974..d5647112fa1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -89,3 +89,4 @@ def __new__( "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], } ) +# todo required properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 96c73b2795e..74e36463e3b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -29,7 +29,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Union[ + DictInput, + ObjectWithValidations[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithValidations[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index c62530ee4e9..530b7629d95 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -39,7 +39,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA], + arg_: typing.Union[ + DictInput, + ParentPet[frozendict.frozendict], + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ParentPet[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index ebcb62e5e4e..66f1711e776 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -39,6 +39,7 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +# todo required properties mapping w/ addProps unset class QuadrilateralInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 12088ddb420..3990564f072 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -11,7 +11,28 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + AdditionalProperties[str], + str + ], + typing.Union[ + AdditionalProperties[str], + str + ], + AdditionalProperties[str], + str + ] +] +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[str], + str + ] +] class ReqPropsFromExplicitAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 12195d70de7..889536f9252 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -11,7 +11,96 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] -"""todo define mapping here""" +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] +DictInput2 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class ReqPropsFromTrueAddProps( @@ -96,7 +185,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, ReqPropsFromTrueAddProps[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index a4393b15d6d..7bd33f08a10 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +# todo required properties mapping w/ addProps unset class ReqPropsFromUnsetAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 040517a6455..530dd287403 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -10,7 +10,30 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class SelfReferencingObjectModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index b33c030d250..5bff1af0b0f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -11,7 +11,13 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[schemas.BoolClass], + bool + ] +] class StringBooleanMap( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index a4dbd719e5c..3243518f05f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -39,6 +39,7 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) +# todo required properties mapping w/ addProps unset class TriangleInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 8615eaf7efe..8adda66669a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -262,7 +262,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput6, User[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 62cf29bef82..7f912b603b6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -70,7 +70,7 @@ def ZEBRA(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -"""todo define mapping here""" +# todo properties mapping with required and optional and addprops class Zebra( @@ -128,7 +128,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, Zebra[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index fc8e459cc23..5272bae28a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -11,7 +11,13 @@ from petstore_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema[U] -"""todo define mapping here""" +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[str], + str + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index e4c355da0f8..5e19e463293 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -132,7 +132,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index e4c355da0f8..5e19e463293 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -132,7 +132,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index e4c355da0f8..5e19e463293 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -132,7 +132,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput2, Schema[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 5709d75b258..5450dcdab7e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,6 +19,7 @@ "param2": typing.Type[Param2], } ) +# todo required properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index c16851c05c0..9a5e27bedca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "version": typing.Union[ Version[str], @@ -84,7 +84,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index c16851c05c0..9a5e27bedca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "version": typing.Union[ Version[str], @@ -84,7 +84,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 1112afc71d8..4cc8a1940a3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -73,8 +73,8 @@ def POSITIVE_8080(cls) -> Port[str]: "port": typing.Type[Port], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "port": typing.Union[ Port[str], @@ -130,7 +130,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 6ba3cc4062c..23e3d9557b0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -40,8 +40,8 @@ def V2(cls) -> Version[str]: "version": typing.Type[Version], } ) -DictInput = typing_extensions.TypedDict( - 'DictInput', +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', { "version": typing.Union[ Version[str], @@ -84,7 +84,7 @@ def __getitem__( def __new__( cls, arg_: typing.Union[ - DictInput, + DictInput3, Variables[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None From 37a1e78a6a9685931f86a3b011ebdd0fc1e62b37 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 11:21:05 -0700 Subject: [PATCH 15/36] Adds last required object type definition --- ..._helper_required_properties_input_type.hbs | 29 +++++++- .../schema/abstract_step_message.py | 67 ++++++++++++++++++- .../petstore_api/components/schema/banana.py | 13 +++- .../components/schema/basque_pig.py | 11 ++- .../components/schema/danish_pig.py | 11 ++- .../components/schema/grandparent_animal.py | 11 ++- .../petstore_api/components/schema/money.py | 15 ++++- .../schema/obj_with_required_props.py | 11 ++- .../schema/obj_with_required_props_base.py | 11 ++- ...ject_model_with_arg_and_args_properties.py | 15 ++++- ...ect_with_invalid_named_refed_properties.py | 17 ++++- .../schema/quadrilateral_interface.py | 15 ++++- .../schema/req_props_from_unset_add_props.py | 63 ++++++++++++++++- .../components/schema/triangle_interface.py | 15 ++++- .../schema.py | 15 ++++- 15 files changed, 304 insertions(+), 15 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs index 04d2a9c28ba..7130aba27a0 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs @@ -60,5 +60,32 @@ ] {{/if}} {{else}} -# todo required properties mapping w/ addProps unset +{{requiredProperties.jsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each requiredProperties}} + {{#with this}} + {{#if refInfo.refClass}} + typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], + {{else}} + {{#if jsonPathPiece}} + typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} + ], + {{else}} + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], + {{/if}} + {{/if}} + {{/with}} + {{/each}} + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] {{/if}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index fb5d95dad82..f6c99f98c1a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -17,7 +17,72 @@ "discriminator": typing.Type[Discriminator], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Discriminator[str], + str + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class AbstractStepMessage( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 03eb76bd22e..b5b543ab5d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -17,7 +17,18 @@ "lengthCm": typing.Type[LengthCm], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + LengthCm[decimal.Decimal], + decimal.Decimal, + int, + float + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Banana( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index eb7974ac2fc..b9f9f81f62d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -37,7 +37,16 @@ def BASQUE_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ClassName[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class BasquePig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index cbc649734ab..aac6f6d57ed 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -37,7 +37,16 @@ def DANISH_PIG(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ClassName[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class DanishPig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 544efae513f..b3bb1e41d59 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -17,7 +17,16 @@ "pet_type": typing.Type[PetType], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + PetType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class GrandparentAnimal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index c76be3299ac..a33c397eae5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -97,4 +97,17 @@ def __new__( "currency": typing.Type[currency.Currency], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Amount[str], + str + ], + typing.Union[ + currency.Currency[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 915869c5170..cd1c31cee5a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -17,7 +17,16 @@ "a": typing.Type[A], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + A[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjWithRequiredProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 914115397b2..7034a82b185 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -17,7 +17,16 @@ "b": typing.Type[B], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + B[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjWithRequiredPropsBase( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 0f8ec1193f1..76002f0073a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -19,7 +19,20 @@ "args": typing.Type[Args], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Arg[str], + str + ], + typing.Union[ + Args[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectModelWithArgAndArgsProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index d5647112fa1..db3452b7158 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -89,4 +89,19 @@ def __new__( "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + array_with_validations_in_items.ArrayWithValidationsInItems[tuple], + list, + tuple + ], + typing.Union[ + from_schema.FromSchema[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 66f1711e776..fb88fec853a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -39,7 +39,20 @@ def QUADRILATERAL(cls) -> ShapeType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + QuadrilateralType[str], + str + ], + typing.Union[ + ShapeType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class QuadrilateralInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index 7bd33f08a10..e7a859caaee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -10,7 +10,68 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ReqPropsFromUnsetAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index 3243518f05f..0072fe4e842 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -39,7 +39,20 @@ def TRIANGLE(cls) -> ShapeType[str]: "triangleType": typing.Type[TriangleType], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ShapeType[str], + str + ], + typing.Union[ + TriangleType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class TriangleInterface( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 5450dcdab7e..54351638c49 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,7 +19,20 @@ "param2": typing.Type[Param2], } ) -# todo required properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Param[str], + str + ], + typing.Union[ + Param2[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( From 3a85c43d6bf9eb65c891927bd980f2b021afb159 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 12:57:13 -0700 Subject: [PATCH 16/36] Fixes allAreInline for DictInput --- .../codegen/model/CodegenSchema.java | 32 +++-- ..._helper_optional_properties_input_type.hbs | 31 ++++- .../components/schema/_200_response.py | 1 + .../petstore_api/components/schema/_return.py | 1 + .../schema/additional_properties_class.py | 6 + .../schema/additional_properties_validator.py | 4 + .../petstore_api/components/schema/animal.py | 1 + .../components/schema/any_type_and_format.py | 10 ++ .../components/schema/any_type_not_string.py | 1 + .../components/schema/api_response.py | 1 + .../petstore_api/components/schema/apple.py | 1 + .../components/schema/apple_req.py | 11 +- .../schema/array_holding_any_type.py | 1 + .../schema/array_of_array_of_number_only.py | 1 + .../components/schema/array_of_number_only.py | 1 + .../components/schema/array_test.py | 1 + .../components/schema/banana_req.py | 11 +- .../components/schema/capitalization.py | 1 + .../src/petstore_api/components/schema/cat.py | 2 + .../components/schema/category.py | 1 + .../components/schema/child_cat.py | 2 + .../components/schema/class_model.py | 1 + .../petstore_api/components/schema/client.py | 1 + .../schema/complex_quadrilateral.py | 2 + ...d_any_of_different_types_no_validations.py | 4 + .../components/schema/composed_array.py | 1 + .../components/schema/composed_bool.py | 1 + .../components/schema/composed_none.py | 1 + .../components/schema/composed_number.py | 1 + .../components/schema/composed_object.py | 2 + .../schema/composed_one_of_different_types.py | 3 + .../components/schema/composed_string.py | 1 + .../src/petstore_api/components/schema/dog.py | 2 + .../petstore_api/components/schema/drawing.py | 116 ++++++++++++++---- .../components/schema/enum_arrays.py | 1 + .../components/schema/enum_test.py | 1 + .../components/schema/equilateral_triangle.py | 2 + .../petstore_api/components/schema/file.py | 1 + .../schema/file_schema_test_class.py | 1 + .../src/petstore_api/components/schema/foo.py | 1 + .../components/schema/format_test.py | 1 + .../components/schema/from_schema.py | 1 + .../petstore_api/components/schema/fruit.py | 1 + .../components/schema/fruit_req.py | 1 + .../components/schema/gm_fruit.py | 1 + .../components/schema/has_only_read_only.py | 1 + .../components/schema/health_check_result.py | 1 + .../components/schema/isosceles_triangle.py | 2 + .../petstore_api/components/schema/items.py | 1 + .../components/schema/json_patch_request.py | 1 + .../json_patch_request_add_replace_test.py | 1 + .../petstore_api/components/schema/mammal.py | 1 + .../components/schema/map_test.py | 1 + ...perties_and_additional_properties_class.py | 49 ++++---- .../petstore_api/components/schema/name.py | 1 + .../schema/no_additional_properties.py | 12 +- .../components/schema/nullable_class.py | 106 ++++++++++++++++ .../components/schema/nullable_shape.py | 1 + .../components/schema/number_only.py | 1 + .../components/schema/object_interface.py | 1 + .../schema/object_model_with_ref_props.py | 1 + ..._with_req_test_prop_from_unset_add_prop.py | 2 + .../object_with_colliding_properties.py | 3 + .../schema/object_with_decimal_properties.py | 1 + .../object_with_difficultly_named_props.py | 1 + ...object_with_inline_composition_property.py | 2 + .../schema/object_with_optional_test_prop.py | 1 + .../schema/object_with_validations.py | 1 + .../petstore_api/components/schema/order.py | 1 + .../components/schema/parent_pet.py | 1 + .../src/petstore_api/components/schema/pet.py | 1 + .../src/petstore_api/components/schema/pig.py | 1 + .../petstore_api/components/schema/player.py | 1 + .../components/schema/quadrilateral.py | 1 + .../components/schema/read_only_first.py | 1 + .../req_props_from_explicit_add_props.py | 7 -- .../schema/req_props_from_true_add_props.py | 25 +--- .../components/schema/scalene_triangle.py | 2 + .../schema/self_referencing_object_model.py | 53 ++++---- .../petstore_api/components/schema/shape.py | 1 + .../components/schema/shape_or_null.py | 1 + .../components/schema/simple_quadrilateral.py | 2 + .../components/schema/some_object.py | 1 + .../components/schema/special_model_name.py | 1 + .../src/petstore_api/components/schema/tag.py | 1 + .../components/schema/triangle.py | 1 + .../petstore_api/components/schema/user.py | 6 + .../petstore_api/components/schema/whale.py | 1 + .../petstore_api/components/schema/zebra.py | 1 + .../schema.py | 1 + .../content/application_json/schema.py | 1 + .../schema.py | 1 + .../post/parameters/parameter_0/schema.py | 1 + .../post/parameters/parameter_1/schema.py | 2 + .../content/application_json/schema.py | 1 + .../content/multipart_form_data/schema.py | 2 + .../content/application_json/schema.py | 1 + .../content/multipart_form_data/schema.py | 2 + .../application_json_charsetutf8/schema.py | 1 + .../application_json_charsetutf8/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../get/parameters/parameter_0/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/multipart_form_data/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/multipart_form_data/schema.py | 1 + .../content/multipart_form_data/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../content/application_json/schema.py | 1 + .../schema.py | 1 + .../content/multipart_form_data/schema.py | 1 + 120 files changed, 488 insertions(+), 117 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java index e8ad9c947fe..be612923129 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenSchema.java @@ -223,9 +223,9 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL } } boolean additionalPropertiesIsBooleanSchemaFalse = (additionalProperties != null && additionalProperties.isBooleanSchemaFalse); - boolean typedDictRequiredPropsUseCase = (requiredProperties != null && additionalPropertiesIsBooleanSchemaFalse); + boolean typedDictUseCase = (requiredProperties != null && additionalPropertiesIsBooleanSchemaFalse); boolean mappingUseCase = (requiredProperties != null && !additionalPropertiesIsBooleanSchemaFalse && optionalProperties == null); - if (typedDictRequiredPropsUseCase || mappingUseCase) { + if (typedDictUseCase || mappingUseCase) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "requiredPropertiesInputType"; extraSchema.requiredProperties = requiredProperties; @@ -236,29 +236,41 @@ private void getAllSchemas(ArrayList schemasBeforeImports, ArrayL schemasAfterImports.add(extraSchema); } } - if (optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse) { + typedDictUseCase = (optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse); + mappingUseCase = (optionalProperties != null && !additionalPropertiesIsBooleanSchemaFalse && requiredProperties == null); + if (typedDictUseCase || mappingUseCase) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "optionalPropertiesInputType"; extraSchema.optionalProperties = optionalProperties; + extraSchema.additionalProperties = additionalProperties; if (optionalProperties.allAreInline()) { schemasBeforeImports.add(extraSchema); } else { schemasAfterImports.add(extraSchema); } } - boolean typedDictReqAndOptional = ( - requiredProperties != null && optionalProperties != null && additionalPropertiesIsBooleanSchemaFalse - ); - if (typedDictReqAndOptional || (additionalProperties != null && !additionalProperties.isBooleanSchemaFalse)) { + boolean requiredPropsAndOptionalPropsSet = (requiredProperties != null && optionalProperties != null); + boolean requiredPropsAndOptionalPropsUnset = (requiredProperties == null && optionalProperties == null); + if ((requiredPropsAndOptionalPropsSet || requiredPropsAndOptionalPropsUnset) && mapInputJsonPathPiece != null) { CodegenSchema extraSchema = new CodegenSchema(); extraSchema.instanceType = "propertiesInputType"; extraSchema.optionalProperties = optionalProperties; extraSchema.requiredProperties = requiredProperties; extraSchema.mapInputJsonPathPiece = mapInputJsonPathPiece; extraSchema.additionalProperties = additionalProperties; - boolean allAreInline = true; - if (requiredProperties != null && optionalProperties != null && typedDictReqAndOptional) { - allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline()); + boolean allAreInline; + if (requiredPropsAndOptionalPropsSet) { + if (additionalProperties == null) { + allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline()); + } else { + allAreInline = (requiredProperties.allAreInline() && optionalProperties.allAreInline() && additionalProperties.refInfo == null); + } + } else { + if (additionalProperties == null) { + allAreInline = true; + } else { + allAreInline = additionalProperties.refInfo == null; + } } if (allAreInline) { schemasBeforeImports.add(extraSchema); diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs index 19e841946f1..7e728b226c2 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs @@ -20,7 +20,36 @@ total=False ) {{else}} -# todo optional properties mapping w/ addProps set +{{optionalProperties.jsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each optionalProperties}} + {{#with this}} + {{#if refInfo.refClass}} + typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], + {{else}} + {{#if jsonPathPiece}} + typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} + ], + {{else}} + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], + {{/if}} + {{/if}} + {{/with}} + {{/each}} + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + ] +] {{/if}} {{else}} # todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index e7e37ece058..669e548ba3c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -19,6 +19,7 @@ "class": typing.Type[_Class], } ) +# todo optional properties mapping w/ addProps unset class _200Response( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 1f3e8c07b89..135dfbac0dc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -17,6 +17,7 @@ "return": typing.Type[_Return], } ) +# todo optional properties mapping w/ addProps unset class _Return( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 54ff6c32e7c..430c5b32e34 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -139,9 +139,13 @@ def __new__( ) return inst +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Anytype1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +DictInput5 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema[U] +DictInput6 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema[U] +DictInput7 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] DictInput8 = typing.Mapping[ str, @@ -212,6 +216,7 @@ def __new__( return inst AdditionalProperties5: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] +DictInput11 = typing.Mapping # mapping must be empty class EmptyMap( @@ -299,6 +304,7 @@ def __new__( "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], } ) +# todo optional properties mapping w/ addProps unset class AdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index c3962c87f0c..8347c371b10 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] DictInput2 = typing.Mapping[ str, @@ -79,6 +80,7 @@ def __new__( ) return inst +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalProperties2( @@ -198,6 +200,7 @@ def __new__( ) return inst +DictInput5 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalProperties3( @@ -322,6 +325,7 @@ def __new__( typing.Type[_1[schemas.U]], typing.Type[_2[schemas.U]], ] +DictInput7 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalPropertiesValidator( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 8c61ecfbd13..1332182f364 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -31,6 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) +# todo properties mapping with required and optional and unset addprops class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 83817197524..1f1c9e51c16 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Uuid( @@ -62,6 +63,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Date( @@ -114,6 +116,7 @@ def __new__( ) return inst +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class DateTime( @@ -166,6 +169,7 @@ def __new__( ) return inst +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Number( @@ -218,6 +222,7 @@ def __new__( ) return inst +DictInput5 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Binary( @@ -269,6 +274,7 @@ def __new__( ) return inst +DictInput6 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Int32( @@ -320,6 +326,7 @@ def __new__( ) return inst +DictInput7 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Int64( @@ -371,6 +378,7 @@ def __new__( ) return inst +DictInput8 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Double( @@ -422,6 +430,7 @@ def __new__( ) return inst +DictInput9 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _Float( @@ -487,6 +496,7 @@ def __new__( "float": typing.Type[_Float], } ) +# todo optional properties mapping w/ addProps unset class AnyTypeAndFormat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 38ce281842a..376e3850e8f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -11,6 +11,7 @@ from petstore_api.shared_imports.schema_imports import * _Not: typing_extensions.TypeAlias = schemas.StrSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AnyTypeNotString( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index a23a0db4938..4a585087b2b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -21,6 +21,7 @@ "message": typing.Type[Message], } ) +# todo optional properties mapping w/ addProps unset class ApiResponse( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 05a7acf577c..ecb7c33e189 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -48,6 +48,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) +# todo properties mapping with required and optional and unset addprops class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 82e5b19184c..d94a01a8bc9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -29,7 +29,16 @@ ], } ) -# todo optional properties mapping w/ addProps unset +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "mealy": typing.Union[ + Mealy[schemas.BoolClass], + bool + ], + }, + total=False +) class DictInput3(RequiredDictInput, OptionalDictInput): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index e1370170a48..0d00d87c344 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index bac113d7ca0..22c8f796d00 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -92,6 +92,7 @@ def __getitem__(self, name: int) -> Items[tuple]: "ArrayArrayNumber": typing.Type[ArrayArrayNumber], } ) +# todo optional properties mapping w/ addProps unset class ArrayOfArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index dac65e34a38..a04b3239fb1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -55,6 +55,7 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: "ArrayNumber": typing.Type[ArrayNumber], } ) +# todo optional properties mapping w/ addProps unset class ArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index dd6201c7b96..58acea8b5e9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -204,6 +204,7 @@ def __getitem__(self, name: int) -> Items4[tuple]: "array_array_of_model": typing.Type[ArrayArrayOfModel], } ) +# todo optional properties mapping w/ addProps unset class ArrayTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 9fe4af94498..427b16ef5fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -31,7 +31,16 @@ ], } ) -# todo optional properties mapping w/ addProps unset +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "sweet": typing.Union[ + Sweet[schemas.BoolClass], + bool + ], + }, + total=False +) class DictInput3(RequiredDictInput, OptionalDictInput): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 7bfc6551114..ba7679b6c73 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -27,6 +27,7 @@ "ATT_NAME": typing.Type[ATTNAME], } ) +# todo optional properties mapping w/ addProps unset class Capitalization( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index b5fc0a15597..138b85b6da7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -17,6 +17,7 @@ "declawed": typing.Type[Declawed], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -73,6 +74,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Cat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index f37e1108c1e..153e38eef43 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -31,6 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) +# todo properties mapping with required and optional and unset addprops class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 6474cc21561..f8efe969ac8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -17,6 +17,7 @@ "name": typing.Type[Name], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -73,6 +74,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ChildCat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index fa69b67ae74..6caaf6ee931 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -17,6 +17,7 @@ "_class": typing.Type[_Class], } ) +# todo optional properties mapping w/ addProps unset class ClassModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 7d11206ff9f..b6b1a3b52f7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -17,6 +17,7 @@ "client": typing.Type[Client], } ) +# todo optional properties mapping w/ addProps unset class Client( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index a01fed1d0ef..bbe9cc9f1b4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -37,6 +37,7 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -93,6 +94,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ComplexQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 32242708521..33da1a40118 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -10,15 +10,18 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.DictSchema[U] _1: typing_extensions.TypeAlias = schemas.DateSchema[U] _2: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] _3: typing_extensions.TypeAlias = schemas.BinarySchema[U] _4: typing_extensions.TypeAlias = schemas.StrSchema[U] _5: typing_extensions.TypeAlias = schemas.StrSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _6: typing_extensions.TypeAlias = schemas.DictSchema[U] _7: typing_extensions.TypeAlias = schemas.BoolSchema[U] _8: typing_extensions.TypeAlias = schemas.NoneSchema[U] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] @@ -106,6 +109,7 @@ def __getitem__(self, name: int) -> Items[typing.Union[ typing.Type[_14[schemas.U]], typing.Type[_15[schemas.U]], ] +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ComposedAnyOfDifferentTypesNoValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 06177ddf24b..4d1d3802130 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index 80edc370de9..3a7ded794e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index 716a7bb2ddb..05697e3bf57 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index bee636d9943..dddbe81c82c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 50d36a11787..051f0c6d594 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -10,10 +10,12 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ComposedObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 330ac477207..b21852cacdc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -12,6 +12,7 @@ _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] _3: typing_extensions.TypeAlias = schemas.DateSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _4( @@ -44,6 +45,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] @@ -125,6 +127,7 @@ class Schema_(metaclass=schemas.SingletonMeta): pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^2020.*' # noqa: E501 ) +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ComposedOneOfDifferentTypes( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index ddada15171f..eea6534414d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index fc73d7e24c5..1d410f3b912 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -17,6 +17,7 @@ "breed": typing.Type[Breed], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -73,6 +74,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Dog( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 1545da1ca59..b25761c0294 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -72,30 +72,6 @@ def __getitem__(self, name: int) -> shape.Shape[typing.Union[ ]]: return super().__getitem__(name) -DictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] -] class Drawing( @@ -211,3 +187,95 @@ def __new__( "shapes": typing.Type[Shapes], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + shape.Shape[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + shape_or_null.ShapeOrNull[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + nullable_shape.NullableShape[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Shapes[tuple], + list, + tuple + ], + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 85c849f968a..d3dd11b67bf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -105,6 +105,7 @@ def __getitem__(self, name: int) -> Items[str]: "array_enum": typing.Type[ArrayEnum], } ) +# todo optional properties mapping w/ addProps unset class EnumArrays( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index fc0677bb041..9eda1739d42 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -249,3 +249,4 @@ def __new__( "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], } ) +# todo properties mapping with required and optional and unset addprops diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index e4d9a339931..05e6dff866b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -37,6 +37,7 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -93,6 +94,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class EquilateralTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index 2a344893db2..9266737e582 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -17,6 +17,7 @@ "sourceURI": typing.Type[SourceURI], } ) +# todo optional properties mapping w/ addProps unset class File( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 27b75514d7a..b4c6ea7b705 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -121,3 +121,4 @@ def __new__( "files": typing.Type[Files], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index 494e8a1e971..fe01ad3a408 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -79,3 +79,4 @@ def __new__( "bar": typing.Type[bar.Bar], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 06759b43cf4..f426e632f22 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -225,6 +225,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) +# todo properties mapping with required and optional and unset addprops class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 1d192defa12..145808560e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -19,6 +19,7 @@ "id": typing.Type[Id], } ) +# todo optional properties mapping w/ addProps unset class FromSchema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index e00adefb9ba..97123fffdda 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -17,6 +17,7 @@ "color": typing.Type[Color], } ) +# todo optional properties mapping w/ addProps unset class Fruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 37abb7ef3aa..d6523c97e88 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -11,6 +11,7 @@ from petstore_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class FruitReq( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index fffa86a0107..b4770ba972f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -17,6 +17,7 @@ "color": typing.Type[Color], } ) +# todo optional properties mapping w/ addProps unset class GmFruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index c517ce283d5..a76a8350f89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -19,6 +19,7 @@ "foo": typing.Type[Foo], } ) +# todo optional properties mapping w/ addProps unset class HasOnlyReadOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 4dda11fbc7f..d11ceedaf6c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -63,6 +63,7 @@ def __new__( "NullableMessage": typing.Type[NullableMessage], } ) +# todo optional properties mapping w/ addProps unset class HealthCheckResult( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 515925aab3b..d60dc5b4854 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -37,6 +37,7 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -93,6 +94,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class IsoscelesTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index c173929681a..68fe2a9bbce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 916f26c158b..174df4b26c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Items( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index b5340898d02..226a17b0611 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -12,6 +12,7 @@ AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema[U] Path: typing_extensions.TypeAlias = schemas.StrSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Value: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 398d796b5dd..5660e8288af 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Mammal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 0ded398edac..526342a0b32 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -291,3 +291,4 @@ def __new__( "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index b05dfe990f5..e1c9ef0678b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -12,30 +12,6 @@ Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema[U] DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema[U] -DictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] -] class Map( @@ -79,6 +55,7 @@ def __new__( "map": typing.Type[Map], } ) +# todo optional properties mapping w/ addProps unset class MixedPropertiesAndAdditionalPropertiesClass( @@ -150,3 +127,27 @@ def __new__( from petstore_api.components.schema import animal +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index af600180c25..bc63fee6d70 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -21,6 +21,7 @@ "property": typing.Type[_Property], } ) +# todo properties mapping with required and optional and unset addprops class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 443f39da5f0..12de9acdfcf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -30,7 +30,17 @@ ], } ) -# todo optional properties mapping w/ addProps unset +OptionalDictInput = typing_extensions.TypedDict( + 'OptionalDictInput', + { + "petId": typing.Union[ + PetId[decimal.Decimal], + decimal.Decimal, + int + ], + }, + total=False +) class DictInput3(RequiredDictInput, OptionalDictInput): diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index f9498bbdba6..4cdb6aba493 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput10 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalProperties4( @@ -350,6 +351,7 @@ def __new__( ) return inst +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.DictSchema[U] @@ -400,6 +402,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Items2( @@ -497,6 +500,7 @@ def __new__( ) return inst +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Items3( @@ -589,6 +593,7 @@ def __getitem__(self, name: int) -> Items3[typing.Union[ ]]: return super().__getitem__(name) +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema[U] DictInput5 = typing.Mapping[ str, @@ -651,6 +656,7 @@ def __new__( ) return inst +DictInput6 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalProperties2( @@ -767,6 +773,7 @@ def __new__( ) return inst +DictInput8 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AdditionalProperties3( @@ -885,6 +892,105 @@ def __new__( DictInput11 = typing.Mapping[ str, typing.Union[ + typing.Union[ + IntegerProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + None, + decimal.Decimal, + int + ], + typing.Union[ + NumberProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + None, + decimal.Decimal, + int, + float + ], + typing.Union[ + BooleanProp[typing.Union[ + schemas.NoneClass, + schemas.BoolClass + ]], + None, + bool + ], + typing.Union[ + StringProp[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str + ], + typing.Union[ + DateProp[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str, + datetime.date + ], + typing.Union[ + DatetimeProp[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str, + datetime.datetime + ], + typing.Union[ + ArrayNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + None, + list, + tuple + ], + typing.Union[ + ArrayAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + None, + list, + tuple + ], + typing.Union[ + ArrayItemsNullable[tuple], + list, + tuple + ], + typing.Union[ + ObjectNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], + typing.Union[ + ObjectAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], + typing.Union[ + ObjectItemsNullable[frozendict.frozendict], + dict, + frozendict.frozendict + ], AdditionalProperties4[typing.Union[ schemas.NoneClass, frozendict.frozendict diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 7bc3f52e136..8602da940d6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -11,6 +11,7 @@ from petstore_api.shared_imports.schema_imports import * _2: typing_extensions.TypeAlias = schemas.NoneSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class NullableShape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 0f971181f77..48fc2509ff2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -17,6 +17,7 @@ "JustNumber": typing.Type[JustNumber], } ) +# todo optional properties mapping w/ addProps unset class NumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py index 1a3c6279e36..13d92bb71e4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_interface.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] ObjectInterface: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 047bf966a18..dadd1161ca2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -93,3 +93,4 @@ def __new__( "myBoolean": typing.Type[boolean.Boolean], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 5520440dfd1..3c3fd82e756 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -17,6 +17,7 @@ "name": typing.Type[Name], } ) +# todo properties mapping with required and optional and unset addprops class _1( @@ -102,6 +103,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index c67cecda372..60392f4cce6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -10,7 +10,9 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] SomeProp: typing_extensions.TypeAlias = schemas.DictSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Someprop: typing_extensions.TypeAlias = schemas.DictSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,6 +21,7 @@ "someprop": typing.Type[Someprop], } ) +# todo optional properties mapping w/ addProps unset class ObjectWithCollidingProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 9c3cb84c9cb..12af86f6553 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -91,3 +91,4 @@ def __new__( "cost": typing.Type[money.Money], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 8a15578f9a2..d7a748f9d3f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -21,6 +21,7 @@ "123Number": typing.Type[_123Number], } ) +# todo properties mapping with required and optional and unset addprops class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 19380c35de9..638d81be563 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SomeProp( @@ -83,6 +84,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +# todo optional properties mapping w/ addProps unset class ObjectWithInlineCompositionProperty( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 05b6e41180e..3d332139adf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -17,6 +17,7 @@ "test": typing.Type[Test], } ) +# todo optional properties mapping w/ addProps unset class ObjectWithOptionalTestProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 74e36463e3b..bc46dd41e01 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ObjectWithValidations( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index a460be60404..f9cff46a060 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -69,6 +69,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "complete": typing.Type[Complete], } ) +# todo optional properties mapping w/ addProps unset class Order( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 530b7629d95..807a9cd3d35 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ParentPet( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index d578c95f069..418d3bd3976 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -226,3 +226,4 @@ def __new__( "status": typing.Type[Status], } ) +# todo properties mapping with required and optional and unset addprops diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index 48ca691cb40..d5249cf24b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Pig( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index bf3d9f3d081..31133559687 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -85,3 +85,4 @@ def __new__( "enemyPlayer": typing.Type[Player], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 00cf4dd2209..6da106d1526 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Quadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 9c20be172f3..658dbc9e621 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -19,6 +19,7 @@ "baz": typing.Type[Baz], } ) +# todo optional properties mapping w/ addProps unset class ReadOnlyFirst( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 3990564f072..1eb668852ed 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -26,13 +26,6 @@ str ] ] -DictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[str], - str - ] -] class ReqPropsFromExplicitAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 889536f9252..5f62975aae0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] DictInput2 = typing.Mapping[ str, @@ -77,30 +78,6 @@ io.BufferedReader ] ] -DictInput2 = typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] -] class ReqPropsFromTrueAddProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index e048c49568d..670dc738caa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -37,6 +37,7 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -93,6 +94,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ScaleneTriangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 530dd287403..9f35a8a4290 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -10,30 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -DictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] -] class SelfReferencingObjectModel( @@ -93,3 +69,32 @@ def __new__( "selfRef": typing.Type[SelfReferencingObjectModel], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SelfReferencingObjectModel[frozendict.frozendict], + dict, + frozendict.frozendict + ], + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index b20b0bef294..8db210fccd0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Shape( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 6fd7927d42e..0c7e11fe1b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -11,6 +11,7 @@ from petstore_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.NoneSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ShapeOrNull( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 6e1421830c5..ea58a4323b5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -37,6 +37,7 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) +# todo optional properties mapping w/ addProps unset class _1( @@ -93,6 +94,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SimpleQuadrilateral( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index cf8f767c634..575163339ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SomeObject( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 16c8ec73718..6940d971bd1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -17,6 +17,7 @@ "a": typing.Type[A], } ) +# todo optional properties mapping w/ addProps unset class SpecialModelName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 47b1f26dab7..389b4be8c55 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -19,6 +19,7 @@ "name": typing.Type[Name], } ) +# todo optional properties mapping w/ addProps unset class Tag( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index 3673f084a5a..d86d4b5dbde 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Triangle( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 8adda66669a..acebf96dc8b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -18,7 +18,9 @@ Password: typing_extensions.TypeAlias = schemas.StrSchema[U] Phone: typing_extensions.TypeAlias = schemas.StrSchema[U] UserStatus: typing_extensions.TypeAlias = schemas.Int32Schema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] ObjectWithNoDeclaredProps: typing_extensions.TypeAlias = schemas.DictSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ObjectWithNoDeclaredPropsNullable( @@ -67,8 +69,10 @@ def __new__( ) return inst +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] _Not: typing_extensions.TypeAlias = schemas.NoneSchema[U] +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AnyTypeExceptNullProp( @@ -120,6 +124,7 @@ def __new__( ) return inst +DictInput5 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -139,6 +144,7 @@ def __new__( "anyTypePropNullable": typing.Type[AnyTypePropNullable], } ) +# todo optional properties mapping w/ addProps unset class User( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index cef6ec068b2..6b3c345d19a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -41,6 +41,7 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) +# todo properties mapping with required and optional and unset addprops class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 7f912b603b6..d945796e469 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -10,6 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index d141f434e24..29e1b335ca6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -112,6 +112,7 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: "enum_form_string": typing.Type[EnumFormString], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py index b8bcb2051e9..a148bd12881 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index fe0007736d6..64bf6b55c79 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -166,6 +166,7 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) +# todo properties mapping with required and optional and unset addprops class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index 1ed2dbac7a4..ee0230f3bc9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 5e19e463293..05bae61674a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SomeProp( @@ -83,6 +84,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index 1ed2dbac7a4..ee0230f3bc9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 5e19e463293..05bae61674a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SomeProp( @@ -83,6 +84,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index 1ed2dbac7a4..ee0230f3bc9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 5e19e463293..05bae61674a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -26,6 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class SomeProp( @@ -83,6 +84,7 @@ def __new__( "someProp": typing.Type[SomeProp], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 4ff77670463..9a29bc617b8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -17,6 +17,7 @@ "keyword": typing.Type[Keyword], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 44873af2603..e9902f5d28e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,7 @@ "requiredFile": typing.Type[RequiredFile], } ) +# todo properties mapping with required and optional and unset addprops class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index f006f275485..92f6ed20069 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,7 @@ "file": typing.Type[File], } ) +# todo properties mapping with required and optional and unset addprops class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index bcc3fe03ead..065577c73e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -55,6 +55,7 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: "files": typing.Type[Files], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py index 072e994d56d..45b8bf5081e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py @@ -10,4 +10,5 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 308ed3ea839..a57410f3c28 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -74,3 +74,4 @@ def __new__( "string": typing.Type[foo.Foo], } ) +# todo optional properties mapping w/ addProps unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 22c1d067346..cc329420709 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,6 +19,7 @@ "status": typing.Type[Status], } ) +# todo optional properties mapping w/ addProps unset class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index a52c4d2920a..6316335d300 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -19,6 +19,7 @@ "file": typing.Type[File], } ) +# todo optional properties mapping w/ addProps unset class Schema( From 223f2b9e8d96eada32c038258f72d0c4f3593f81 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 13:02:04 -0700 Subject: [PATCH 17/36] Adds optional properties type hint when addProps unset --- ..._helper_optional_properties_input_type.hbs | 29 ++- .../components/schema/_200_response.py | 16 +- .../petstore_api/components/schema/_return.py | 12 +- .../schema/additional_properties_class.py | 63 +++++- .../components/schema/any_type_and_format.py | 196 +++++++++++++++++- .../components/schema/api_response.py | 20 +- .../schema/array_of_array_of_number_only.py | 12 +- .../components/schema/array_of_number_only.py | 12 +- .../components/schema/array_test.py | 22 +- .../components/schema/capitalization.py | 31 ++- .../src/petstore_api/components/schema/cat.py | 11 +- .../components/schema/child_cat.py | 11 +- .../components/schema/class_model.py | 11 +- .../petstore_api/components/schema/client.py | 11 +- .../schema/complex_quadrilateral.py | 11 +- .../src/petstore_api/components/schema/dog.py | 11 +- .../components/schema/enum_arrays.py | 16 +- .../components/schema/equilateral_triangle.py | 11 +- .../petstore_api/components/schema/file.py | 11 +- .../schema/file_schema_test_class.py | 17 +- .../src/petstore_api/components/schema/foo.py | 11 +- .../components/schema/from_schema.py | 16 +- .../petstore_api/components/schema/fruit.py | 11 +- .../components/schema/gm_fruit.py | 11 +- .../components/schema/has_only_read_only.py | 15 +- .../components/schema/health_check_result.py | 15 +- .../components/schema/isosceles_triangle.py | 11 +- .../components/schema/map_test.py | 27 ++- ...perties_and_additional_properties_class.py | 22 +- .../components/schema/number_only.py | 13 +- .../schema/object_model_with_ref_props.py | 21 +- .../object_with_colliding_properties.py | 17 +- .../schema/object_with_decimal_properties.py | 20 +- ...object_with_inline_composition_property.py | 28 ++- .../schema/object_with_optional_test_prop.py | 11 +- .../petstore_api/components/schema/order.py | 35 +++- .../petstore_api/components/schema/player.py | 16 +- .../components/schema/read_only_first.py | 15 +- .../components/schema/scalene_triangle.py | 11 +- .../components/schema/simple_quadrilateral.py | 11 +- .../components/schema/special_model_name.py | 11 +- .../src/petstore_api/components/schema/tag.py | 16 +- .../petstore_api/components/schema/user.py | 118 ++++++++++- .../schema.py | 16 +- .../post/parameters/parameter_1/schema.py | 28 ++- .../content/multipart_form_data/schema.py | 28 ++- .../content/multipart_form_data/schema.py | 28 ++- .../get/parameters/parameter_0/schema.py | 11 +- .../content/multipart_form_data/schema.py | 12 +- .../content/application_json/schema.py | 12 +- .../schema.py | 15 +- .../content/multipart_form_data/schema.py | 17 +- 52 files changed, 1131 insertions(+), 52 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs index 7e728b226c2..bd608be76a8 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs @@ -52,5 +52,32 @@ ] {{/if}} {{else}} -# todo optional properties mapping w/ addProps unset +{{optionalProperties.jsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each optionalProperties}} + {{#with this}} + {{#if refInfo.refClass}} + typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], + {{else}} + {{#if jsonPathPiece}} + typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} + ], + {{else}} + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], + {{/if}} + {{/if}} + {{/with}} + {{/each}} + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] {{/if}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 669e548ba3c..e8ed1152b22 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -19,7 +19,21 @@ "class": typing.Type[_Class], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + _Class[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _200Response( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 135dfbac0dc..71d6037be61 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -17,7 +17,17 @@ "return": typing.Type[_Return], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + _Return[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _Return( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 430c5b32e34..4f902478e24 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -304,7 +304,68 @@ def __new__( "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], } ) -# todo optional properties mapping w/ addProps unset +DictInput13 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + MapProperty[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + MapOfMapProperty[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + Anytype1[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + EmptyMap[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + MapWithUndeclaredPropertiesString[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class AdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 1f1c9e51c16..0ff59716dd8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -496,7 +496,201 @@ def __new__( "float": typing.Type[_Float], } ) -# todo optional properties mapping w/ addProps unset +DictInput10 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Uuid[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Date[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + DateTime[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Number[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Binary[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Int32[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Int64[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Double[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + _Float[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class AnyTypeAndFormat( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 4a585087b2b..9318be148c3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -21,7 +21,25 @@ "message": typing.Type[Message], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Code[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Type[str], + str + ], + typing.Union[ + Message[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ApiResponse( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 22c8f796d00..a9e889565e5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -92,7 +92,17 @@ def __getitem__(self, name: int) -> Items[tuple]: "ArrayArrayNumber": typing.Type[ArrayArrayNumber], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ArrayArrayNumber[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ArrayOfArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index a04b3239fb1..b13376dea02 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -55,7 +55,17 @@ def __getitem__(self, name: int) -> Items[decimal.Decimal]: "ArrayNumber": typing.Type[ArrayNumber], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ArrayNumber[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ArrayOfNumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 58acea8b5e9..183eafb4a43 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -204,7 +204,27 @@ def __getitem__(self, name: int) -> Items4[tuple]: "array_array_of_model": typing.Type[ArrayArrayOfModel], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ArrayOfString[tuple], + list, + tuple + ], + typing.Union[ + ArrayArrayOfInteger[tuple], + list, + tuple + ], + typing.Union[ + ArrayArrayOfModel[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ArrayTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index ba7679b6c73..b45c61fa6b7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -27,7 +27,36 @@ "ATT_NAME": typing.Type[ATTNAME], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SmallCamel[str], + str + ], + typing.Union[ + CapitalCamel[str], + str + ], + typing.Union[ + SmallSnake[str], + str + ], + typing.Union[ + CapitalSnake[str], + str + ], + typing.Union[ + SCAETHFlowPoints[str], + str + ], + typing.Union[ + ATTNAME[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Capitalization( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 138b85b6da7..2d2622de244 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -17,7 +17,16 @@ "declawed": typing.Type[Declawed], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Declawed[schemas.BoolClass], + bool + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index f8efe969ac8..51ced93d47e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -17,7 +17,16 @@ "name": typing.Type[Name], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index 6caaf6ee931..aec4a8630ec 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -17,7 +17,16 @@ "_class": typing.Type[_Class], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + _Class[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ClassModel( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index b6b1a3b52f7..6a1001e615c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -17,7 +17,16 @@ "client": typing.Type[Client], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Client[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Client( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index bbe9cc9f1b4..05eefc4fdc5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -37,7 +37,16 @@ def COMPLEX_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + QuadrilateralType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 1d410f3b912..294a7453870 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -17,7 +17,16 @@ "breed": typing.Type[Breed], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Breed[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index d3dd11b67bf..d1e8fe393d3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -105,7 +105,21 @@ def __getitem__(self, name: int) -> Items[str]: "array_enum": typing.Type[ArrayEnum], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + JustSymbol[str], + str + ], + typing.Union[ + ArrayEnum[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class EnumArrays( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 05e6dff866b..51d9d0caf79 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -37,7 +37,16 @@ def EQUILATERAL_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + TriangleType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index 9266737e582..b16ee5a7d9f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -17,7 +17,16 @@ "sourceURI": typing.Type[SourceURI], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SourceURI[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class File( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index b4c6ea7b705..c3fa71ad120 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -121,4 +121,19 @@ def __new__( "files": typing.Type[Files], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + file.File[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + Files[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index fe01ad3a408..d9ee214525c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -79,4 +79,13 @@ def __new__( "bar": typing.Type[bar.Bar], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + bar.Bar[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 145808560e5..0b4dda9133b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -19,7 +19,21 @@ "id": typing.Type[Id], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Data[str], + str + ], + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class FromSchema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 97123fffdda..483e4a257fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -17,7 +17,16 @@ "color": typing.Type[Color], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Color[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Fruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index b4770ba972f..ee1ebe5bef9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -17,7 +17,16 @@ "color": typing.Type[Color], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Color[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class GmFruit( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index a76a8350f89..6e609c56d74 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -19,7 +19,20 @@ "foo": typing.Type[Foo], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[str], + str + ], + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class HasOnlyReadOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index d11ceedaf6c..84736354378 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -63,7 +63,20 @@ def __new__( "NullableMessage": typing.Type[NullableMessage], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + NullableMessage[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class HealthCheckResult( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index d60dc5b4854..e52075577c7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -37,7 +37,16 @@ def ISOSCELES_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + TriangleType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 526342a0b32..593abca3cc6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -291,4 +291,29 @@ def __new__( "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], } ) -# todo optional properties mapping w/ addProps unset +DictInput5 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + MapMapOfString[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + MapOfEnumString[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + DirectMap[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + string_boolean_map.StringBooleanMap[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index e1c9ef0678b..440de483cde 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -55,7 +55,27 @@ def __new__( "map": typing.Type[Map], } ) -# todo optional properties mapping w/ addProps unset +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Uuid[str], + str, + uuid.UUID + ], + typing.Union[ + DateTime[str], + str, + datetime.datetime + ], + typing.Union[ + Map[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class MixedPropertiesAndAdditionalPropertiesClass( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 48fc2509ff2..86c26f66ef9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -17,7 +17,18 @@ "JustNumber": typing.Type[JustNumber], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + JustNumber[decimal.Decimal], + decimal.Decimal, + int, + float + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class NumberOnly( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index dadd1161ca2..d85bc68ea15 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -93,4 +93,23 @@ def __new__( "myBoolean": typing.Type[boolean.Boolean], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + number_with_validations.NumberWithValidations[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + string.String[str], + str + ], + typing.Union[ + boolean.Boolean[schemas.BoolClass], + bool + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 60392f4cce6..dc4af657dbc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -21,7 +21,22 @@ "someprop": typing.Type[Someprop], } ) -# todo optional properties mapping w/ addProps unset +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SomeProp[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + Someprop[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectWithCollidingProperties( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 12af86f6553..b313e913320 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -91,4 +91,22 @@ def __new__( "cost": typing.Type[money.Money], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + decimal_payload.DecimalPayload[str], + str + ], + typing.Union[ + Width[str], + str + ], + typing.Union[ + money.Money[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 638d81be563..f808f4a89f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -84,7 +84,33 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -# todo optional properties mapping w/ addProps unset +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectWithInlineCompositionProperty( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 3d332139adf..29090dbefd4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -17,7 +17,16 @@ "test": typing.Type[Test], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Test[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectWithOptionalTestProp( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index f9cff46a060..32f3a7c1941 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -69,7 +69,40 @@ class Schema_(metaclass=schemas.SingletonMeta): "complete": typing.Type[Complete], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + PetId[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Quantity[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + ShipDate[str], + str, + datetime.datetime + ], + typing.Union[ + Status[str], + str + ], + typing.Union[ + Complete[schemas.BoolClass], + bool + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Order( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 31133559687..77302d836ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -85,4 +85,18 @@ def __new__( "enemyPlayer": typing.Type[Player], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[str], + str + ], + typing.Union[ + Player[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 658dbc9e621..112a289ab1b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -19,7 +19,20 @@ "baz": typing.Type[Baz], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[str], + str + ], + typing.Union[ + Baz[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ReadOnlyFirst( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 670dc738caa..c0d639d807b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -37,7 +37,16 @@ def SCALENE_TRIANGLE(cls) -> TriangleType[str]: "triangleType": typing.Type[TriangleType], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + TriangleType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index ea58a4323b5..578b01f24bd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -37,7 +37,16 @@ def SIMPLE_QUADRILATERAL(cls) -> QuadrilateralType[str]: "quadrilateralType": typing.Type[QuadrilateralType], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + QuadrilateralType[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 6940d971bd1..5257fee6396 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -17,7 +17,16 @@ "a": typing.Type[A], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + A[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class SpecialModelName( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 389b4be8c55..36eed4a8ba9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -19,7 +19,21 @@ "name": typing.Type[Name], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Name[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Tag( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index acebf96dc8b..e269ee3fec9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -144,7 +144,123 @@ def __new__( "anyTypePropNullable": typing.Type[AnyTypePropNullable], } ) -# todo optional properties mapping w/ addProps unset +DictInput6 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Username[str], + str + ], + typing.Union[ + FirstName[str], + str + ], + typing.Union[ + LastName[str], + str + ], + typing.Union[ + Email[str], + str + ], + typing.Union[ + Password[str], + str + ], + typing.Union[ + Phone[str], + str + ], + typing.Union[ + UserStatus[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + ObjectWithNoDeclaredProps[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + ObjectWithNoDeclaredPropsNullable[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], + typing.Union[ + AnyTypeProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AnyTypeExceptNullProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AnyTypePropNullable[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class User( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 29e1b335ca6..4e840726777 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -112,7 +112,21 @@ def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> EnumFormString[str]: "enum_form_string": typing.Type[EnumFormString], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + EnumFormStringArray[tuple], + list, + tuple + ], + typing.Union[ + EnumFormString[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 05bae61674a..be6fede948b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -84,7 +84,33 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -# todo optional properties mapping w/ addProps unset +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 05bae61674a..be6fede948b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -84,7 +84,33 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -# todo optional properties mapping w/ addProps unset +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 05bae61674a..be6fede948b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -84,7 +84,33 @@ def __new__( "someProp": typing.Type[SomeProp], } ) -# todo optional properties mapping w/ addProps unset +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + SomeProp[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 9a29bc617b8..414dd17ff59 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -17,7 +17,16 @@ "keyword": typing.Type[Keyword], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Keyword[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 065577c73e2..dde5663e0c2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -55,7 +55,17 @@ def __getitem__(self, name: int) -> Items[typing.Union[bytes, schemas.FileIO]]: "files": typing.Type[Files], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Files[tuple], + list, + tuple + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index a57410f3c28..4f878a7b278 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -74,4 +74,14 @@ def __new__( "string": typing.Type[foo.Foo], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + foo.Foo[frozendict.frozendict], + dict, + frozendict.frozendict + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index cc329420709..39285c6a1a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -19,7 +19,20 @@ "status": typing.Type[Status], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[str], + str + ], + typing.Union[ + Status[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 6316335d300..8c02f2e06d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -19,7 +19,22 @@ "file": typing.Type[File], } ) -# todo optional properties mapping w/ addProps unset +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + AdditionalMetadata[str], + str + ], + typing.Union[ + File[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( From 73b075275ebd3bee0fcdc9060097fa7ecf5f9d67 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 13:15:38 -0700 Subject: [PATCH 18/36] Adds and uses new partial --- ..._helper_optional_properties_input_type.hbs | 38 +------------------ .../schemas/_helper_property_value_type.hbs | 18 +++++++++ ..._helper_required_properties_input_type.hbs | 38 +------------------ 3 files changed, 22 insertions(+), 72 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_property_value_type.hbs diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs index bd608be76a8..00be50be550 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs @@ -25,24 +25,7 @@ typing.Union[ {{#each optionalProperties}} {{#with this}} - {{#if refInfo.refClass}} - typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - {{#if jsonPathPiece}} - typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{else}} - typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - {{> components/schemas/_helper_schema_python_base_types_newline }} - ]], - {{> _helper_schema_python_types_newline }} - ], - {{/if}} - {{/if}} + {{> components/schemas/_helper_property_value_type }} {{/with}} {{/each}} {{#with additionalProperties}} @@ -57,24 +40,7 @@ typing.Union[ {{#each optionalProperties}} {{#with this}} - {{#if refInfo.refClass}} - typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - {{#if jsonPathPiece}} - typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{else}} - typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - {{> components/schemas/_helper_schema_python_base_types_newline }} - ]], - {{> _helper_schema_python_types_newline }} - ], - {{/if}} - {{/if}} + {{> components/schemas/_helper_property_value_type }} {{/with}} {{/each}} schemas.INPUT_TYPES_ALL_INCL_SCHEMA diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_property_value_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_property_value_type.hbs new file mode 100644 index 00000000000..90974e6e9e4 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_property_value_type.hbs @@ -0,0 +1,18 @@ +{{#if refInfo.refClass}} +typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} +], +{{else}} + {{#if jsonPathPiece}} +typing.Union[ + {{> components/schemas/_helper_new_property_value_type optional=false }} +], + {{else}} +typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} +], + {{/if}} +{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs index 7130aba27a0..89bebe1ccd9 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs @@ -33,24 +33,7 @@ typing.Union[ {{#each requiredProperties}} {{#with this}} - {{#if refInfo.refClass}} - typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - {{#if jsonPathPiece}} - typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{else}} - typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - {{> components/schemas/_helper_schema_python_base_types_newline }} - ]], - {{> _helper_schema_python_types_newline }} - ], - {{/if}} - {{/if}} + {{> components/schemas/_helper_property_value_type }} {{/with}} {{/each}} {{#with additionalProperties}} @@ -65,24 +48,7 @@ typing.Union[ {{#each requiredProperties}} {{#with this}} - {{#if refInfo.refClass}} - typing.Union[ - {{> components/schemas/_helper_new_ref_property_value_type optional=false }} - ], - {{else}} - {{#if jsonPathPiece}} - typing.Union[ - {{> components/schemas/_helper_new_property_value_type optional=false }} - ], - {{else}} - typing.Union[ - schemas.AnyTypeSchema[typing.Union[ - {{> components/schemas/_helper_schema_python_base_types_newline }} - ]], - {{> _helper_schema_python_types_newline }} - ], - {{/if}} - {{/if}} + {{> components/schemas/_helper_property_value_type }} {{/with}} {{/each}} schemas.INPUT_TYPES_ALL_INCL_SCHEMA From 6b0716ff96a8e97b3463aac7a18f9172ac079648 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 13:22:28 -0700 Subject: [PATCH 19/36] Adds mapping type for required + opt + addProps --- .../schemas/_helper_properties_input_type.hbs | 19 ++++++++++- .../petstore_api/components/schema/zebra.py | 33 ++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs index 9d3efa3550d..9b1bb9edf00 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs @@ -12,7 +12,24 @@ class {{mapInputJsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.cam {{else}} {{! addProps True/schema}} {{#and requiredProperties optionalProperties}} -# todo properties mapping with required and optional and addprops +{{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each requiredProperties}} + {{#with this}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} + {{/each}} + {{#each optionalProperties}} + {{#with this}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} + {{/each}} + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + ] +] {{else}} {{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ str, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index d945796e469..e0610a3b98b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -71,7 +71,38 @@ def ZEBRA(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -# todo properties mapping with required and optional and addprops +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ClassName[str], + str + ], + typing.Union[ + Type[str], + str + ], + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] +] class Zebra( From 74ef432998c740d3005c65928e8718b2101aaba6 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 13:31:43 -0700 Subject: [PATCH 20/36] Writes all property input mapping types --- .../schemas/_helper_properties_input_type.hbs | 20 +++- .../petstore_api/components/schema/animal.py | 15 ++- .../petstore_api/components/schema/apple.py | 15 ++- .../components/schema/category.py | 16 ++- .../components/schema/enum_test.py | 53 ++++++++- .../components/schema/format_test.py | 112 +++++++++++++++++- .../petstore_api/components/schema/name.py | 21 +++- ..._with_req_test_prop_from_unset_add_prop.py | 39 +++++- .../object_with_difficultly_named_props.py | 21 +++- .../src/petstore_api/components/schema/pet.py | 35 +++++- .../petstore_api/components/schema/whale.py | 19 ++- .../schema.py | 76 +++++++++++- .../content/multipart_form_data/schema.py | 17 ++- .../content/multipart_form_data/schema.py | 17 ++- 14 files changed, 462 insertions(+), 14 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs index 9b1bb9edf00..fa08faa9569 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs @@ -43,7 +43,25 @@ class {{mapInputJsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.cam {{/if}} {{else}} {{#and requiredProperties optionalProperties}} -# todo properties mapping with required and optional and unset addprops +{{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ + str, + typing.Union[ + {{#each requiredProperties}} + {{#with this}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} + {{/each}} + {{#each optionalProperties}} + {{#with this}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} + {{/each}} + {{#with additionalProperties}} + {{> components/schemas/_helper_new_property_value_type optional=false }} + {{/with}} + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] {{else}} {{mapInputJsonPathPiece.camelCase}} = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] {{/and}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 1332182f364..9a8fd9bdd64 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -31,7 +31,20 @@ class Schema_(metaclass=schemas.SingletonMeta): "color": typing.Type[Color], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ClassName[str], + str + ], + typing.Union[ + Color[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Animal( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index ecb7c33e189..19e400af6c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -48,7 +48,20 @@ class Schema_(metaclass=schemas.SingletonMeta): "origin": typing.Type[Origin], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Cultivar[str], + str + ], + typing.Union[ + Origin[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Apple( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 153e38eef43..a95c8b73643 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -31,7 +31,21 @@ class Schema_(metaclass=schemas.SingletonMeta): "name": typing.Type[Name], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[str], + str + ], + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Category( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 9eda1739d42..14b9d4fb3fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -249,4 +249,55 @@ def __new__( "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + EnumStringRequired[str], + str + ], + typing.Union[ + EnumString[str], + str + ], + typing.Union[ + EnumInteger[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + EnumNumber[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + string_enum.StringEnum[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str + ], + typing.Union[ + integer_enum.IntegerEnum[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + string_enum_with_default_value.StringEnumWithDefaultValue[str], + str + ], + typing.Union[ + integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index f426e632f22..c4099f70f4c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -225,7 +225,117 @@ class Schema_(metaclass=schemas.SingletonMeta): "noneProp": typing.Type[NoneProp], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Byte[str], + str + ], + typing.Union[ + Date[str], + str, + datetime.date + ], + typing.Union[ + Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + Password[str], + str + ], + typing.Union[ + Integer[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Int32[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Int32withValidations[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Int64[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + _Float[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + Float32[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + Double[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + Float64[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + ArrayWithUniqueItems[tuple], + list, + tuple + ], + typing.Union[ + String[str], + str + ], + typing.Union[ + Binary[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + DateTime[str], + str, + datetime.datetime + ], + typing.Union[ + Uuid[str], + str, + uuid.UUID + ], + typing.Union[ + UuidNoExample[str], + str, + uuid.UUID + ], + typing.Union[ + PatternWithDigits[str], + str + ], + typing.Union[ + PatternWithDigitsAndDelimiter[str], + str + ], + typing.Union[ + NoneProp[schemas.NoneClass], + None + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class FormatTest( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index bc63fee6d70..83cdbefaa54 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -21,7 +21,26 @@ "property": typing.Type[_Property], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + SnakeCase[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + _Property[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Name( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 3c3fd82e756..666570f7510 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -17,7 +17,44 @@ "name": typing.Type[Name], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Name[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index d7a748f9d3f..7c6f138dbf9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -21,7 +21,26 @@ "123Number": typing.Type[_123Number], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + _123List[str], + str + ], + typing.Union[ + SpecialPropertyName[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + _123Number[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectWithDifficultlyNamedProps( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 418d3bd3976..22e7f9e14e1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -226,4 +226,37 @@ def __new__( "status": typing.Type[Status], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Name[str], + str + ], + typing.Union[ + PhotoUrls[tuple], + list, + tuple + ], + typing.Union[ + Id[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + category.Category[frozendict.frozendict], + dict, + frozendict.frozendict + ], + typing.Union[ + Tags[tuple], + list, + tuple + ], + typing.Union[ + Status[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 6b3c345d19a..1b726aa0736 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -41,7 +41,24 @@ def WHALE(cls) -> ClassName[str]: "className": typing.Type[ClassName], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + ClassName[str], + str + ], + typing.Union[ + HasBaleen[schemas.BoolClass], + bool + ], + typing.Union[ + HasTeeth[schemas.BoolClass], + bool + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Whale( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 64bf6b55c79..6d3918d8101 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -166,7 +166,81 @@ class Schema_(metaclass=schemas.SingletonMeta): "callback": typing.Type[Callback], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Byte[str], + str + ], + typing.Union[ + Double[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + PatternWithoutDelimiter[str], + str + ], + typing.Union[ + Integer[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Int32[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Int64[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + _Float[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + String[str], + str + ], + typing.Union[ + Binary[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Date[str], + str, + datetime.date + ], + typing.Union[ + DateTime[str], + str, + datetime.datetime + ], + typing.Union[ + Password[str], + str + ], + typing.Union[ + Callback[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index e9902f5d28e..ce265a17802 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -19,7 +19,22 @@ "requiredFile": typing.Type[RequiredFile], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + RequiredFile[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AdditionalMetadata[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 92f6ed20069..61bf4700f39 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -19,7 +19,22 @@ "file": typing.Type[File], } ) -# todo properties mapping with required and optional and unset addprops +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + File[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AdditionalMetadata[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class Schema( From c2b2c0465f8314eb8a941a0881224fc2611ab854 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 14:17:57 -0700 Subject: [PATCH 21/36] Updates new signature to use DictInput for all object use cases --- .../_helper_schema_python_type_newline.hbs | 51 ++++++++++++++++++ .../_helper_schema_python_types_newline.hbs | 52 +------------------ .../python/components/schemas/_helper_new.hbs | 22 +++++--- .../components/schema/_200_response.py | 5 +- .../petstore_api/components/schema/_return.py | 5 +- .../schema/additional_properties_validator.py | 10 +++- .../components/schema/any_type_and_format.py | 45 ++++++++++++---- .../components/schema/any_type_not_string.py | 5 +- .../petstore_api/components/schema/apple.py | 4 +- .../src/petstore_api/components/schema/cat.py | 5 +- .../components/schema/child_cat.py | 5 +- .../components/schema/class_model.py | 5 +- .../schema/complex_quadrilateral.py | 5 +- ...d_any_of_different_types_no_validations.py | 5 +- .../schema/composed_one_of_different_types.py | 5 +- .../src/petstore_api/components/schema/dog.py | 5 +- .../components/schema/equilateral_triangle.py | 5 +- .../petstore_api/components/schema/fruit.py | 5 +- .../components/schema/fruit_req.py | 5 +- .../components/schema/gm_fruit.py | 5 +- .../components/schema/isosceles_triangle.py | 5 +- .../components/schema/json_patch_request.py | 5 +- .../petstore_api/components/schema/mammal.py | 5 +- .../petstore_api/components/schema/name.py | 5 +- .../components/schema/nullable_class.py | 28 +++++----- .../components/schema/nullable_shape.py | 5 +- ..._with_req_test_prop_from_unset_add_prop.py | 5 +- ...object_with_inline_composition_property.py | 5 +- .../src/petstore_api/components/schema/pig.py | 5 +- .../components/schema/quadrilateral.py | 5 +- .../schema/quadrilateral_interface.py | 5 +- .../components/schema/scalene_triangle.py | 5 +- .../petstore_api/components/schema/shape.py | 5 +- .../components/schema/shape_or_null.py | 5 +- .../components/schema/simple_quadrilateral.py | 5 +- .../components/schema/some_object.py | 5 +- .../components/schema/triangle.py | 5 +- .../components/schema/triangle_interface.py | 5 +- .../petstore_api/components/schema/user.py | 9 ++-- .../post/parameters/parameter_0/schema.py | 5 +- .../post/parameters/parameter_1/schema.py | 5 +- .../content/application_json/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- .../content/application_json/schema.py | 5 +- .../content/multipart_form_data/schema.py | 5 +- 45 files changed, 281 insertions(+), 125 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_type_newline.hbs diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_type_newline.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_type_newline.hbs new file mode 100644 index 00000000000..74d4781b585 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_type_newline.hbs @@ -0,0 +1,51 @@ +{{#eq this "array"}} +list, +tuple{{#unless @last}},{{/unless}} +{{/eq}} +{{#eq this "object"}} +dict, +frozendict.frozendict{{#unless @last}},{{/unless}} +{{/eq}} +{{#eq this "null"}} +None{{#unless @last}},{{/unless}} +{{/eq}} +{{#eq this "string" }} + {{#eq ../format null}} +str{{#unless @last}},{{/unless}} + {{else}} + {{#eq ../format "date"}} +str, +datetime.date{{#unless @last}},{{/unless}} + {{else}} + {{#eq ../format "date-time"}} +str, +datetime.datetime{{#unless @last}},{{/unless}} + {{else}} + {{#eq ../format "uuid"}} +str, +uuid.UUID{{#unless @last}},{{/unless}} + {{else}} + {{#eq ../format "binary"}} +bytes, +io.FileIO, +io.BufferedReader{{#unless @last}},{{/unless}} + {{else}} +str{{#unless @last}},{{/unless}} + {{/eq}} + {{/eq}} + {{/eq}} + {{/eq}} + {{/eq}} +{{/eq}} +{{#eq this "integer"}} +decimal.Decimal, +int{{#unless @last}},{{/unless}} +{{/eq}} +{{#eq this "number"}} +decimal.Decimal, +int, +float{{#unless @last}},{{/unless}} +{{/eq}} +{{#eq this "boolean"}} +bool{{#unless @last}},{{/unless}} +{{/eq}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_types_newline.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_types_newline.hbs index 0f9b18b8eae..e20ba5bf4dd 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_types_newline.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_schema_python_types_newline.hbs @@ -17,56 +17,6 @@ io.FileIO, io.BufferedReader {{else}} {{#each types}} - {{#eq this "array"}} -list, -tuple{{#unless @last}},{{/unless}} - {{/eq}} - {{#eq this "object"}} -dict, -frozendict.frozendict{{#unless @last}},{{/unless}} - {{/eq}} - {{#eq this "null"}} -None{{#unless @last}},{{/unless}} - {{/eq}} - {{#eq this "string" }} - {{#eq ../format null}} -str{{#unless @last}},{{/unless}} - {{else}} - {{#eq ../format "date"}} -str, -datetime.date{{#unless @last}},{{/unless}} - {{else}} - {{#eq ../format "date-time"}} -str, -datetime.datetime{{#unless @last}},{{/unless}} - {{else}} - {{#eq ../format "uuid"}} -str, -uuid.UUID{{#unless @last}},{{/unless}} - {{else}} - {{#eq ../format "binary"}} -bytes, -io.FileIO, -io.BufferedReader{{#unless @last}},{{/unless}} - {{else}} -str{{#unless @last}},{{/unless}} - {{/eq}} - {{/eq}} - {{/eq}} - {{/eq}} - {{/eq}} - {{/eq}} - {{#eq this "integer"}} -decimal.Decimal, -int{{#unless @last}},{{/unless}} - {{/eq}} - {{#eq this "number"}} -decimal.Decimal, -int, -float{{#unless @last}},{{/unless}} - {{/eq}} - {{#eq this "boolean"}} -bool{{#unless @last}},{{/unless}} - {{/eq}} +{{> _helper_schema_python_type_newline }} {{/each}} {{/eq}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index c1ea5632c03..3f69805d815 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -39,18 +39,26 @@ def __new__( arg_: {{> _helper_schema_python_types }}, {{/contains}} {{else}} - {{#contains types "object"}} - arg_: typing.Union[ - {{> _helper_schema_python_types_newline }} - ], - {{else}} arg_: typing.Union[ - {{> _helper_schema_python_types_newline }} + {{#each types}} + {{#eq this "object"}} + {{mapInputJsonPathPiece.camelCase}}, + {{jsonPathPiece.camelCase}}[frozendict.frozendict], + {{else}} + {{> _helper_schema_python_type_newline }} + {{/eq}} + {{/each}} ], - {{/contains}} {{/eq}} {{else}} + {{#if mapInputJsonPathPiece}} + arg_: typing.Union[ + {{mapInputJsonPathPiece.camelCase}}, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + {{else}} arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + {{/if}} {{/if}} configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None {{#if types}} diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index e8ed1152b22..08ced51b5fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -85,7 +85,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _200Response[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 71d6037be61..1c2b4bf7a20 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -75,7 +75,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Return[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 8347c371b10..2912300da95 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -96,7 +96,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ typing.Union[ @@ -216,7 +219,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput5, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 0ff59716dd8..f93861cbcdf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -27,7 +27,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Uuid[ typing.Union[ @@ -80,7 +83,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Date[ typing.Union[ @@ -133,7 +139,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateTime[ typing.Union[ @@ -186,7 +195,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput4, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Number[ typing.Union[ @@ -238,7 +250,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput5, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Binary[ typing.Union[ @@ -290,7 +305,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput6, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int32[ typing.Union[ @@ -342,7 +360,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput7, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int64[ typing.Union[ @@ -394,7 +415,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput8, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Double[ typing.Union[ @@ -446,7 +470,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput9, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Float[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 376e3850e8f..aaa32d00019 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -32,7 +32,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeNotString[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 19e400af6c6..8a18db9007e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -126,8 +126,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput, + Apple[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Apple[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 2d2622de244..a134a62d07a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -104,7 +104,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Cat[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 51ced93d47e..edcee354c88 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -104,7 +104,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ChildCat[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index aec4a8630ec..c51297a7d91 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -74,7 +74,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ClassModel[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 05eefc4fdc5..c3a9bcfaadc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -124,7 +124,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComplexQuadrilateral[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 33da1a40118..0b6f5d89096 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -130,7 +130,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput4, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedAnyOfDifferentTypesNoValidations[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index b21852cacdc..7aa70a4ec1e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -150,7 +150,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedOneOfDifferentTypes[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 294a7453870..82f0c8dde58 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -104,7 +104,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Dog[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 51d9d0caf79..0633830b0c4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -124,7 +124,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EquilateralTriangle[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 483e4a257fd..5a2bd2650a6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -73,7 +73,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Fruit[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index d6523c97e88..55b4b1b58d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -32,7 +32,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FruitReq[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index ee1ebe5bef9..748f8a821eb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -73,7 +73,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GmFruit[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index e52075577c7..dc953d21825 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -124,7 +124,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> IsoscelesTriangle[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 174df4b26c9..488c75865fe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -26,7 +26,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 5660e8288af..23c184e92c1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -40,7 +40,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Mammal[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index 83cdbefaa54..454a6e68e80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -103,7 +103,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Name[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 4cdb6aba493..139bcf2181d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -33,8 +33,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput10, + AdditionalProperties4[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties4[ @@ -425,8 +425,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput2, + Items2[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[ @@ -523,8 +523,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput3, + Items3[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items3[ @@ -630,8 +630,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput5, + ObjectNullableProp[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectNullableProp[ @@ -679,8 +679,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput6, + AdditionalProperties2[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ @@ -747,8 +747,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput7, + ObjectAndItemsNullableProp[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectAndItemsNullableProp[ @@ -796,8 +796,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput8, + AdditionalProperties3[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 8602da940d6..0f3fdc8fc1e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -34,7 +34,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableShape[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 666570f7510..5ce3b34c798 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -161,7 +161,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index f808f4a89f9..d0454b34111 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index d5249cf24b9..314c6eb5ab7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -39,7 +39,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pig[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 6da106d1526..a876b5716b4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -39,7 +39,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Quadrilateral[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index fb88fec853a..e64ff5c274b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -114,7 +114,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> QuadrilateralInterface[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index c0d639d807b..c0f79fdc58f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -124,7 +124,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ScaleneTriangle[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index 8db210fccd0..5339d2643ab 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -39,7 +39,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Shape[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 0c7e11fe1b9..324442c1638 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ShapeOrNull[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 578b01f24bd..52a6c4b15d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -124,7 +124,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SimpleQuadrilateral[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index 575163339ae..a08b0af442d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -31,7 +31,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeObject[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index d86d4b5dbde..bec7339cbf2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -40,7 +40,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Triangle[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index 0072fe4e842..5649c3d482f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -114,7 +114,10 @@ def __getitem__( def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> TriangleInterface[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index e269ee3fec9..7695187ba82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -43,8 +43,8 @@ def __new__( cls, arg_: typing.Union[ None, - dict, - frozendict.frozendict + DictInput2, + ObjectWithNoDeclaredPropsNullable[frozendict.frozendict], ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithNoDeclaredPropsNullable[ @@ -88,7 +88,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput4, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeExceptNullProp[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index ee0230f3bc9..f460f2943ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index be6fede948b..a45963791d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index ee0230f3bc9..f460f2943ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index be6fede948b..a45963791d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index ee0230f3bc9..f460f2943ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index be6fede948b..a45963791d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -42,7 +42,10 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg_: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ From f37cd4d2b7ad21ee977de341bf04bd9026c2f25c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 22:05:43 -0700 Subject: [PATCH 22/36] Updates 3 test files --- .../tests_manual/test_abstract_step_message.py | 15 +++++++++------ .../test_additional_properties_class.py | 2 +- .../test_additional_properties_validator.py | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_abstract_step_message.py b/samples/openapi3/client/petstore/python/tests_manual/test_abstract_step_message.py index 8d63086258e..6162423afa0 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_abstract_step_message.py @@ -12,17 +12,20 @@ import unittest import petstore_api -from petstore_api.components.schema.abstract_step_message import AbstractStepMessage +from petstore_api.components.schema import abstract_step_message class TestAbstractStepMessage(unittest.TestCase): """AbstractStepMessage unit test stubs""" def test_model_instantiation(self): - inst = AbstractStepMessage( - discriminator='AbstractStepMessage', - sequenceNumber=1, - description='some description' + arg: abstract_step_message.DictInput = { + 'discriminator': 'AbstractStepMessage', + 'sequenceNumber': 1, + 'description': 'some description' + } + inst = abstract_step_message.AbstractStepMessage( + arg ) assert inst == { 'discriminator': 'AbstractStepMessage', @@ -47,7 +50,7 @@ def test_model_instantiation(self): ] for invalid_kwarg in invalid_kwargs: with self.assertRaises(TypeError): - AbstractStepMessage(**invalid_kwarg) + abstract_step_message.AbstractStepMessage(invalid_kwarg) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py index e9b994b7ea5..c68a5712144 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py @@ -26,7 +26,7 @@ def test_additional_properties_class(self): with self.assertRaises(AttributeError): inst.map_property - inst = AdditionalPropertiesClass(map_property={}) + inst = AdditionalPropertiesClass({'map_property': {}}) map_property = inst["map_property"] assert map_property == {} diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py index 13d4462545b..c707d08c482 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py @@ -20,12 +20,12 @@ class TestAdditionalPropertiesValidator(unittest.TestCase): def test_additional_properties_validator(self): with self.assertRaises(exceptions.ApiValueError): - AdditionalPropertiesValidator(tooShort='ab') + AdditionalPropertiesValidator({'tooShort': 'ab'}) with self.assertRaises(exceptions.ApiValueError): - AdditionalPropertiesValidator(tooLong='abcdef') + AdditionalPropertiesValidator({'tooLong': 'abcdef'}) - inst = AdditionalPropertiesValidator(addProp='abc') + inst = AdditionalPropertiesValidator({'addProp': 'abc'}) add_prop = inst['addProp'] assert add_prop == 'abc' assert isinstance(add_prop, str) From c124b08209706b62eaf468b4e3434ed13ed37c16 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 22:20:02 -0700 Subject: [PATCH 23/36] Fixes more python tests --- .../python/tests_manual/test_animal.py | 10 +++---- .../tests_manual/test_any_type_and_format.py | 28 +++++++++---------- .../test_array_with_validations_in_items.py | 5 ++-- .../tests_manual/test_combine_schemas.py | 8 ------ .../test_composed_one_of_different_types.py | 4 +-- .../python/tests_manual/test_configuration.py | 15 ++++++++-- 6 files changed, 36 insertions(+), 34 deletions(-) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_animal.py b/samples/openapi3/client/petstore/python/tests_manual/test_animal.py index 3972a5f2d6c..4a5b811501d 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_animal.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_animal.py @@ -38,9 +38,9 @@ def testAnimal(self): r"Only the values \['Cat', 'Dog'\] are allowed at \('args\[0\]', 'className'\)" ) with self.assertRaisesRegex(petstore_api.ApiValueError, regex_err): - Animal(className='Fox', color='red') + Animal({'className': 'Fox', 'color': 'red'}) - animal = Animal(className='Cat', color='black') + animal = Animal({'className': 'Cat', 'color': 'black'}) assert isinstance(animal, frozendict.frozendict) assert isinstance(animal, cat.Cat) assert isinstance(animal, cat._1) @@ -52,7 +52,7 @@ def testAnimal(self): assert isinstance(animal.className, StrSchema) # pass in optional param - animal = Animal(className='Cat', color='black', declawed=True) + animal = Animal({'className': 'Cat', 'color': 'black', 'declawed': True}) assert isinstance(animal, Animal) assert isinstance(animal, frozendict.frozendict) assert isinstance(animal, cat.Cat) @@ -66,7 +66,7 @@ def testAnimal(self): assert isinstance(animal["declawed"], BoolSchema) # make a Dog - animal = Animal(className='Dog', color='black') + animal = Animal({'className': 'Dog', 'color': 'black'}) assert isinstance(animal, Animal) assert isinstance(animal, frozendict.frozendict) assert isinstance(animal, dog.Dog) @@ -78,7 +78,7 @@ def testAnimal(self): assert isinstance(animal.className, StrSchema) # pass in optional param - animal = Animal(className='Dog', color='black', breed='Labrador') + animal = Animal({'className': 'Dog', 'color': 'black', 'breed':'Labrador'}) assert isinstance(animal, Animal) assert isinstance(animal, frozendict.frozendict) assert isinstance(animal, dog.Dog) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py index 21a60779bd9..b2982f6b7d1 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py @@ -37,11 +37,11 @@ def test_uuid(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(uuid=valid_value) + AnyTypeAndFormat({'uuid': valid_value}) # an invalid value does not work with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(uuid='1') + AnyTypeAndFormat({'uuid': '1'}) def test_date(self): valid_values = [ @@ -58,11 +58,11 @@ def test_date(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(date=valid_value) + AnyTypeAndFormat({'date': valid_value}) # an invalid value does not work with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(date='1') + AnyTypeAndFormat({'date': '1'}) def test_date_time(self): valid_values = [ @@ -99,11 +99,11 @@ def test_number(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(number=valid_value) + AnyTypeAndFormat({'number': valid_value}) # an invalid value does not work with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(number='a') + AnyTypeAndFormat({'number': 'a'}) def test_int32(self): min_bound = decimal.Decimal(-2147483648) @@ -123,7 +123,7 @@ def test_int32(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(int32=valid_value) + AnyTypeAndFormat({'int32': valid_value}) # invalid values do not work invalid_values = ( @@ -135,7 +135,7 @@ def test_int32(self): ) for invalid_value in invalid_values: with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(int32=invalid_value) + AnyTypeAndFormat({'int32': invalid_value}) def test_int64(self): min_bound = decimal.Decimal(-9223372036854775808) @@ -155,7 +155,7 @@ def test_int64(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(int64=valid_value) + AnyTypeAndFormat({'int64': valid_value}) # invalid values do not work invalid_values = ( @@ -167,7 +167,7 @@ def test_int64(self): ) for invalid_value in invalid_values: with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(int64=invalid_value) + AnyTypeAndFormat({'int64': invalid_value}) def test_float(self): min_bound = decimal.Decimal(-3.4028234663852886e+38) @@ -186,7 +186,7 @@ def test_float(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(double=valid_value) + AnyTypeAndFormat({'double': valid_value}) # invalid values do not work invalid_values = ( @@ -197,7 +197,7 @@ def test_float(self): ) for invalid_value in invalid_values: with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(float=invalid_value) + AnyTypeAndFormat({'float': invalid_value}) def test_double(self): min_bound = decimal.Decimal(-1.7976931348623157E+308) @@ -216,7 +216,7 @@ def test_double(self): b'abc' ] for valid_value in valid_values: - AnyTypeAndFormat(double=valid_value) + AnyTypeAndFormat({'double': valid_value}) with decimal.localcontext() as ctx: ctx.prec = 310 @@ -230,7 +230,7 @@ def test_double(self): # invalid values do not work for invalid_value in invalid_values: with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(double=invalid_value) + AnyTypeAndFormat({'double': invalid_value}) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py index 6f645cb12eb..ca428815e36 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py @@ -14,6 +14,7 @@ import unittest import petstore_api +from petstore_api import exceptions from petstore_api.components.schema.array_with_validations_in_items import ArrayWithValidationsInItems @@ -36,13 +37,13 @@ def testArrayWithValidationsInItems(self): assert inst == (valid_value,) with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, + exceptions.ApiValueError, r"Invalid value `8`, must be a value less than or equal to `7` at \('args\[0\]', 0\)" ): ArrayWithValidationsInItems([8]) with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, + exceptions.ApiValueError, r"Invalid value `\(Decimal\('1'\), Decimal\('2'\), Decimal\('3'\)\)`, number of items must be less than or equal to `2` at \('args\[0\]',\)" ): ArrayWithValidationsInItems([1, 2, 3]) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py b/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py index 7cb9f970f57..f47d09a5ff4 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py @@ -29,10 +29,6 @@ class TestCombineNonObjectSchemas(unittest.TestCase): def test_valid_enum_plus_prim(self): - class EnumPlusPrim(IntegerMax10, IntegerEnumOneValue): - pass - - # order of base classes does not matter class EnumPlusPrim(IntegerEnumOneValue, IntegerMax10): pass @@ -55,10 +51,6 @@ class EnumPlusPrim(IntegerEnumOneValue, IntegerMax10): assert isinstance(val, decimal.Decimal) def test_valid_enum_plus_enum(self): - class IntegerOneEnum(IntegerEnumOneValue, IntegerEnum): - pass - - # order of base classes does not matter class IntegerOneEnum(IntegerEnum, IntegerEnumOneValue): pass diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py index f1e04f3aa21..926ea796b92 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py @@ -38,14 +38,14 @@ def test_ComposedOneOfDifferentTypes(self): assert isinstance(inst, NumberWithValidations) # we can make an instance that stores object (dict) data - inst = ComposedOneOfDifferentTypes(className="Cat", color="black") + inst = ComposedOneOfDifferentTypes({'className': "Cat", 'color': "black"}) assert isinstance(inst, ComposedOneOfDifferentTypes) assert isinstance(inst, Animal) assert isinstance(inst, Cat) assert isinstance(inst, frozendict.frozendict) # object that holds 4 properties and is not an Animal - inst = ComposedOneOfDifferentTypes(a="a", b="b", c="c", d="d") + inst = ComposedOneOfDifferentTypes({'a': "a", 'b': "b", 'c': "c", 'd': "d"}) assert isinstance(inst, ComposedOneOfDifferentTypes) assert not isinstance(inst, Animal) assert isinstance(inst, frozendict.frozendict) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py b/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py index ae8c6b34bc6..73fe6fceb44 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py @@ -31,9 +31,12 @@ def test_spec_root_servers(self): security_scheme_info = api_configuration.SecuritySchemeInfo( api_key=api_configuration.security_scheme_api_key.ApiKey(api_key='abcdefg') ) + arg: api_configuration.server_1.DictInput3 = { + 'version': 'v2' + } server_info: api_configuration.ServerInfo = { 'servers/1': api_configuration.server_1.Server1( - variables=api_configuration.server_1.Variables(version='v2') + variables=api_configuration.server_1.Variables(arg) ) } server_index_info: api_configuration.ServerIndexInfo = { @@ -81,9 +84,12 @@ def test_path_servers(self): security_scheme_info = api_configuration.SecuritySchemeInfo( api_key=api_configuration.security_scheme_api_key.ApiKey(api_key='abcdefg') ) + arg: api_configuration.pet_find_by_status_server_1.DictInput3 = { + 'version': 'v2' + } server_info: api_configuration.ServerInfo = { "paths//pet/findByStatus/servers/1": api_configuration.pet_find_by_status_server_1.Server1( - variables=api_configuration.pet_find_by_status_server_1.Variables(version='v2') + variables=api_configuration.pet_find_by_status_server_1.Variables(arg) ) } configuration = api_configuration.ApiConfiguration(security_scheme_info=security_scheme_info, server_info=server_info) @@ -120,9 +126,12 @@ def test_path_servers(self): ) def test_operation_servers(self): + arg: api_configuration.foo_get_server_1.DictInput3 = { + 'version': 'v2' + } server_info: api_configuration.ServerInfo = { "paths//foo/get/servers/1": api_configuration.foo_get_server_1.Server1( - variables=api_configuration.foo_get_server_1.Variables(version='v2') + variables=api_configuration.foo_get_server_1.Variables(arg) ) } config = api_configuration.ApiConfiguration(server_info=server_info) From e8f1458cc19b9f688134a321c3c31f590a6f606e Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 11 Jun 2023 23:08:00 -0700 Subject: [PATCH 24/36] Fixes manual tests --- .../tests_manual/test_deserialization.py | 47 +++--- .../test_discard_unknown_properties.py | 157 ------------------ .../python/tests_manual/test_fake_api.py | 34 ++-- .../python/tests_manual/test_format_test.py | 75 ++++++--- .../python/tests_manual/test_fruit.py | 12 +- .../python/tests_manual/test_fruit_req.py | 22 +-- .../python/tests_manual/test_gm_fruit.py | 26 +-- .../python/tests_manual/test_json_encoder.py | 2 - .../python/tests_manual/test_mammal.py | 8 +- .../python/tests_manual/test_money.py | 8 +- .../test_no_additional_properties.py | 19 ++- .../test_number_with_validations.py | 3 - .../test_obj_with_required_props.py | 2 +- ...ject_model_with_arg_and_args_properties.py | 5 +- .../test_object_model_with_ref_props.py | 2 +- ..._with_req_test_prop_from_unset_add_prop.py | 16 +- ...est_object_with_difficultly_named_props.py | 12 +- ...object_with_inline_composition_property.py | 4 +- ...ect_with_invalid_named_refed_properties.py | 18 +- .../test_object_with_validations.py | 6 +- .../python/tests_manual/test_parameters.py | 1 - .../python/tests_manual/test_parent_pet.py | 4 +- .../petstore/python/tests_manual/test_pet.py | 4 +- .../python/tests_manual/test_quadrilateral.py | 4 +- .../test_self_referencing_object_model.py | 10 +- .../python/tests_manual/test_shape.py | 50 +++--- .../python/tests_manual/test_triangle.py | 2 +- .../python/tests_manual/test_user_api.py | 2 +- .../python/tests_manual/test_validate.py | 4 +- .../python/tests_manual/test_whale.py | 16 +- 30 files changed, 224 insertions(+), 351 deletions(-) delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py index 99180a21a03..7a63ecfdceb 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py @@ -17,6 +17,7 @@ import urllib3 import petstore_api +from petstore_api import exceptions from petstore_api import api_client, schemas, api_response from petstore_api.configurations import schema_configuration @@ -125,14 +126,14 @@ def test_regex_constraint(self): # Test with valid regex pattern. inst = apple.Apple( - cultivar="Akane" + {'cultivar': "Akane"} ) assert isinstance(inst, apple.Apple) - inst = apple.Apple( - cultivar="Golden Delicious", - origin="cHiLe" - ) + inst = apple.Apple({ + 'cultivar': "Golden Delicious", + 'origin': "cHiLe" + }) assert isinstance(inst, apple.Apple) # Test with invalid regex pattern. @@ -141,19 +142,19 @@ def test_regex_constraint(self): petstore_api.ApiValueError, err_regex ): - inst = apple.Apple( - cultivar="!@#%@$#Akane" - ) + inst = apple.Apple({ + 'cultivar': "!@#%@$#Akane" + }) err_regex = r"Invalid value `.+?`, must match regular expression `.+?` at \('args\[0\]', 'origin'\)" with self.assertRaisesRegex( petstore_api.ApiValueError, err_regex ): - inst = apple.Apple( - cultivar="Golden Delicious", - origin="!@#%@$#Chile" - ) + inst = apple.Apple({ + 'cultivar': "Golden Delicious", + 'origin': "!@#%@$#Chile" + }) def test_deserialize_mammal(self): """ @@ -291,18 +292,18 @@ def test_deserialize_with_additional_properties(self): 'size': 'medium', } response = self.__response(data) - class ApiResponse(api_response.ApiResponse): + class ApiResponseA(api_response.ApiResponse): response: urllib3.HTTPResponse body: dog.Dog headers: schemas.Unset - class ResponseFor200(api_client.OpenApiResponse): - response_cls=ApiResponse + class ResponseFor200A(api_client.OpenApiResponse): + response_cls=ApiResponseA content={ self.json_content_type: api_client.MediaType(schema=dog.Dog), } - deserialized = ResponseFor200.deserialize(response, self.configuration) + deserialized = ResponseFor200A.deserialize(response, self.configuration) body = deserialized.body self.assertTrue(isinstance(body, dog.Dog)) self.assertEqual(body['className'], 'Dog') @@ -324,18 +325,18 @@ class ResponseFor200(api_client.OpenApiResponse): 'p2': ['a', 'b', 123], } response = self.__response(data) - class ApiResponse(api_response.ApiResponse): + class ApiResponseB(api_response.ApiResponse): response: urllib3.HTTPResponse body: mammal.Mammal headers: schemas.Unset - class ResponseFor200(api_client.OpenApiResponse): - response_cls=ApiResponse + class ResponseFor200B(api_client.OpenApiResponse): + response_cls=ApiResponseB content={ self.json_content_type: api_client.MediaType(schema=mammal.Mammal), } - deserialized = ResponseFor200.deserialize(response, self.configuration) + deserialized = ResponseFor200B.deserialize(response, self.configuration) body = deserialized.body self.assertTrue(isinstance(body, zebra.Zebra)) self.assertEqual(body['className'], 'zebra') @@ -356,7 +357,7 @@ class ResponseFor200(api_client.OpenApiResponse): } with self.assertRaises( - petstore_api.exceptions.ApiValueError + exceptions.ApiValueError ): data = { 'lengthCm': 21.2, @@ -466,7 +467,7 @@ class ResponseFor200(api_client.OpenApiResponse): self.assertTrue(isinstance(deserialized.body, format_test.FormatTest)) with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, + exceptions.ApiValueError, r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" ): data = { @@ -504,7 +505,7 @@ class ResponseFor200(api_client.OpenApiResponse): ) with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, + exceptions.ApiValueError, r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" ): data = { diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py deleted file mode 100644 index 2173d7cf7e8..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py +++ /dev/null @@ -1,157 +0,0 @@ -# # coding: utf-8 -# -# # flake8: noqa -# -# """ -# Run the tests. -# $ docker pull swaggerapi/petstore -# $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore -# $ pip install nose (optional) -# $ cd petstore_api-python -# $ nosetests -v -# """ -# from collections import namedtuple -# import json -# import re -# import unittest -# -# import petstore_api -# from petstore_api.components.schema import cat, dog, isosceles_triangle, banana_req -# from petstore_api import Configuration, signing -# -# from petstore_api.schemas import ( -# file_type, -# model_to_dict, -# ) -# -# MockResponse = namedtuple('MockResponse', 'data') -# -# class DiscardUnknownPropertiesTests(unittest.TestCase): -# -# def test_deserialize_banana_req_do_not_discard_unknown_properties(self): -# """ -# deserialize bananaReq with unknown properties. -# Strict validation is enabled. -# Simple (non-composed) schema scenario. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'lengthCm': 21.3, -# 'sweet': False, -# # Below is an unknown property not explicitly declared in the OpenAPI document. -# # It should not be in the payload because additional properties (undeclared) are -# # not allowed in the bananaReq schema (additionalProperties: false). -# 'unknown_property': 'a-value' -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation raises an exception because the 'unknown_property' -# # is undeclared. -# with self.assertRaises(petstore_api.exceptions.ApiAttributeError) as cm: -# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) -# self.assertTrue(re.match("BananaReq has no attribute 'unknown_property' at.*", str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# -# def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): -# """ -# deserialize IsoscelesTriangle with unknown properties. -# Strict validation is enabled. -# Composed schema scenario. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'shape_type': 'Triangle', -# 'triangle_type': 'EquilateralTriangle', -# # Below is an unknown property not explicitly declared in the OpenAPI document. -# # It should not be in the payload because additional properties (undeclared) are -# # not allowed in the schema (additionalProperties: false). -# 'unknown_property': 'a-value' -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation raises an exception because the 'unknown_property' -# # is undeclared. -# with self.assertRaises(petstore_api.ApiValueError) as cm: -# deserialized = api_client.deserialize(response, ((isosceles_triangle.IsoscelesTriangle),), True) -# self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# -# def test_deserialize_banana_req_discard_unknown_properties(self): -# """ -# Deserialize bananaReq with unknown properties. -# Discard unknown properties. -# """ -# config = Configuration(discard_unknown_keys=True) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'lengthCm': 21.3, -# 'sweet': False, -# # Below are additional (undeclared) properties not specified in the bananaReq schema. -# 'unknown_property': 'a-value', -# 'more-unknown': [ -# 'a' -# ] -# } -# # The 'unknown_property' is undeclared, which would normally raise an exception, but -# # when discard_unknown_keys is set to True, the unknown properties are discarded. -# response = MockResponse(data=json.dumps(data)) -# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) -# self.assertTrue(isinstance(deserialized, banana_req.BananaReq)) -# # Check the 'unknown_property' and 'more-unknown' properties are not present in the -# # output. -# self.assertIn("length_cm", deserialized.to_dict().keys()) -# self.assertNotIn("unknown_property", deserialized.to_dict().keys()) -# self.assertNotIn("more-unknown", deserialized.to_dict().keys()) -# -# def test_deserialize_cat_do_not_discard_unknown_properties(self): -# """ -# Deserialize Cat with unknown properties. -# Strict validation is enabled. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# "class_name": "Cat", -# "color": "black", -# "declawed": True, -# "dynamic-property": 12345, -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation does not raise an exception because the even though -# # the 'dynamic-property' is undeclared, the 'Cat' schema defines the additionalProperties -# # attribute. -# deserialized = api_client.deserialize(response, ((cat.Cat),), True) -# self.assertTrue(isinstance(deserialized, cat.Cat)) -# self.assertIn('color', deserialized.to_dict()) -# self.assertEqual(deserialized['color'], 'black') -# -# def test_deserialize_cat_discard_unknown_properties(self): -# """ -# Deserialize Cat with unknown properties. -# Request to discard unknown properties, but Cat is composed schema -# with one inner schema that has 'additionalProperties' set to true. -# """ -# config = Configuration(discard_unknown_keys=True) -# api_client = petstore_api.ApiClient(config) -# data = { -# "class_name": "Cat", -# "color": "black", -# "declawed": True, -# # Below are additional (undeclared) properties. -# "my_additional_property": 123, -# } -# # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through -# # the allOf: [ $ref: '#/components/schemas/Address' ]. -# response = MockResponse(data=json.dumps(data)) -# deserialized = api_client.deserialize(response, ((cat.Cat),), True) -# self.assertTrue(isinstance(deserialized, cat.Cat)) -# # Check the 'unknown_property' and 'more-unknown' properties are not present in the -# # output. -# self.assertIn("declawed", deserialized.to_dict().keys()) -# self.assertIn("my_additional_property", deserialized.to_dict().keys()) -# diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py index 6f9795ef41f..08d2ed6cd99 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py @@ -49,7 +49,7 @@ def test_array_model(self): self.json_bytes(json_data) ) - cat = animal.Animal(className="Cat", color="black") + cat = animal.Animal({'className': "Cat", 'color': "black"}) body = animal_farm.AnimalFarm([cat]) api_response = self.api.array_model(body=body) self.assert_request_called_with( @@ -115,9 +115,9 @@ def test_composed_one_of_different_types(self): # serialization + deserialization works number = composed_one_of_different_types.ComposedOneOfDifferentTypes(10.0) - cat = composed_one_of_different_types.ComposedOneOfDifferentTypes( - className="Cat", color="black" - ) + cat = composed_one_of_different_types.ComposedOneOfDifferentTypes({ + 'className': "Cat", 'color': "black" + }) none_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes(None) date_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes('1970-01-01') cast_to_simple_value = [ @@ -202,7 +202,7 @@ def test_mammal(self): # serialization + deserialization works from petstore_api.components.schema.mammal import Mammal with patch.object(RESTClientObject, 'request') as mock_request: - body = Mammal(className="BasquePig") + body = Mammal({'className': "BasquePig"}) value_simple = dict(className='BasquePig') mock_request.return_value = self.response( self.json_bytes(value_simple) @@ -240,13 +240,13 @@ def test_body_with_query_params(self): from petstore_api.components.schema import user with patch.object(RESTClientObject, 'request') as mock_request: - value_simple = dict( - id=1, - username='first last', - firstName='first', - lastName='last' - ) - body = user.User(**value_simple) + value_simple = { + 'id': 1, + 'username': 'first last', + 'firstName': 'first', + 'lastName': 'last' + } + body = user.User(value_simple) mock_request.return_value = self.response( b'' ) @@ -801,11 +801,11 @@ def test_json_patch(self): mock_request.return_value = self.response("") body = json_patch_request.JSONPatchRequest( [ - json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest( - op='add', - path='/a/b/c', - value='foo', - ) + json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest({ + 'op': 'add', + 'path': '/a/b/c', + 'value': 'foo', + }) ] ) api_response = self.api.json_patch(body=body) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py b/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py index c6fd74dbc92..0c11904fda4 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py @@ -17,6 +17,7 @@ import frozendict import petstore_api +from petstore_api import exceptions from petstore_api.components.schema.format_test import FormatTest from petstore_api.schemas import BinarySchema, BytesSchema, Singleton @@ -42,71 +43,95 @@ def test_FormatTest(self): # int32 # under min with self.assertRaises(petstore_api.ApiValueError): - model = FormatTest(int32=-2147483649, **required_args) + arg = dict(**required_args) + arg['int32'] = -2147483649 + model = FormatTest(arg) # over max with self.assertRaises(petstore_api.ApiValueError): - model = FormatTest(int32=2147483648, **required_args) + arg = dict(**required_args) + arg['int32'] = 2147483648 + model = FormatTest(arg) # valid values in range work valid_values = [-2147483648, 2147483647] for valid_value in valid_values: - model = FormatTest(int32=valid_value, **required_args) + arg = dict(**required_args) + arg['int32'] = valid_value + model = FormatTest(arg) assert model["int32"] == valid_value # int64 # under min with self.assertRaises(petstore_api.ApiValueError): - FormatTest(int64=-9223372036854775809, **required_args) + arg = dict(**required_args) + arg['int64'] = -9223372036854775809 + FormatTest(arg) # over max with self.assertRaises(petstore_api.ApiValueError): - FormatTest(int64=9223372036854775808, **required_args) + arg = dict(**required_args) + arg['int64'] = 9223372036854775808 + FormatTest(arg) # valid values in range work valid_values = [-9223372036854775808, 9223372036854775807] for valid_value in valid_values: - model = FormatTest(int64=valid_value, **required_args) + arg = dict(**required_args) + arg['int64'] = valid_value + model = FormatTest(arg) assert model["int64"] == valid_value # float32 # under min with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float32=-3.402823466385289e+38, **required_args) + arg = dict(**required_args) + arg['float32'] = -3.402823466385289e+38 + FormatTest(arg) # over max with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float32=3.402823466385289e+38, **required_args) + arg = dict(**required_args) + arg['float32'] = 3.402823466385289e+38 + FormatTest(arg) # valid values in range work valid_values = [-3.4028234663852886e+38, 3.4028234663852886e+38] for valid_value in valid_values: - model = FormatTest(float32=valid_value, **required_args) + arg = dict(**required_args) + arg['float32'] = valid_value + model = FormatTest(arg) assert model["float32"] == valid_value # float64 # under min, Decimal is used because flat can only store 64bit numbers and the max and min # take up more space than 64bit with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float64=Decimal('-1.7976931348623157082e+308'), **required_args) + arg = dict(**required_args) + arg['float64'] = Decimal('-1.7976931348623157082e+308') + FormatTest(arg) # over max with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float64=Decimal('1.7976931348623157082e+308'), **required_args) + arg = dict(**required_args) + arg['float64'] = Decimal('1.7976931348623157082e+308') + FormatTest(arg) valid_values = [-1.7976931348623157E+308, 1.7976931348623157E+308] for valid_value in valid_values: - model = FormatTest(float64=valid_value, **required_args) + arg = dict(**required_args) + arg['float64'] = valid_value + model = FormatTest(arg) assert model["float64"] == valid_value # unique_items with duplicates throws exception with self.assertRaises(petstore_api.ApiValueError): - FormatTest(arrayWithUniqueItems=[0, 1, 1], **required_args) + FormatTest({'arrayWithUniqueItems': [0, 1, 1], **required_args}) # no duplicates works values = [0, 1, 2] - model = FormatTest(arrayWithUniqueItems=values, **required_args) + model = FormatTest({'arrayWithUniqueItems': values, **required_args}) assert model["arrayWithUniqueItems"] == tuple(values) # __bool__ value of noneProp is False - model = FormatTest(noneProp=None, **required_args) + model = FormatTest({'noneProp': None, **required_args}) assert isinstance(model["noneProp"], Singleton) self.assertFalse(model["noneProp"]) self.assertTrue(model["noneProp"].is_none_()) # binary check - model = FormatTest(binary=b'123', **required_args) + model = FormatTest({'binary': b'123', **required_args}) assert isinstance(model["binary"], BinarySchema) assert isinstance(model["binary"], BytesSchema) assert isinstance(model["binary"], bytes) @@ -120,17 +145,17 @@ def test_FormatTest(self): def test_multiple_of(self): with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, + exceptions.ApiValueError, r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" ): - FormatTest( - byte='3', - date=datetime.date(2000, 1, 1), - password="abcdefghijkl", - integer=31, # Value is supposed to be multiple of '2'. An error must be raised - number=65.0, - float=62.4 - ) + FormatTest({ + 'byte': '3', + 'date': datetime.date(2000, 1, 1), + 'password': "abcdefghijkl", + 'integer': 31, # Value is supposed to be multiple of '2'. An error must be raised + 'number': 65.0, + 'float': 62.4 + }) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py index 020399fea45..8411a28d467 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py @@ -28,7 +28,7 @@ def testFruit(self): # banana test length_cm = 20.3 color = 'yellow' - fruit = Fruit(lengthCm=length_cm, color=color) + fruit = Fruit({'lengthCm': length_cm, 'color': color}) # check its properties self.assertEqual(fruit['lengthCm'], length_cm) self.assertEqual(fruit.get('lengthCm'), length_cm) @@ -78,16 +78,16 @@ def testFruit(self): # including input parameters for two oneOf instances raise an exception with self.assertRaises(petstore_api.ApiValueError): - Fruit( - lengthCm=length_cm, - cultivar='granny smith' - ) + Fruit({ + 'lengthCm': length_cm, + 'cultivar': 'granny smith' + }) # make an instance of Fruit, a composed schema oneOf model # apple test color = 'red' cultivar = 'golden delicious' - fruit = Fruit(color=color, cultivar=cultivar) + fruit = Fruit({'color': color, 'cultivar': cultivar}) # check its properties self.assertEqual(fruit['color'], color) self.assertEqual(fruit['cultivar'], cultivar) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py index 01c3676c600..b931b957bbd 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py @@ -34,8 +34,9 @@ def testFruitReq(self): # make an instance of Fruit, a composed schema oneOf model # banana test length_cm = 20.3 - fruit = FruitReq(lengthCm=length_cm) + fruit = FruitReq({'lengthCm': length_cm}) # check its properties + assert isinstance(fruit, banana_req.BananaReq) self.assertEqual(fruit.lengthCm, length_cm) self.assertEqual(fruit['lengthCm'], length_cm) self.assertEqual(getattr(fruit, 'lengthCm'), length_cm) @@ -70,23 +71,24 @@ def testFruitReq(self): # including extra parameters raises an exception with self.assertRaises(petstore_api.ApiValueError): - FruitReq( - length_cm=length_cm, - unknown_property='some value' - ) + FruitReq({ + 'length_cm': length_cm, + 'unknown_property': 'some value' + }) # including input parameters for two oneOf instances raise an exception with self.assertRaises(petstore_api.ApiValueError): - FruitReq( - length_cm=length_cm, - cultivar='granny smith' - ) + FruitReq({ + 'length_cm': length_cm, + 'cultivar': 'granny smith' + }) # make an instance of Fruit, a composed schema oneOf model # apple test cultivar = 'golden delicious' - fruit = FruitReq(cultivar=cultivar) + fruit = FruitReq({'cultivar': cultivar}) # check its properties + assert isinstance(fruit, apple_req.AppleReq) self.assertEqual(fruit.cultivar, cultivar) self.assertEqual(fruit['cultivar'], cultivar) self.assertEqual(getattr(fruit, 'cultivar'), cultivar) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py index aaab68fdf3d..6177a2564b5 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py @@ -36,7 +36,7 @@ def testGmFruit(self): length_cm = 20.3 color = 'yellow' cultivar = 'banaple' - fruit = GmFruit(lengthCm=length_cm, color=color, cultivar=cultivar) + fruit = GmFruit({'lengthCm': length_cm, 'color': color, 'cultivar': cultivar}) assert isinstance(fruit, banana.Banana) assert isinstance(fruit, apple.Apple) assert isinstance(fruit, frozendict.frozendict) @@ -69,20 +69,20 @@ def testGmFruit(self): self.assertTrue(getattr(fruit, 'origin', 'some value'), 'some value') # including extra parameters works - GmFruit( - color=color, - length_cm=length_cm, - cultivar=cultivar, - unknown_property='some value' - ) + GmFruit({ + 'color': color, + 'length_cm': length_cm, + 'cultivar': cultivar, + 'unknown_property': 'some value' + }) # including input parameters for both anyOf instances works color = 'orange' - fruit = GmFruit( - color=color, - cultivar=cultivar, - length_cm=length_cm - ) + fruit = GmFruit({ + 'color': color, + 'cultivar': cultivar, + 'length_cm': length_cm + }) self.assertEqual(fruit['color'], color) self.assertEqual(fruit['cultivar'], cultivar) self.assertEqual(fruit['length_cm'], length_cm) @@ -92,7 +92,7 @@ def testGmFruit(self): color = 'red' cultivar = 'golden delicious' origin = 'California' - fruit = GmFruit(color=color, cultivar=cultivar, origin=origin) + fruit = GmFruit({'color': color, 'cultivar': cultivar, 'origin': origin}) # check its properties self.assertEqual(fruit['color'], color) self.assertEqual(fruit['cultivar'], cultivar) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py b/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py index 79ba53badd7..7a02bdfa71d 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py @@ -9,10 +9,8 @@ Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ -from datetime import date import unittest -import petstore_api from petstore_api import schemas from petstore_api import api_client diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py b/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py index 334b890c63a..c7a035dd170 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py @@ -30,7 +30,7 @@ def testMammal(self): """Test Mammal""" # tests that we can make a BasquePig by traveling through discriminator in Pig - m = Mammal(className="BasquePig") + m = Mammal({'className': "BasquePig"}) from petstore_api.components.schema import pig from petstore_api.components.schema import basque_pig assert isinstance(m, Mammal) @@ -38,16 +38,16 @@ def testMammal(self): assert isinstance(m, pig.Pig) # can make a Whale - m = Mammal(className="whale") + m = Mammal({'className': "whale"}) from petstore_api.components.schema import whale assert isinstance(m, whale.Whale) # can use the enum value - m = Mammal(className=whale.ClassName.WHALE) + m = Mammal({'className': whale.ClassName.WHALE}) assert isinstance(m, whale.Whale) from petstore_api.components.schema import zebra - m = Mammal(className='zebra') + m = Mammal({'className': 'zebra'}) assert isinstance(m, zebra.Zebra) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_money.py b/samples/openapi3/client/petstore/python/tests_manual/test_money.py index 20f08811b61..0c4ae9ee371 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_money.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_money.py @@ -19,10 +19,10 @@ class TestMoney(unittest.TestCase): def test_Money(self): """Test Money""" - price = Money( - currency='usd', - amount='10.99' - ) + price = Money({ + 'currency': 'usd', + 'amount': '10.99' + }) self.assertEqual(price.amount.as_decimal_, decimal.Decimal('10.99')) self.assertEqual( price, diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py index 834dd05c258..bb778734206 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py @@ -12,7 +12,7 @@ import decimal import unittest -from petstore_api.components.schema.no_additional_properties import NoAdditionalProperties +from petstore_api.components.schema import no_additional_properties from petstore_api import schemas class TestNoAdditionalProperties(unittest.TestCase): @@ -28,7 +28,10 @@ def testNoAdditionalProperties(self): """Test NoAdditionalProperties""" # works with only required - inst = NoAdditionalProperties(id=1) + arg: no_additional_properties.DictInput3 = { + 'id': 1 + } + inst = no_additional_properties.NoAdditionalProperties(arg) id_by_items = inst["id"] assert id_by_items == 1 assert isinstance(id_by_items, (schemas.Int64Schema, decimal.Decimal)) @@ -42,7 +45,11 @@ def testNoAdditionalProperties(self): assert inst.get("petId", schemas.unset) is schemas.unset # works with required + optional - inst = NoAdditionalProperties(id=1, petId=2) + arg: no_additional_properties.DictInput3 = { + 'petId': 2, + 'id': 1 + } + inst = no_additional_properties.NoAdditionalProperties(arg) # needs required # TODO cast this to ApiTypeError? @@ -50,7 +57,7 @@ def testNoAdditionalProperties(self): TypeError, r"missing 1 required keyword-only argument: 'id'" ): - NoAdditionalProperties(petId=2) + no_additional_properties.NoAdditionalProperties({'petId': 2}) # may not be passed additional properties # TODO cast this to ApiTypeError? @@ -58,7 +65,7 @@ def testNoAdditionalProperties(self): TypeError, r"got an unexpected keyword argument 'invalidArg'" ): - NoAdditionalProperties(id=2, invalidArg=2) + no_additional_properties.NoAdditionalProperties({'id': 2, 'invalidArg': 2}) # plural example # TODO cast this to ApiTypeError? @@ -66,7 +73,7 @@ def testNoAdditionalProperties(self): TypeError, r"got an unexpected keyword argument 'firstInvalidArg'" ): - NoAdditionalProperties(id=2, firstInvalidArg=1, secondInvalidArg=1) + no_additional_properties.NoAdditionalProperties({'id': 2, 'firstInvalidArg': 1, 'secondInvalidArg': 1}) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py index ee643e52401..b815af0bcbc 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py @@ -8,9 +8,6 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ - - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_obj_with_required_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_obj_with_required_props.py index 53b735f16ff..4091f2040da 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_obj_with_required_props.py @@ -21,7 +21,7 @@ class TestObjWithRequiredProps(unittest.TestCase): """ObjWithRequiredProps unit test stubs""" configuration_ = schema_configuration.SchemaConfiguration() - obj = obj_with_required_props.ObjWithRequiredProps(a='a', b='b') + obj = obj_with_required_props.ObjWithRequiredProps({'a': 'a', 'b': 'b'}) assert isinstance(obj, obj_with_required_props.ObjWithRequiredProps) and isinstance(obj, obj_with_required_props_base.ObjWithRequiredPropsBase) a = obj.a orgin_cls = typing_extensions.get_origin(obj_with_required_props.A) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py index d904ab633c6..2cfba58b558 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py @@ -22,8 +22,9 @@ class TestObjectModelWithArgAndArgsProperties(unittest.TestCase): def test_ObjectModelWithArgAndArgsProperties(self): """Test ObjectModelWithArgAndArgsProperties""" - model = object_model_with_arg_and_args_properties.ObjectModelWithArgAndArgsProperties( - arg='a', args='as') + model = object_model_with_arg_and_args_properties.ObjectModelWithArgAndArgsProperties({ + 'arg': 'a', 'args': 'as' + }) origin_cls = typing_extensions.get_origin(object_model_with_arg_and_args_properties.Arg) assert origin_cls is not None self.assertTrue( diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py index 70aec76cce4..5c0c85716aa 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py @@ -30,7 +30,7 @@ def tearDown(self): def testObjectModelWithRefProps(self): """Test ObjectModelWithRefProps""" - inst = object_model_with_ref_props.ObjectModelWithRefProps(myNumber=15.0, myString="a", myBoolean=True) + inst = object_model_with_ref_props.ObjectModelWithRefProps({'myNumber': 15.0, 'myString': "a", 'myBoolean': True}) assert isinstance(inst, object_model_with_ref_props.ObjectModelWithRefProps) assert isinstance(inst, frozendict.frozendict) assert set(inst.keys()) == {"myNumber", "myString", "myBoolean"} diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 3974f926724..b5fdbcbc657 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -11,7 +11,7 @@ import unittest -import petstore_api +from petstore_api import exceptions from petstore_api.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp @@ -19,16 +19,16 @@ class TestObjectWithAllOfWithReqTestPropFromUnsetAddProp(unittest.TestCase): """ObjectWithAllOfWithReqTestPropFromUnsetAddProp unit test stubs""" def test_model_instantiation(self): - inst = ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - test='a' - ) + inst = ObjectWithAllOfWithReqTestPropFromUnsetAddProp({ + 'test': 'a' + }) assert inst == {'test': 'a'} # without the required test property an execption is thrown - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - name='a' - ) + with self.assertRaises(exceptions.ApiTypeError): + ObjectWithAllOfWithReqTestPropFromUnsetAddProp({ + 'name': 'a' + }) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py index 29cc38f238a..2af0bcffb67 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py @@ -10,10 +10,8 @@ """ -import sys import unittest -import petstore_api from petstore_api.components.schema.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps @@ -28,9 +26,13 @@ def tearDown(self): def test_ObjectWithDifficultlyNamedProps(self): """Test ObjectWithDifficultlyNamedProps""" - # FIXME: construct object with mandatory attributes with example values - # model = ObjectWithDifficultlyNamedProps() # noqa: E501 - pass + arg = { + "$special[property.name]": 'a', + "123-list": 1, + "123Number": 2, + } + model = ObjectWithDifficultlyNamedProps(arg) + assert model == arg if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py index f33add17d91..8717fd17a41 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py @@ -20,7 +20,7 @@ class TestObjectWithInlineCompositionProperty(unittest.TestCase): def test_ObjectWithInlineCompositionProperty(self): """Test ObjectWithInlineCompositionProperty""" - model = object_with_inline_composition_property.ObjectWithInlineCompositionProperty(someProp='a') + model = object_with_inline_composition_property.ObjectWithInlineCompositionProperty({'someProp': 'a'}) self.assertTrue( isinstance( model["someProp"], @@ -31,7 +31,7 @@ def test_ObjectWithInlineCompositionProperty(self): # error thrown on length < 1 with self.assertRaises(exceptions.ApiValueError): - object_with_inline_composition_property.ObjectWithInlineCompositionProperty(someProp='') + object_with_inline_composition_property.ObjectWithInlineCompositionProperty({'someProp': ''}) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py index ae7173aec09..d89c6850bae 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py @@ -11,7 +11,7 @@ import unittest -import petstore_api +from petstore_api import exceptions from petstore_api.components.schema.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties from petstore_api.components.schema.array_with_validations_in_items import ArrayWithValidationsInItems from petstore_api.components.schema.from_schema import FromSchema @@ -24,7 +24,7 @@ def test_instantiation_success(self): array_value = ArrayWithValidationsInItems( [4, 5] ) - from_value = FromSchema(data='abc', id=1) + from_value = FromSchema({'data': 'abc', 'id': 1}) kwargs = { 'from': from_value, '!reference': array_value @@ -46,26 +46,26 @@ def test_omitting_required_properties_fails(self): array_value = ArrayWithValidationsInItems( [4, 5] ) - from_value = FromSchema(data='abc', id=1) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): + from_value = FromSchema({'data': 'abc', 'id': 1}) + with self.assertRaises(exceptions.ApiTypeError): ObjectWithInvalidNamedRefedProperties( - **{ + { 'from': from_value, } ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): + with self.assertRaises(exceptions.ApiTypeError): ObjectWithInvalidNamedRefedProperties( - **{ + { '!reference': array_value } ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): + with self.assertRaises(exceptions.ApiTypeError): ObjectWithInvalidNamedRefedProperties.from_openapi_data_( { 'from': {'data': 'abc', 'id': 1}, } ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): + with self.assertRaises(exceptions.ApiTypeError): ObjectWithInvalidNamedRefedProperties.from_openapi_data_( { '!reference': [4, 5] diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py index 8e1b48d0c83..7a774644d00 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py @@ -41,11 +41,11 @@ def test_ObjectWithValidations(self): r"Invalid value `frozendict.frozendict\({'a': 'a'}\)`, number of properties must be greater than or equal to `2` at \('args\[0\]',\)" ): # number of properties less than 2 fails - model = ObjectWithValidations(a='a') + model = ObjectWithValidations({'a': 'a'}) # 2 or more properties succeeds - model = ObjectWithValidations(a='a', b='b') - model = ObjectWithValidations(a='a', b='b', c='c') + model = ObjectWithValidations({'a': 'a', 'b': 'b'}) + model = ObjectWithValidations({'a': 'a', 'b': 'b', 'c': 'c'}) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py b/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py index 13c78a84610..37862808677 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py @@ -9,7 +9,6 @@ Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ import unittest -import collections from petstore_api import api_client, exceptions, schemas diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py b/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py index f45984f4446..7decc984d69 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py @@ -10,10 +10,8 @@ """ -import sys import unittest -import petstore_api from petstore_api.components.schema.grandparent_animal import GrandparentAnimal from petstore_api.components.schema.parent_pet import ParentPet @@ -33,7 +31,7 @@ def testParentPet(self): # test that we can make a ParentPet from a ParentPet # which requires that we travel back through ParentPet's allOf descendant # GrandparentAnimal, and we use the descendant's discriminator to make ParentPet - model = ParentPet(pet_type="ParentPet") + model = ParentPet({'pet_type': "ParentPet"}) assert isinstance(model, ParentPet) assert isinstance(model, GrandparentAnimal) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_pet.py b/samples/openapi3/client/petstore/python/tests_manual/test_pet.py index 45c0e2ded1a..bb816767851 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_pet.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_pet.py @@ -20,8 +20,8 @@ class TesttPet(unittest.TestCase): """ParentPet unit test stubs""" def testPet(self): - cat = category.Category(name='hi', addprop={'a': 1}) - inst = pet.Pet(photoUrls=[], name='Katsu', category=cat) + cat = category.Category({'name': 'hi', 'addprop': {'a': 1}}) + inst = pet.Pet({'photoUrls': [], 'name': 'Katsu', 'category': cat}) self.assertEqual( inst, { diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py b/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py index ba042e060aa..3551ed301c2 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py @@ -30,9 +30,9 @@ def tearDown(self): def testQuadrilateral(self): """Test Quadrilateral""" - instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="ComplexQuadrilateral") + instance = Quadrilateral({'shapeType': "Quadrilateral", 'quadrilateralType': "ComplexQuadrilateral"}) assert isinstance(instance, complex_quadrilateral.ComplexQuadrilateral) - instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="SimpleQuadrilateral") + instance = Quadrilateral({'shapeType': "Quadrilateral", 'quadrilateralType': "SimpleQuadrilateral"}) assert isinstance(instance, simple_quadrilateral.SimpleQuadrilateral) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_self_referencing_object_model.py b/samples/openapi3/client/petstore/python/tests_manual/test_self_referencing_object_model.py index 4fe8834443f..c71aaf84a48 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_self_referencing_object_model.py @@ -18,10 +18,10 @@ class TestSelfReferencingObjectModel(unittest.TestCase): """SelfReferencingObjectModel unit test stubs""" def test_instantiation(self): - inst = SelfReferencingObjectModel( - selfRef=SelfReferencingObjectModel({}), - someAddProp=SelfReferencingObjectModel({}) - ) + inst = SelfReferencingObjectModel({ + 'selfRef': SelfReferencingObjectModel({}), + 'someAddProp': SelfReferencingObjectModel({}) + }) assert inst == { 'selfRef': {}, 'someAddProp': {} @@ -38,7 +38,7 @@ def test_instantiation(self): # error when wrong type passed in with self.assertRaises(petstore_api.ApiTypeError): for invalid_type_kwarg in invalid_type_kwargs: - SelfReferencingObjectModel(**invalid_type_kwarg) + SelfReferencingObjectModel(invalid_type_kwarg) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_shape.py b/samples/openapi3/client/petstore/python/tests_manual/test_shape.py index 13f692fd6f0..b9df1397db1 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_shape.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_shape.py @@ -45,10 +45,10 @@ def test_recursionlimit(self): def testShape(self): """Test Shape""" - tri = Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ) + tri = Shape({ + 'shapeType': "Triangle", + 'triangleType': "EquilateralTriangle" + }) assert isinstance(tri, equilateral_triangle.EquilateralTriangle) assert isinstance(tri, triangle.Triangle) assert isinstance(tri, triangle_interface.TriangleInterface) @@ -57,28 +57,28 @@ def testShape(self): assert isinstance(tri.shapeType, str) assert isinstance(tri.shapeType, Singleton) - tri = Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) + tri = Shape({ + 'shapeType': "Triangle", + 'triangleType': "IsoscelesTriangle" + }) assert isinstance(tri, isosceles_triangle.IsoscelesTriangle) - tri = Shape( - shapeType="Triangle", - triangleType="ScaleneTriangle" - ) + tri = Shape({ + 'shapeType': "Triangle", + 'triangleType': "ScaleneTriangle" + }) assert isinstance(tri, scalene_triangle.ScaleneTriangle) - quad = Shape( - shapeType="Quadrilateral", - quadrilateralType="ComplexQuadrilateral" - ) + quad = Shape({ + 'shapeType': "Quadrilateral", + 'quadrilateralType': "ComplexQuadrilateral" + }) assert isinstance(quad, complex_quadrilateral.ComplexQuadrilateral) - quad = Shape( - shapeType="Quadrilateral", - quadrilateralType="SimpleQuadrilateral" - ) + quad = Shape({ + 'shapeType': "Quadrilateral", + 'quadrilateralType': "SimpleQuadrilateral" + }) assert isinstance(quad, simple_quadrilateral.SimpleQuadrilateral) # data missing @@ -98,7 +98,7 @@ def testShape(self): petstore_api.ApiValueError, err_msg ): - Shape(shapeType="Circle") + Shape({'shapeType': "Circle"}) # invalid quadrilateral_type (second discriminator) err_msg = ( @@ -109,10 +109,10 @@ def testShape(self): petstore_api.ApiValueError, err_msg ): - Shape( - shapeType="Quadrilateral", - quadrilateralType="Triangle" - ) + Shape({ + 'shapeType': "Quadrilateral", + 'quadrilateralType': "Triangle" + }) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py b/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py index 5cc16d943fb..1979dcb0ff3 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py @@ -28,7 +28,7 @@ def testTriangle(self): """Test Triangle""" tri_classes = [EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle] for tri_class in tri_classes: - tri = Triangle(shapeType="Triangle", triangleType=tri_class.__name__) + tri = Triangle({'shapeType': "Triangle", 'triangleType': tri_class.__name__}) assert isinstance(tri, tri_class) assert isinstance(tri, Triangle) assert isinstance(tri, TriangleInterface) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py b/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py index ef344b29859..556c96b9b99 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py @@ -64,7 +64,7 @@ def test_get_user_by_name(self): firstName='first', lastName='last' ) - body = user.User(**value_simple) + body = user.User(value_simple) mock_request.return_value = self.response( self.json_bytes(value_simple) ) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py index a4893386098..60a96e8e213 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py @@ -244,7 +244,7 @@ def test_dict_validate_direct_instantiation(self): side_effect=Bar._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - Foo(bar="a", configuration_=used_configuration) + Foo({'bar': "a"}, configuration_=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict({"bar": "a"}), validation_metadata=ValidationMetadata( @@ -270,7 +270,7 @@ def test_dict_validate_direct_instantiation_cast_item(self): "_validate", side_effect=Bar._validate, ) as mock_inner_validate: - Foo(bar=bar, configuration_=used_configuration) + Foo({'bar': bar}, configuration_=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict(dict(bar='a')), validation_metadata=ValidationMetadata( diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_whale.py b/samples/openapi3/client/petstore/python/tests_manual/test_whale.py index 8edf79adfe2..1f8433ead7b 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_whale.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_whale.py @@ -21,18 +21,18 @@ class TestWhale(unittest.TestCase): def test_Whale(self): # test that the hasBaleen __bool__ method is working, True input - whale = Whale( - className='whale', - hasBaleen=True - ) + whale = Whale({ + 'className': 'whale', + 'hasBaleen': True + }) assert isinstance(whale["hasBaleen"], BoolClass) self.assertTrue(whale["hasBaleen"]) # test that the hasBaleen __bool__ method is working, False input - whale = Whale( - className='whale', - hasBaleen=False - ) + whale = Whale({ + 'className': 'whale', + 'hasBaleen': False + }) assert isinstance(whale["hasBaleen"], BoolClass) self.assertFalse(whale["hasBaleen"]) From 853be64ac0a1d39b10d0183518cc598da32530d2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 11:14:38 -0700 Subject: [PATCH 25/36] Fixes python tests --- .../src/main/resources/python/api_client.hbs | 2 - ..._helper_optional_properties_input_type.hbs | 2 +- .../schemas/_helper_properties_input_type.hbs | 31 +++---- ..._helper_required_properties_input_type.hbs | 2 +- .../python/src/petstore_api/api_client.py | 2 - .../content/application_json/schema.py | 2 +- .../schema/additional_properties_class.py | 10 +-- .../schema/additional_properties_validator.py | 6 +- ...ditional_properties_with_array_of_enums.py | 2 +- .../petstore_api/components/schema/address.py | 2 +- .../petstore_api/components/schema/drawing.py | 38 ++++---- .../components/schema/map_test.py | 8 +- ...perties_and_additional_properties_class.py | 22 +---- .../components/schema/nullable_class.py | 20 +++-- .../req_props_from_explicit_add_props.py | 6 +- .../schema/req_props_from_true_add_props.py | 38 ++++---- .../schema/self_referencing_object_model.py | 22 +---- .../components/schema/string_boolean_map.py | 2 +- .../petstore_api/components/schema/zebra.py | 38 ++++---- .../content/application_json/schema.py | 2 +- .../python/tests_manual/test_drawing.py | 90 +++++++++---------- .../python/tests_manual/test_fruit.py | 2 +- .../test_no_additional_properties.py | 16 ++-- ...est_object_with_difficultly_named_props.py | 6 +- ...ect_with_invalid_named_refed_properties.py | 2 +- 25 files changed, 172 insertions(+), 201 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs index 097dd580ea9..af61f59c93f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs @@ -1408,8 +1408,6 @@ class RequestBody(StyleFormSerializer, JSONDetector): schema = schemas._get_class(media_type.schema) if isinstance(in_data, schema): cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = schema(**in_data) else: cast_in_data = schema(in_data) # TODO check for and use encoding if it exists diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs index 00be50be550..dabe0e3a938 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_optional_properties_input_type.hbs @@ -29,7 +29,7 @@ {{/with}} {{/each}} {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} + {{> components/schemas/_helper_property_value_type }} {{/with}} ] ] diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs index fa08faa9569..d7f3c5d6682 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_properties_input_type.hbs @@ -15,29 +15,27 @@ class {{mapInputJsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.cam {{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ str, typing.Union[ - {{#each requiredProperties}} - {{#with this}} + {{#each requiredProperties}} + {{#with this}} {{> components/schemas/_helper_property_value_type }} - {{/with}} - {{/each}} - {{#each optionalProperties}} - {{#with this}} + {{/with}} + {{/each}} + {{#each optionalProperties}} + {{#with this}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} + {{/each}} + {{#with additionalProperties}} {{> components/schemas/_helper_property_value_type }} {{/with}} - {{/each}} - {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} - {{/with}} ] ] {{else}} {{mapInputJsonPathPiece.camelCase}} = typing.Mapping[ str, - typing.Union[ - {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} - {{/with}} - ] + {{#with additionalProperties}} + {{> components/schemas/_helper_property_value_type }} + {{/with}} ] {{/and}} {{/if}} @@ -56,9 +54,6 @@ class {{mapInputJsonPathPiece.camelCase}}({{requiredProperties.jsonPathPiece.cam {{> components/schemas/_helper_property_value_type }} {{/with}} {{/each}} - {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} - {{/with}} schemas.INPUT_TYPES_ALL_INCL_SCHEMA ] ] diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs index 89bebe1ccd9..ef361671c89 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_required_properties_input_type.hbs @@ -37,7 +37,7 @@ {{/with}} {{/each}} {{#with additionalProperties}} - {{> components/schemas/_helper_new_property_value_type optional=false }} + {{> components/schemas/_helper_property_value_type }} {{/with}} ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py index 0fce536bbc3..49cca911d4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py @@ -1410,8 +1410,6 @@ def serialize( schema = schemas._get_class(media_type.schema) if isinstance(in_data, schema): cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = schema(**in_data) else: cast_in_data = schema(in_data) # TODO check for and use encoding if it exists diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index 34fe719d68d..b44c379e9a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -17,7 +17,7 @@ AdditionalProperties[decimal.Decimal], decimal.Decimal, int - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 4f902478e24..e9b6c9238b1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -16,7 +16,7 @@ typing.Union[ AdditionalProperties[str], str - ] + ], ] @@ -59,7 +59,7 @@ def __new__( typing.Union[ AdditionalProperties3[str], str - ] + ], ] @@ -102,7 +102,7 @@ def __new__( AdditionalProperties2[frozendict.frozendict], dict, frozendict.frozendict - ] + ], ] @@ -169,7 +169,7 @@ def __new__( bytes, io.FileIO, io.BufferedReader - ] + ], ] @@ -254,7 +254,7 @@ def __new__( typing.Union[ AdditionalProperties6[str], str - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 2912300da95..d5a21e50b45 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -34,7 +34,7 @@ bytes, io.FileIO, io.BufferedReader - ] + ], ] @@ -157,7 +157,7 @@ def __new__( bytes, io.FileIO, io.BufferedReader - ] + ], ] @@ -280,7 +280,7 @@ def __new__( bytes, io.FileIO, io.BufferedReader - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 0ba48227b82..079d2fa3ac1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -52,7 +52,7 @@ def __getitem__(self, name: int) -> enum_class.EnumClass[str]: AdditionalProperties[tuple], list, tuple - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index f52f1c8b855..08b01ee9133 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -17,7 +17,7 @@ AdditionalProperties[decimal.Decimal], decimal.Decimal, int - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index b25761c0294..19340092347 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -258,24 +258,26 @@ def __new__( list, tuple ], - AdditionalProperties[ - schemas.INPUT_BASE_TYPES + typing.Union[ + fruit.Fruit[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 593abca3cc6..da3ced9d1ed 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -16,7 +16,7 @@ typing.Union[ AdditionalProperties2[str], str - ] + ], ] @@ -59,7 +59,7 @@ def __new__( AdditionalProperties[frozendict.frozendict], dict, frozendict.frozendict - ] + ], ] @@ -127,7 +127,7 @@ def LOWER(cls) -> AdditionalProperties3[str]: typing.Union[ AdditionalProperties3[str], str - ] + ], ] @@ -170,7 +170,7 @@ def __new__( typing.Union[ AdditionalProperties4[schemas.BoolClass], bool - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 440de483cde..969856dc4a7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -150,24 +150,8 @@ def __new__( DictInput = typing.Mapping[ str, typing.Union[ - AdditionalProperties[ - schemas.INPUT_BASE_TYPES - ], + animal.Animal[frozendict.frozendict], dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] + frozendict.frozendict + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 139bcf2181d..5e6b9468f62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -601,7 +601,7 @@ def __getitem__(self, name: int) -> Items3[typing.Union[ AdditionalProperties[frozendict.frozendict], dict, frozendict.frozendict - ] + ], ] @@ -715,7 +715,7 @@ def __new__( None, dict, frozendict.frozendict - ] + ], ] @@ -832,7 +832,7 @@ def __new__( None, dict, frozendict.frozendict - ] + ], ] @@ -991,13 +991,15 @@ def __new__( dict, frozendict.frozendict ], - AdditionalProperties4[typing.Union[ - schemas.NoneClass, + typing.Union[ + AdditionalProperties4[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, frozendict.frozendict - ]], - None, - dict, - frozendict.frozendict + ], ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 1eb668852ed..d075a0080bc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -22,8 +22,10 @@ AdditionalProperties[str], str ], - AdditionalProperties[str], - str + typing.Union[ + AdditionalProperties[str], + str + ], ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 5f62975aae0..43d0d72c3ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -57,25 +57,27 @@ io.FileIO, io.BufferedReader ], - AdditionalProperties[ - schemas.INPUT_BASE_TYPES + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 9f35a8a4290..a575bccc67b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -77,24 +77,10 @@ def __new__( dict, frozendict.frozendict ], - AdditionalProperties[ - schemas.INPUT_BASE_TYPES + typing.Union[ + SelfReferencingObjectModel[frozendict.frozendict], + dict, + frozendict.frozendict ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index 5bff1af0b0f..d19bf29f3b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -16,7 +16,7 @@ typing.Union[ AdditionalProperties[schemas.BoolClass], bool - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index e0610a3b98b..5d7f9fce469 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -82,25 +82,27 @@ def ZEBRA(cls) -> ClassName[str]: Type[str], str ], - AdditionalProperties[ - schemas.INPUT_BASE_TYPES + typing.Union[ + AdditionalProperties[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader ] ] diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 5272bae28a4..3947adbd58e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -16,7 +16,7 @@ typing.Union[ AdditionalProperties[str], str - ] + ], ] diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py b/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py index 53f6208c3c9..9cd7639bab6 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py @@ -34,10 +34,10 @@ def test_create_instances(self): Validate instance can be created """ - inst = shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) + inst = shape.Shape({ + 'shapeType': "Triangle", + 'triangleType': "IsoscelesTriangle" + }) from petstore_api.components.schema.isosceles_triangle import IsoscelesTriangle assert isinstance(inst, IsoscelesTriangle) @@ -46,35 +46,35 @@ def test_deserialize_oneof_reference(self): Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' schema is specified as a reference ($ref), not an inline 'oneOf' schema. """ - isosceles_triangle = shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) + isosceles_triangle = shape.Shape({ + 'shapeType': "Triangle", + 'triangleType': "IsoscelesTriangle" + }) from petstore_api.components.schema.isosceles_triangle import IsoscelesTriangle assert isinstance(isosceles_triangle, IsoscelesTriangle) from petstore_api.components.schema.equilateral_triangle import EquilateralTriangle - inst = Drawing( - mainShape=isosceles_triangle, - shapes=[ - shape.Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ), - shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ), - shape.Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ), - shape.Shape( - shapeType="Quadrilateral", - quadrilateralType="ComplexQuadrilateral" - ) + inst = Drawing({ + 'mainShape': isosceles_triangle, + 'shapes': [ + shape.Shape({ + 'shapeType': "Triangle", + 'triangleType': "EquilateralTriangle" + }), + shape.Shape({ + 'shapeType': "Triangle", + 'triangleType': "IsoscelesTriangle" + }), + shape.Shape({ + 'shapeType': "Triangle", + 'triangleType': "EquilateralTriangle" + }), + shape.Shape({ + 'shapeType': "Quadrilateral", + 'quadrilateralType': "ComplexQuadrilateral" + }) ], - ) + }) assert isinstance(inst, Drawing) assert isinstance(inst["mainShape"], IsoscelesTriangle) self.assertEqual(len(inst["shapes"]), 4) @@ -92,11 +92,11 @@ def test_deserialize_oneof_reference(self): petstore_api.ApiValueError, err_msg ): - Drawing( + Drawing({ # 'mainShape' has type 'Shape', which is a oneOf [triangle, quadrilateral] # So the None value should not be allowed and an exception should be raised. - mainShape=None, - ) + 'mainShape': None, + }) """ We can pass in a Triangle instance in shapes @@ -104,15 +104,15 @@ def test_deserialize_oneof_reference(self): does validate as a Shape, so this works """ from petstore_api.components.schema.triangle import Triangle - inst = Drawing( - mainShape=isosceles_triangle, - shapes=[ - Triangle( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ) + inst = Drawing({ + 'mainShape': isosceles_triangle, + 'shapes': [ + Triangle({ + 'shapeType': "Triangle", + 'triangleType': "EquilateralTriangle" + }) ] - ) + }) self.assertEqual(len(inst["shapes"]), 1) from petstore_api.components.schema.triangle_interface import TriangleInterface shapes = inst["shapes"] @@ -131,10 +131,10 @@ def test_deserialize_oneof_reference_with_null_type(self): # Validate we can assign the None value to shape_or_null, because the 'null' type # is one of the allowed types in the 'ShapeOrNull' schema. - inst = Drawing( + inst = Drawing({ # 'shapeOrNull' has type 'ShapeOrNull', which is a oneOf [null, triangle, quadrilateral] - shapeOrNull=None, - ) + 'shapeOrNull': None, + }) assert isinstance(inst, Drawing) self.assertFalse('mainShape' in inst) self.assertTrue('shapeOrNull' in inst) @@ -150,11 +150,11 @@ def test_deserialize_oneof_reference_with_nullable_type(self): # Validate we can assign the None value to nullableShape, because the NullableShape # has the 'nullable: true' attribute. - inst = Drawing( + inst = Drawing({ # 'nullableShape' has type 'NullableShape', which is a oneOf [triangle, quadrilateral] # and the 'nullable: true' attribute. - nullableShape=None, - ) + 'nullableShape': None, + }) assert isinstance(inst, Drawing) self.assertFalse('mainShape' in inst) self.assertTrue('nullableShape' in inst) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py index 8411a28d467..baf866b5458 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py @@ -70,7 +70,7 @@ def testFruit(self): kwargs ) - fruit = Fruit(**kwargs) + fruit = Fruit(kwargs) self.assertEqual( fruit, kwargs diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py index bb778734206..23f340430f8 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py @@ -13,7 +13,7 @@ import unittest from petstore_api.components.schema import no_additional_properties -from petstore_api import schemas +from petstore_api import schemas, exceptions class TestNoAdditionalProperties(unittest.TestCase): """NoAdditionalProperties unit test stubs""" @@ -55,25 +55,25 @@ def testNoAdditionalProperties(self): # TODO cast this to ApiTypeError? with self.assertRaisesRegex( TypeError, - r"missing 1 required keyword-only argument: 'id'" + r"missing 1 required argument: \['id'\]" ): no_additional_properties.NoAdditionalProperties({'petId': 2}) # may not be passed additional properties # TODO cast this to ApiTypeError? with self.assertRaisesRegex( - TypeError, - r"got an unexpected keyword argument 'invalidArg'" + exceptions.ApiValueError, + r"Value is invalid because it is disallowed by AnyTypeSchema" ): - no_additional_properties.NoAdditionalProperties({'id': 2, 'invalidArg': 2}) + no_additional_properties.NoAdditionalProperties({'id': 2, 'invalidArg': 1}) # plural example # TODO cast this to ApiTypeError? with self.assertRaisesRegex( - TypeError, - r"got an unexpected keyword argument 'firstInvalidArg'" + exceptions.ApiValueError, + r"Value is invalid because it is disallowed by AnyTypeSchema" ): - no_additional_properties.NoAdditionalProperties({'id': 2, 'firstInvalidArg': 1, 'secondInvalidArg': 1}) + no_additional_properties.NoAdditionalProperties({'id': 2, 'firstInvalidArg': 1, 'secondInvalidArg': 3}) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py index 2af0bcffb67..63727e55773 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py @@ -27,9 +27,9 @@ def tearDown(self): def test_ObjectWithDifficultlyNamedProps(self): """Test ObjectWithDifficultlyNamedProps""" arg = { - "$special[property.name]": 'a', - "123-list": 1, - "123Number": 2, + "$special[property.name]": 1, + "123-list": 'a', + "123Number": 3, } model = ObjectWithDifficultlyNamedProps(arg) assert model == arg diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py index d89c6850bae..a0df444d2a9 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py @@ -31,7 +31,7 @@ def test_instantiation_success(self): } # __new__ creation works inst = ObjectWithInvalidNamedRefedProperties( - **kwargs + kwargs ) primitive_data = { 'from': {'data': 'abc', 'id': 1}, From 2f864a596282c88857d2a23c8da975d1fae774ef Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 11:52:24 -0700 Subject: [PATCH 26/36] Converts example properties into example keys, fixes schema naming bug --- .../codegen/DefaultCodegen.java | 8 +++-- .../languages/PythonClientCodegen.java | 10 ++++-- .../python/docs/components/schema/items.md | 4 +-- .../object_with_colliding_properties.md | 4 +-- .../docs/paths/another_fake_dummy/patch.md | 2 +- .../petstore/python/docs/paths/fake/get.md | 8 ++--- .../petstore/python/docs/paths/fake/patch.md | 2 +- .../petstore/python/docs/paths/fake/post.md | 32 +++++++++---------- .../paths/fake_body_with_file_schema/put.md | 6 ++-- .../paths/fake_body_with_query_params/put.md | 26 +++++++-------- .../docs/paths/fake_classname_test/patch.md | 2 +- .../fake_inline_additional_properties/post.md | 4 +-- .../paths/fake_inline_composition/post.md | 6 ++-- .../docs/paths/fake_json_form_data/get.md | 8 ++--- .../docs/paths/fake_obj_in_query/get.md | 6 ++-- .../post.md | 8 ++--- .../docs/paths/fake_ref_obj_in_query/get.md | 2 +- .../docs/paths/fake_refs_mammal/post.md | 6 ++-- .../post.md | 6 ++-- .../docs/paths/fake_upload_file/post.md | 8 ++--- .../docs/paths/fake_upload_files/post.md | 6 ++-- .../petstore/python/docs/paths/pet/post.md | 20 ++++++------ .../petstore/python/docs/paths/pet/put.md | 20 ++++++------ .../python/docs/paths/pet_pet_id/post.md | 8 ++--- .../paths/pet_pet_id_upload_image/post.md | 8 ++--- .../python/docs/paths/store_order/post.md | 12 +++---- .../petstore/python/docs/paths/user/post.md | 26 +++++++-------- .../docs/paths/user_create_with_array/post.md | 26 +++++++-------- .../docs/paths/user_create_with_list/post.md | 26 +++++++-------- .../python/docs/paths/user_username/put.md | 26 +++++++-------- .../petstore_api/components/schema/_return.py | 8 ++--- .../petstore_api/components/schema/client.py | 8 ++--- .../petstore_api/components/schema/items.py | 8 ++--- .../petstore_api/components/schema/name.py | 10 +++--- .../object_with_colliding_properties.py | 8 ++--- 35 files changed, 193 insertions(+), 185 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index d0857dcb555..fae7b9e8268 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -4329,9 +4329,13 @@ public CodegenKey getKey(String key, String keyType, String sourceJsonPath) { if (!sourceJsonPathToKeyToQty.containsKey(sourceJsonPath)) { sourceJsonPathToKeyToQty.put(sourceJsonPath, keyToQty); } - Integer qty = keyToQty.getOrDefault(usedKey, 0); + /* + saw use case with component named Client and nested property named client + lowercase to ensure they increment the same key + */ + Integer qty = keyToQty.getOrDefault(usedKey.toLowerCase(Locale.ROOT), 0); qty += 1; - keyToQty.put(usedKey, qty); + keyToQty.put(usedKey.toLowerCase(Locale.ROOT), qty); if (qty > 1) { suffix = qty.toString(); } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java index f789a687c0d..f56b92b3b4d 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java @@ -1285,6 +1285,10 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o if (modelName != null) { openChars = modelName + "("; closeChars = ")"; + if (schema.getTypes() != null && schema.getTypes().size() == 1 && schema.getTypes().contains("object")) { + openChars = openChars + "{"; + closeChars = "}" + closeChars; + } } String fullPrefix = currentIndentation + prefix + openChars; @@ -1483,8 +1487,8 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o } } else if (ModelUtils.isTypeObjectSchema(schema)) { if (modelName == null) { - fullPrefix += "dict("; - closeChars = ")"; + fullPrefix += "{"; + closeChars = "}"; } if (cycleFound) { return fullPrefix + closeChars; @@ -1602,7 +1606,7 @@ private String exampleForObjectModel(Schema schema, String fullPrefix, String cl propSchema, propExample, indentationLevel + 1, - propName + "=", + "\"" + propName + "\": ", exampleLine + 1, includedSchemas)).append(",\n"); } diff --git a/samples/openapi3/client/petstore/python/docs/components/schema/items.md b/samples/openapi3/client/petstore/python/docs/components/schema/items.md index dd76e5362c3..287b6a6a841 100644 --- a/samples/openapi3/client/petstore/python/docs/components/schema/items.md +++ b/samples/openapi3/client/petstore/python/docs/components/schema/items.md @@ -12,9 +12,9 @@ list, tuple | tuple | component's name collides with the inner schema name ## List Items Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict | frozendict.frozendict | | +[items](#items2) | dict, frozendict.frozendict | frozendict.frozendict | | -# Items +# Items2 ## Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/components/schema/object_with_colliding_properties.md b/samples/openapi3/client/petstore/python/docs/components/schema/object_with_colliding_properties.md index a74b0cdd42c..dc2d22a2f15 100644 --- a/samples/openapi3/client/petstore/python/docs/components/schema/object_with_colliding_properties.md +++ b/samples/openapi3/client/petstore/python/docs/components/schema/object_with_colliding_properties.md @@ -13,7 +13,7 @@ dict, frozendict.frozendict | frozendict.frozendict | component with properties Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- **someProp** | dict, frozendict.frozendict | [properties.SomeProp](#properties-someprop) | | [optional] -**someprop** | dict, frozendict.frozendict | [properties.Someprop](#properties-someprop) | | [optional] +**someprop** | dict, frozendict.frozendict | [properties.Someprop2](#properties-someprop2) | | [optional] **any_string_name** | dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema | frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO | any string name can be used but the value must be the correct type | [optional] # properties SomeProp @@ -23,7 +23,7 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict | frozendict.frozendict | | -# properties Someprop +# properties Someprop2 ## Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md b/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md index dc437d088e5..6220c2e80c5 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md @@ -96,7 +96,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = client.Client( - client="client_example", + "client": "client_example", ) try: # To test special tags diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake/get.md index f192513f05a..4dbfc05776a 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake/get.md @@ -253,12 +253,12 @@ with petstore_api.ApiClient(used_configuration) as api_client: ], 'enum_header_string': "-efg", } - body = dict( - enum_form_string_array=[ + body = { + "enum_form_string_array": [ "$" ], - enum_form_string="-efg", - ) + "enum_form_string": "-efg", + } try: # To test enum parameters api_response = api_instance.enum_parameters( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md b/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md index 9d46194e575..8888a88120c 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md @@ -96,7 +96,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = client.Client( - client="client_example", + "client": "client_example", ) try: # To test \"client\" model diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake/post.md index 39a833aee6b..da32cb81c51 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake/post.md @@ -143,22 +143,22 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = dict( - integer=10, - int32=20, - int64=1, - number=32.1, - _float=3.14, - double=67.8, - string="A", - pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", - byte='YQ==', - binary=open('/path/to/file', 'rb'), - date="1970-01-01", - date_time="2020-02-02T20:20:20.222220Z", - password="password_example", - callback="callback_example", - ) + body = { + "integer": 10, + "int32": 20, + "int64": 1, + "number": 32.1, + "_float": 3.14, + "double": 67.8, + "string": "A", + "pattern_without_delimiter": "AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", + "byte": 'YQ==', + "binary": open('/path/to/file', 'rb'), + "date": "1970-01-01", + "date_time": "2020-02-02T20:20:20.222220Z", + "password": "password_example", + "callback": "callback_example", + } try: # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_response = api_instance.endpoint_parameters( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md index 49686ac8b18..06a50db2a86 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md @@ -83,10 +83,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = file_schema_test_class.FileSchemaTestClass( - file=file.File( - source_uri="source_uri_example", + "file": file.File( + "source_uri": "source_uri_example", ), - files=[ + "files": [ file.File() ], ) diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md index 2a930a86e41..aa071fe977f 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md @@ -105,19 +105,19 @@ with petstore_api.ApiClient(used_configuration) as api_client: 'query': "query_example", } body = user.User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, + "id": 1, + "username": "username_example", + "first_name": "first_name_example", + "last_name": "last_name_example", + "email": "email_example", + "password": "password_example", + "phone": "phone_example", + "user_status": 1, + "object_with_no_declared_props": {}, + "object_with_no_declared_props_nullable": {}, + "any_type_prop": None, + "any_type_except_null_prop": None, + "any_type_prop_nullable": None, ) try: api_response = api_instance.body_with_query_params( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md b/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md index 9ab5bf311dc..a7896053209 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = client.Client( - client="client_example", + "client": "client_example", ) try: # To test class name in snake case diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md index a12c017e6ef..23d46582133 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md @@ -90,9 +90,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only required values which don't have defaults set - body = dict( + body = { "key": "key_example", - ) + } try: # test inline additionalProperties api_response = api_instance.inline_additional_properties( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_inline_composition/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_inline_composition/post.md index ae2725c0b34..a2081eba332 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_inline_composition/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_inline_composition/post.md @@ -275,9 +275,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values query_params: operation.RequestQueryParameters.Params = { 'compositionAtRoot': None, - 'compositionInProperty': dict( - some_prop=None, - ), + 'compositionInProperty': { + "some_prop": None, + }, } body = None try: diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_json_form_data/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_json_form_data/get.md index daa995c8d01..0ea8999dd88 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_json_form_data/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_json_form_data/get.md @@ -89,10 +89,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = dict( - param="param_example", - param2="param2_example", - ) + body = { + "param": "param_example", + "param2": "param2_example", + } try: # test json serialization of form data api_response = api_instance.json_form_data( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_obj_in_query/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_obj_in_query/get.md index bd8e6599dc4..c5de8ee7adf 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_obj_in_query/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_obj_in_query/get.md @@ -96,9 +96,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values query_params: operation.RequestQueryParameters.Params = { - 'mapBean': dict( - keyword="keyword_example", - ), + 'mapBean': { + "keyword": "keyword_example", + }, } try: # user list diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md index b98215c45d7..f25507c392e 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md @@ -180,10 +180,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params = { 'petId': 1, } - body = dict( - additional_metadata="additional_metadata_example", - required_file=open('/path/to/file', 'rb'), - ) + body = { + "additional_metadata": "additional_metadata_example", + "required_file": open('/path/to/file', 'rb'), + } try: # uploads an image (required) api_response = api_instance.upload_file_with_required_file( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md index c3f23d7a7cc..8b6f009765b 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md @@ -91,7 +91,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values query_params: operation.RequestQueryParameters.Params = { 'mapBean': foo.Foo( - bar=bar.Bar("bar"), + "bar": bar.Bar("bar"), ), } try: diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_mammal/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_mammal/post.md index a8c0bcd48ce..e403a8621e4 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_mammal/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_mammal/post.md @@ -112,9 +112,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = mammal.Mammal( - has_baleen=True, - has_teeth=True, - class_name="whale", + "has_baleen": True, + "has_teeth": True, + "class_name": "whale", ) try: api_response = api_instance.mammal( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md index a664a90be34..93704a3c1d4 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md @@ -112,9 +112,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values body = object_model_with_ref_props.ObjectModelWithRefProps( - my_number=number_with_validations.NumberWithValidations(10), - my_string=string.String("my_string_example"), - my_boolean=boolean.Boolean(True), + "my_number": number_with_validations.NumberWithValidations(10), + "my_string": string.String("my_string_example"), + "my_boolean": boolean.Boolean(True), ) try: api_response = api_instance.object_model_with_ref_props( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_upload_file/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_upload_file/post.md index 6863b5346bd..1fd8d7f0350 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_upload_file/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_upload_file/post.md @@ -115,10 +115,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) + body = { + "additional_metadata": "additional_metadata_example", + "file": open('/path/to/file', 'rb'), + } try: # uploads a file using multipart/form-data api_response = api_instance.upload_file( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_upload_files/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_upload_files/post.md index 0a0e488cc3d..709d57df9a5 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_upload_files/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_upload_files/post.md @@ -126,11 +126,11 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = dict( - files=[ + body = { + "files": [ open('/path/to/file', 'rb') ], - ) + } try: # uploads files using multipart/form-data api_response = api_instance.upload_files( diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet/post.md b/samples/openapi3/client/petstore/python/docs/paths/pet/post.md index 967f46df200..4b60b9a0d6a 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet/post.md @@ -155,22 +155,22 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = pet.Pet( - id=1, - category=category.Category( - id=1, - name="default-name", + "id": 1, + "category": category.Category( + "id": 1, + "name": "default-name", ), - name="doggie", - photo_urls=[ + "name": "doggie", + "photo_urls": [ "photo_urls_example" ], - tags=[ + "tags": [ tag.Tag( - id=1, - name="name_example", + "id": 1, + "name": "name_example", ) ], - status="available", + "status": "available", ) try: # Add a new pet to the store diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet/put.md b/samples/openapi3/client/petstore/python/docs/paths/pet/put.md index 58369611d13..da567c0021e 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet/put.md @@ -167,22 +167,22 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = pet.Pet( - id=1, - category=category.Category( - id=1, - name="default-name", + "id": 1, + "category": category.Category( + "id": 1, + "name": "default-name", ), - name="doggie", - photo_urls=[ + "name": "doggie", + "photo_urls": [ "photo_urls_example" ], - tags=[ + "tags": [ tag.Tag( - id=1, - name="name_example", + "id": 1, + "name": "name_example", ) ], - status="available", + "status": "available", ) try: # Update an existing pet diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id/post.md b/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id/post.md index c6bb0995727..88118cb9542 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id/post.md @@ -183,10 +183,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params = { 'petId': 1, } - body = dict( - name="name_example", - status="status_example", - ) + body = { + "name": "name_example", + "status": "status_example", + } try: # Updates a pet in the store with form data api_response = api_instance.update_pet_with_form( diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md b/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md index 667b6839626..01fd351794f 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md @@ -155,10 +155,10 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params = { 'petId': 1, } - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) + body = { + "additional_metadata": "additional_metadata_example", + "file": open('/path/to/file', 'rb'), + } try: # uploads an image api_response = api_instance.upload_image( diff --git a/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md b/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md index b218427247b..eafa92656e0 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md @@ -132,12 +132,12 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = order.Order( - id=1, - pet_id=1, - quantity=1, - ship_date="2020-02-02T20:20:20.000222Z", - status="placed", - complete=False, + "id": 1, + "pet_id": 1, + "quantity": 1, + "ship_date": "2020-02-02T20:20:20.000222Z", + "status": "placed", + "complete": False, ) try: # Place an order for a pet diff --git a/samples/openapi3/client/petstore/python/docs/paths/user/post.md b/samples/openapi3/client/petstore/python/docs/paths/user/post.md index e299aac0562..493ab288f25 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user/post.md @@ -99,19 +99,19 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = user.User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, + "id": 1, + "username": "username_example", + "first_name": "first_name_example", + "last_name": "last_name_example", + "email": "email_example", + "password": "password_example", + "phone": "phone_example", + "user_status": 1, + "object_with_no_declared_props": {}, + "object_with_no_declared_props_nullable": {}, + "any_type_prop": None, + "any_type_except_null_prop": None, + "any_type_prop_nullable": None, ) try: # Create user diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md index 25407e0c9e1..6f9d41aa256 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md @@ -82,19 +82,19 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = [ user.User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, + "id": 1, + "username": "username_example", + "first_name": "first_name_example", + "last_name": "last_name_example", + "email": "email_example", + "password": "password_example", + "phone": "phone_example", + "user_status": 1, + "object_with_no_declared_props": {}, + "object_with_no_declared_props_nullable": {}, + "any_type_prop": None, + "any_type_except_null_prop": None, + "any_type_prop_nullable": None, ) ] try: diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md index f063c640125..eccb4b8f24f 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md @@ -82,19 +82,19 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = [ user.User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, + "id": 1, + "username": "username_example", + "first_name": "first_name_example", + "last_name": "last_name_example", + "email": "email_example", + "password": "password_example", + "phone": "phone_example", + "user_status": 1, + "object_with_no_declared_props": {}, + "object_with_no_declared_props_nullable": {}, + "any_type_prop": None, + "any_type_except_null_prop": None, + "any_type_prop_nullable": None, ) ] try: diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md b/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md index 9a6642cc671..015549e5726 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md @@ -126,19 +126,19 @@ with petstore_api.ApiClient(used_configuration) as api_client: 'username': "username_example", } body = user.User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, + "id": 1, + "username": "username_example", + "first_name": "first_name_example", + "last_name": "last_name_example", + "email": "email_example", + "password": "password_example", + "phone": "phone_example", + "user_status": 1, + "object_with_no_declared_props": {}, + "object_with_no_declared_props_nullable": {}, + "any_type_prop": None, + "any_type_except_null_prop": None, + "any_type_prop_nullable": None, ) try: # Updated user diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 1c2b4bf7a20..0065ae8d03a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -10,18 +10,18 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -_Return: typing_extensions.TypeAlias = schemas.Int32Schema[U] +Return2: typing_extensions.TypeAlias = schemas.Int32Schema[U] Properties = typing_extensions.TypedDict( 'Properties', { - "return": typing.Type[_Return], + "return": typing.Type[Return2], } ) DictInput = typing.Mapping[ str, typing.Union[ typing.Union[ - _Return[decimal.Decimal], + Return2[decimal.Decimal], decimal.Decimal, int ], @@ -49,7 +49,7 @@ class Schema_(metaclass=schemas.SingletonMeta): @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return"]) -> _Return[decimal.Decimal]: ... + def __getitem__(self, name: typing_extensions.Literal["return"]) -> Return2[decimal.Decimal]: ... @typing.overload def __getitem__(self, name: str) -> schemas.AnyTypeSchema[typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 6a1001e615c..7072e8a1739 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -10,18 +10,18 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -Client: typing_extensions.TypeAlias = schemas.StrSchema[U] +Client2: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', { - "client": typing.Type[Client], + "client": typing.Type[Client2], } ) DictInput = typing.Mapping[ str, typing.Union[ typing.Union[ - Client[str], + Client2[str], str ], schemas.INPUT_TYPES_ALL_INCL_SCHEMA @@ -45,7 +45,7 @@ class Schema_(metaclass=schemas.SingletonMeta): properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore @typing.overload - def __getitem__(self, name: typing_extensions.Literal["client"]) -> Client[str]: ... + def __getitem__(self, name: typing_extensions.Literal["client"]) -> Client2[str]: ... @typing.overload def __getitem__(self, name: str) -> schemas.AnyTypeSchema[typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index 68fe2a9bbce..e5447f1ac81 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -11,7 +11,7 @@ from petstore_api.shared_imports.schema_imports import * DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] -Items: typing_extensions.TypeAlias = schemas.DictSchema[U] +Items2: typing_extensions.TypeAlias = schemas.DictSchema[U] class Items( @@ -29,13 +29,13 @@ class Items( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore def __new__( cls, arg_: typing.Sequence[ typing.Union[ - Items[frozendict.frozendict], + Items2[frozendict.frozendict], dict, frozendict.frozendict ] @@ -53,6 +53,6 @@ def __new__( ) return inst - def __getitem__(self, name: int) -> Items[frozendict.frozendict]: + def __getitem__(self, name: int) -> Items2[frozendict.frozendict]: return super().__getitem__(name) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index 454a6e68e80..d7a38b8a5ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -10,13 +10,13 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * -Name: typing_extensions.TypeAlias = schemas.Int32Schema[U] +Name2: typing_extensions.TypeAlias = schemas.Int32Schema[U] SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema[U] _Property: typing_extensions.TypeAlias = schemas.StrSchema[U] Properties = typing_extensions.TypedDict( 'Properties', { - "name": typing.Type[Name], + "name": typing.Type[Name2], "snake_case": typing.Type[SnakeCase], "property": typing.Type[_Property], } @@ -25,7 +25,7 @@ str, typing.Union[ typing.Union[ - Name[decimal.Decimal], + Name2[decimal.Decimal], decimal.Decimal, int ], @@ -65,11 +65,11 @@ class Schema_(metaclass=schemas.SingletonMeta): @property - def name(self) -> Name[decimal.Decimal]: + def name(self) -> Name2[decimal.Decimal]: return self.__getitem__("name") @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> Name[decimal.Decimal]: ... + def __getitem__(self, name: typing_extensions.Literal["name"]) -> Name2[decimal.Decimal]: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["snake_case"]) -> SnakeCase[decimal.Decimal]: ... diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index dc4af657dbc..5e8099b5aaf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -13,12 +13,12 @@ DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] SomeProp: typing_extensions.TypeAlias = schemas.DictSchema[U] DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] -Someprop: typing_extensions.TypeAlias = schemas.DictSchema[U] +Someprop2: typing_extensions.TypeAlias = schemas.DictSchema[U] Properties = typing_extensions.TypedDict( 'Properties', { "someProp": typing.Type[SomeProp], - "someprop": typing.Type[Someprop], + "someprop": typing.Type[Someprop2], } ) DictInput3 = typing.Mapping[ @@ -30,7 +30,7 @@ frozendict.frozendict ], typing.Union[ - Someprop[frozendict.frozendict], + Someprop2[frozendict.frozendict], dict, frozendict.frozendict ], @@ -60,7 +60,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> SomeProp[frozendict.frozendict]: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someprop"]) -> Someprop[frozendict.frozendict]: ... + def __getitem__(self, name: typing_extensions.Literal["someprop"]) -> Someprop2[frozendict.frozendict]: ... @typing.overload def __getitem__(self, name: str) -> schemas.AnyTypeSchema[typing.Union[ From 68474731306742c60b3e7770773740876273d04e Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 11:59:17 -0700 Subject: [PATCH 27/36] Adds braces aroudn object input --- .../codegen/languages/PythonClientCodegen.java | 2 +- .../python/docs/paths/another_fake_dummy/patch.md | 4 ++-- .../client/petstore/python/docs/paths/fake/patch.md | 4 ++-- .../get.md | 4 ++-- .../docs/paths/fake_body_with_file_schema/put.md | 10 +++++----- .../docs/paths/fake_body_with_query_params/put.md | 4 ++-- .../python/docs/paths/fake_classname_test/patch.md | 4 ++-- .../python/docs/paths/fake_ref_obj_in_query/get.md | 4 ++-- .../python/docs/paths/fake_refs_arraymodel/post.md | 2 +- .../fake_refs_object_model_with_ref_props/post.md | 4 ++-- .../client/petstore/python/docs/paths/pet/post.md | 12 ++++++------ .../client/petstore/python/docs/paths/pet/put.md | 12 ++++++------ .../petstore/python/docs/paths/store_order/post.md | 4 ++-- .../client/petstore/python/docs/paths/user/post.md | 4 ++-- .../python/docs/paths/user_create_with_array/post.md | 4 ++-- .../python/docs/paths/user_create_with_list/post.md | 4 ++-- .../petstore/python/docs/paths/user_username/put.md | 4 ++-- 17 files changed, 43 insertions(+), 43 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java index f56b92b3b4d..05fb20caf32 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java @@ -1285,7 +1285,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o if (modelName != null) { openChars = modelName + "("; closeChars = ")"; - if (schema.getTypes() != null && schema.getTypes().size() == 1 && schema.getTypes().contains("object")) { + if (ModelUtils.isTypeObjectSchema(schema)) { openChars = openChars + "{"; closeChars = "}" + closeChars; } diff --git a/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md b/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md index 6220c2e80c5..d1e85e74574 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/another_fake_dummy/patch.md @@ -95,9 +95,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = another_fake_api.AnotherFakeApi(api_client) # example passing only required values which don't have defaults set - body = client.Client( + body = client.Client({ "client": "client_example", - ) + }) try: # To test special tags api_response = api_instance.call_123_test__special_tags( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md b/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md index 8888a88120c..e2b7976771d 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake/patch.md @@ -95,9 +95,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only required values which don't have defaults set - body = client.Client( + body = client.Client({ "client": "client_example", - ) + }) try: # To test \"client\" model api_response = api_instance.client_model( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md index 157724a430a..219ef1864c7 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md @@ -111,11 +111,11 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums( + body = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums({ key=[ enum_class.EnumClass("-efg") ], - ) + }) try: # Additional Properties with Array of Enums api_response = api_instance.additional_properties_with_array_of_enums( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md index 06a50db2a86..8d42cb4fa1d 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md @@ -82,14 +82,14 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only required values which don't have defaults set - body = file_schema_test_class.FileSchemaTestClass( - "file": file.File( + body = file_schema_test_class.FileSchemaTestClass({ + "file": file.File({ "source_uri": "source_uri_example", - ), + }), "files": [ - file.File() + file.File({}) ], - ) + }) try: api_response = api_instance.body_with_file_schema( body=body, diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md index aa071fe977f..9581f17dc3e 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_body_with_query_params/put.md @@ -104,7 +104,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params: operation.RequestQueryParameters.Params = { 'query': "query_example", } - body = user.User( + body = user.User({ "id": 1, "username": "username_example", "first_name": "first_name_example", @@ -118,7 +118,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "any_type_prop": None, "any_type_except_null_prop": None, "any_type_prop_nullable": None, - ) + }) try: api_response = api_instance.body_with_query_params( query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md b/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md index a7896053209..5eb7bb80023 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_classname_test/patch.md @@ -122,9 +122,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_classname_tags123_api.FakeClassnameTags123Api(api_client) # example passing only required values which don't have defaults set - body = client.Client( + body = client.Client({ "client": "client_example", - ) + }) try: # To test class name in snake case api_response = api_instance.classname( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md index 8b6f009765b..170e941e55f 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md @@ -90,9 +90,9 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values query_params: operation.RequestQueryParameters.Params = { - 'mapBean': foo.Foo( + 'mapBean': foo.Foo({ "bar": bar.Bar("bar"), - ), + }), } try: # user list diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md index f4b266c3338..8118eb3c394 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md @@ -112,7 +112,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values body = animal_farm.AnimalFarm([ - animal.Animal() + animal.Animal({}) ]) try: api_response = api_instance.array_model( diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md index 93704a3c1d4..83185da47ac 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md @@ -111,11 +111,11 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = fake_api.FakeApi(api_client) # example passing only optional values - body = object_model_with_ref_props.ObjectModelWithRefProps( + body = object_model_with_ref_props.ObjectModelWithRefProps({ "my_number": number_with_validations.NumberWithValidations(10), "my_string": string.String("my_string_example"), "my_boolean": boolean.Boolean(True), - ) + }) try: api_response = api_instance.object_model_with_ref_props( body=body, diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet/post.md b/samples/openapi3/client/petstore/python/docs/paths/pet/post.md index 4b60b9a0d6a..ab5c06f95e2 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet/post.md @@ -154,24 +154,24 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = pet_api.PetApi(api_client) # example passing only required values which don't have defaults set - body = pet.Pet( + body = pet.Pet({ "id": 1, - "category": category.Category( + "category": category.Category({ "id": 1, "name": "default-name", - ), + }), "name": "doggie", "photo_urls": [ "photo_urls_example" ], "tags": [ - tag.Tag( + tag.Tag({ "id": 1, "name": "name_example", - ) + }) ], "status": "available", - ) + }) try: # Add a new pet to the store api_response = api_instance.add_pet( diff --git a/samples/openapi3/client/petstore/python/docs/paths/pet/put.md b/samples/openapi3/client/petstore/python/docs/paths/pet/put.md index da567c0021e..65746085844 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/pet/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/pet/put.md @@ -166,24 +166,24 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = pet_api.PetApi(api_client) # example passing only required values which don't have defaults set - body = pet.Pet( + body = pet.Pet({ "id": 1, - "category": category.Category( + "category": category.Category({ "id": 1, "name": "default-name", - ), + }), "name": "doggie", "photo_urls": [ "photo_urls_example" ], "tags": [ - tag.Tag( + tag.Tag({ "id": 1, "name": "name_example", - ) + }) ], "status": "available", - ) + }) try: # Update an existing pet api_response = api_instance.update_pet( diff --git a/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md b/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md index eafa92656e0..6ab573cb395 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/store_order/post.md @@ -131,14 +131,14 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = store_api.StoreApi(api_client) # example passing only required values which don't have defaults set - body = order.Order( + body = order.Order({ "id": 1, "pet_id": 1, "quantity": 1, "ship_date": "2020-02-02T20:20:20.000222Z", "status": "placed", "complete": False, - ) + }) try: # Place an order for a pet api_response = api_instance.place_order( diff --git a/samples/openapi3/client/petstore/python/docs/paths/user/post.md b/samples/openapi3/client/petstore/python/docs/paths/user/post.md index 493ab288f25..80cad9f4180 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user/post.md @@ -98,7 +98,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: api_instance = user_api.UserApi(api_client) # example passing only required values which don't have defaults set - body = user.User( + body = user.User({ "id": 1, "username": "username_example", "first_name": "first_name_example", @@ -112,7 +112,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "any_type_prop": None, "any_type_except_null_prop": None, "any_type_prop_nullable": None, - ) + }) try: # Create user api_response = api_instance.create_user( diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md index 6f9d41aa256..cfa62e3a710 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_array/post.md @@ -81,7 +81,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = [ - user.User( + user.User({ "id": 1, "username": "username_example", "first_name": "first_name_example", @@ -95,7 +95,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "any_type_prop": None, "any_type_except_null_prop": None, "any_type_prop_nullable": None, - ) + }) ] try: # Creates list of users with given input array diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md index eccb4b8f24f..872a553fca8 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_create_with_list/post.md @@ -81,7 +81,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only required values which don't have defaults set body = [ - user.User( + user.User({ "id": 1, "username": "username_example", "first_name": "first_name_example", @@ -95,7 +95,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "any_type_prop": None, "any_type_except_null_prop": None, "any_type_prop_nullable": None, - ) + }) ] try: # Creates list of users with given input array diff --git a/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md b/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md index 015549e5726..d2dfb8626d0 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md +++ b/samples/openapi3/client/petstore/python/docs/paths/user_username/put.md @@ -125,7 +125,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params: operation.RequestPathParameters.Params = { 'username': "username_example", } - body = user.User( + body = user.User({ "id": 1, "username": "username_example", "first_name": "first_name_example", @@ -139,7 +139,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "any_type_prop": None, "any_type_except_null_prop": None, "any_type_prop_nullable": None, - ) + }) try: # Updated user api_response = api_instance.update_user( From 0a8e8b5a3621ed687bbaf44f7fbac708b9ea9517 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 12:03:32 -0700 Subject: [PATCH 28/36] Fixes example addProp key --- .../codegen/languages/PythonClientCodegen.java | 5 +---- .../fake_additional_properties_with_array_of_enums/get.md | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java index 05fb20caf32..8735768a0c9 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java @@ -1548,10 +1548,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o key = addPropsSchema.getEnum().get(0).toString(); } addPropsExample = exampleFromStringOrArraySchema(addPropsSchema, addPropsExample, key); - String addPropPrefix = key + "="; - if (modelName == null) { - addPropPrefix = ensureQuotes(key) + ": "; - } + String addPropPrefix = ensureQuotes(key) + ": "; String addPropsModelName = getRefClassWithRefModule(addPropsSchema); if(includedSchemas.contains(schema)) { return ""; diff --git a/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md b/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md index 219ef1864c7..2d82dc3325e 100644 --- a/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md +++ b/samples/openapi3/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md @@ -112,7 +112,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # example passing only optional values body = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums({ - key=[ + "key": [ enum_class.EnumClass("-efg") ], }) From d0e826a5582ff93e0fceda0e7fda7220bd33b110 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 12:31:50 -0700 Subject: [PATCH 29/36] arg_ -> arg --- .../python/components/schemas/_helper_new.hbs | 22 ++-- .../src/main/resources/python/schemas.hbs | 122 +++++++++--------- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../content/application_xml/schema.py | 4 +- .../components/schema/_200_response.py | 4 +- .../petstore_api/components/schema/_return.py | 4 +- .../schema/abstract_step_message.py | 4 +- .../schema/additional_properties_class.py | 28 ++-- .../schema/additional_properties_validator.py | 24 ++-- ...ditional_properties_with_array_of_enums.py | 8 +- .../petstore_api/components/schema/address.py | 4 +- .../petstore_api/components/schema/animal.py | 4 +- .../components/schema/animal_farm.py | 4 +- .../components/schema/any_type_and_format.py | 40 +++--- .../components/schema/any_type_not_string.py | 4 +- .../components/schema/api_response.py | 4 +- .../petstore_api/components/schema/apple.py | 4 +- .../components/schema/apple_req.py | 4 +- .../schema/array_holding_any_type.py | 4 +- .../schema/array_of_array_of_number_only.py | 12 +- .../components/schema/array_of_enums.py | 4 +- .../components/schema/array_of_number_only.py | 8 +- .../components/schema/array_test.py | 24 ++-- .../schema/array_with_validations_in_items.py | 4 +- .../petstore_api/components/schema/banana.py | 4 +- .../components/schema/banana_req.py | 4 +- .../components/schema/basque_pig.py | 4 +- .../components/schema/capitalization.py | 4 +- .../src/petstore_api/components/schema/cat.py | 8 +- .../components/schema/category.py | 4 +- .../components/schema/child_cat.py | 8 +- .../components/schema/class_model.py | 4 +- .../petstore_api/components/schema/client.py | 4 +- .../schema/complex_quadrilateral.py | 8 +- ...d_any_of_different_types_no_validations.py | 8 +- .../components/schema/composed_array.py | 4 +- .../components/schema/composed_bool.py | 4 +- .../components/schema/composed_none.py | 4 +- .../components/schema/composed_number.py | 4 +- .../components/schema/composed_object.py | 4 +- .../schema/composed_one_of_different_types.py | 12 +- .../components/schema/composed_string.py | 4 +- .../components/schema/danish_pig.py | 4 +- .../src/petstore_api/components/schema/dog.py | 8 +- .../petstore_api/components/schema/drawing.py | 8 +- .../components/schema/enum_arrays.py | 8 +- .../components/schema/enum_test.py | 4 +- .../components/schema/equilateral_triangle.py | 8 +- .../petstore_api/components/schema/file.py | 4 +- .../schema/file_schema_test_class.py | 8 +- .../src/petstore_api/components/schema/foo.py | 4 +- .../components/schema/format_test.py | 8 +- .../components/schema/from_schema.py | 4 +- .../petstore_api/components/schema/fruit.py | 4 +- .../components/schema/fruit_req.py | 4 +- .../components/schema/gm_fruit.py | 4 +- .../components/schema/grandparent_animal.py | 4 +- .../components/schema/has_only_read_only.py | 4 +- .../components/schema/health_check_result.py | 8 +- .../components/schema/isosceles_triangle.py | 8 +- .../petstore_api/components/schema/items.py | 4 +- .../components/schema/json_patch_request.py | 8 +- .../json_patch_request_add_replace_test.py | 4 +- .../schema/json_patch_request_move_copy.py | 4 +- .../schema/json_patch_request_remove.py | 4 +- .../petstore_api/components/schema/mammal.py | 4 +- .../components/schema/map_test.py | 20 +-- ...perties_and_additional_properties_class.py | 8 +- .../petstore_api/components/schema/money.py | 4 +- .../petstore_api/components/schema/name.py | 4 +- .../schema/no_additional_properties.py | 4 +- .../components/schema/nullable_class.py | 72 +++++------ .../components/schema/nullable_shape.py | 4 +- .../components/schema/nullable_string.py | 4 +- .../components/schema/number_only.py | 4 +- .../schema/obj_with_required_props.py | 4 +- .../schema/obj_with_required_props_base.py | 4 +- ...ject_model_with_arg_and_args_properties.py | 4 +- .../schema/object_model_with_ref_props.py | 4 +- ..._with_req_test_prop_from_unset_add_prop.py | 8 +- .../object_with_colliding_properties.py | 4 +- .../schema/object_with_decimal_properties.py | 4 +- .../object_with_difficultly_named_props.py | 4 +- ...object_with_inline_composition_property.py | 8 +- ...ect_with_invalid_named_refed_properties.py | 4 +- .../schema/object_with_optional_test_prop.py | 4 +- .../schema/object_with_validations.py | 4 +- .../petstore_api/components/schema/order.py | 4 +- .../components/schema/parent_pet.py | 4 +- .../src/petstore_api/components/schema/pet.py | 12 +- .../src/petstore_api/components/schema/pig.py | 4 +- .../petstore_api/components/schema/player.py | 4 +- .../components/schema/quadrilateral.py | 4 +- .../schema/quadrilateral_interface.py | 4 +- .../components/schema/read_only_first.py | 4 +- .../req_props_from_explicit_add_props.py | 4 +- .../schema/req_props_from_true_add_props.py | 4 +- .../schema/req_props_from_unset_add_props.py | 4 +- .../components/schema/scalene_triangle.py | 8 +- .../schema/self_referencing_array_model.py | 4 +- .../schema/self_referencing_object_model.py | 4 +- .../petstore_api/components/schema/shape.py | 4 +- .../components/schema/shape_or_null.py | 4 +- .../components/schema/simple_quadrilateral.py | 8 +- .../components/schema/some_object.py | 4 +- .../components/schema/special_model_name.py | 4 +- .../components/schema/string_boolean_map.py | 4 +- .../components/schema/string_enum.py | 4 +- .../src/petstore_api/components/schema/tag.py | 4 +- .../components/schema/triangle.py | 4 +- .../components/schema/triangle_interface.py | 4 +- .../petstore_api/components/schema/user.py | 12 +- .../petstore_api/components/schema/whale.py | 4 +- .../petstore_api/components/schema/zebra.py | 4 +- .../fake/get/parameters/parameter_0/schema.py | 4 +- .../fake/get/parameters/parameter_2/schema.py | 4 +- .../schema.py | 8 +- .../schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../post/parameters/parameter_0/schema.py | 4 +- .../post/parameters/parameter_1/schema.py | 8 +- .../content/application_json/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +- .../content/application_json/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +- .../schema.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../put/parameters/parameter_0/schema.py | 4 +- .../put/parameters/parameter_1/schema.py | 4 +- .../put/parameters/parameter_2/schema.py | 4 +- .../put/parameters/parameter_3/schema.py | 4 +- .../put/parameters/parameter_4/schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +- .../content/application_json/schema.py | 4 +- .../paths/foo/get/servers/server_1.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../pet_find_by_status/servers/server_1.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../python/src/petstore_api/schemas.py | 122 +++++++++--------- .../src/petstore_api/servers/server_0.py | 4 +- .../src/petstore_api/servers/server_1.py | 4 +- 147 files changed, 579 insertions(+), 579 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 3f69805d815..7c5edfa9a68 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -3,7 +3,7 @@ def __new__( {{#if types}} {{#eq types.size 1}} {{#contains types "array"}} - arg_: typing.Sequence[ + arg: typing.Sequence[ {{#with ../items}} {{#if refInfo.refClass}} typing.Union[ @@ -18,28 +18,28 @@ def __new__( ], {{/contains}} {{#contains types "object"}} - arg_: typing.Union[ + arg: typing.Union[ {{mapInputJsonPathPiece.camelCase}}, {{jsonPathPiece.camelCase}}[frozendict.frozendict], ], {{/contains}} {{#contains types "string"}} - arg_: {{> _helper_schema_python_types }}, + arg: {{> _helper_schema_python_types }}, {{/contains}} {{#contains types "number"}} - arg_: typing.Union[{{> _helper_schema_python_types }}], + arg: typing.Union[{{> _helper_schema_python_types }}], {{/contains}} {{#contains types "integer"}} - arg_: {{> _helper_schema_python_types }}, + arg: {{> _helper_schema_python_types }}, {{/contains}} {{#contains types "boolean"}} - arg_: {{> _helper_schema_python_types }}, + arg: {{> _helper_schema_python_types }}, {{/contains}} {{#contains types "null"}} - arg_: {{> _helper_schema_python_types }}, + arg: {{> _helper_schema_python_types }}, {{/contains}} {{else}} - arg_: typing.Union[ + arg: typing.Union[ {{#each types}} {{#eq this "object"}} {{mapInputJsonPathPiece.camelCase}}, @@ -52,12 +52,12 @@ def __new__( {{/eq}} {{else}} {{#if mapInputJsonPathPiece}} - arg_: typing.Union[ + arg: typing.Union[ {{mapInputJsonPathPiece.camelCase}}, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], {{else}} - arg_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, + arg: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, {{/if}} {{/if}} configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None @@ -80,7 +80,7 @@ def __new__( {{/if}} inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index 1078b92d892..e675bd52f6f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -41,18 +41,18 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg_, (io.FileIO, io.BufferedReader)): - if arg_.closed: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg_.close() + arg.close() super_cls: typing.Type = super(FileIO, cls) - inst = super_cls.__new__(cls, arg_.name) - super(FileIO, inst).__init__(arg_.name) + inst = super_cls.__new__(cls, arg.name) + super(FileIO, inst).__init__(arg.name) return inst - raise exceptions.ApiValueError('FileIO must be passed arg_ which contains the open file') + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - def __init__(self, arg_: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): """ if this does not exist, then classes with FileIO as a mixin (AnyType etc) will see the io.FileIO __init__ signature rather than the __new__ one @@ -124,11 +124,11 @@ class SingletonMeta(type): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg_) + The same instance is returned for a given key of (cls, arg) """ _instances = {} - def __new__(cls, arg_: typing.Any, **kwargs): + def __new__(cls, arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -136,16 +136,16 @@ class Singleton: Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg_, str(arg_)) + key = (cls, arg, str(arg)) if key not in cls._instances: - if isinstance(arg_, (none_type_, bool, BoolClass, NoneClass)): + if isinstance(arg, (none_type_, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: super_inst: typing.Type = super() - cls._instances[key] = super_inst.__new__(cls, arg_) + cls._instances[key] = super_inst.__new__(cls, arg) return cls._instances[key] def __repr__(self): @@ -1544,7 +1544,7 @@ class Schema(typing.Generic[T]): def __new__( cls, - *args_: typing.Union[ + *arg: typing.Union[ {{> _helper_types_all_incl_schema }} ], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, @@ -1557,7 +1557,7 @@ class Schema(typing.Generic[T]): Schema __new__ Args: - args_ (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc @@ -1566,14 +1566,14 @@ class Schema(typing.Generic[T]): are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args_ and not __kwargs: + if not arg and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args_ and not isinstance(args_[0], dict): - __arg = args_[0] + if not __kwargs and arg and not isinstance(arg[0], dict): + __arg = arg[0] else: - __arg = cls.__get_input_dict(*args_, **__kwargs) + __arg = cls.__get_input_dict(*arg, **__kwargs) __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -2222,8 +2222,8 @@ class ListSchema( def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + return super().__new__(cls, arg, **kwargs) class NoneSchema( @@ -2239,8 +2239,8 @@ class NoneSchema( def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, **kwargs) class NumberSchema( @@ -2260,8 +2260,8 @@ class NumberSchema( def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, **kwargs) class IntBase: @@ -2286,8 +2286,8 @@ class IntSchema(IntBase, NumberSchema[T]): def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2299,8 +2299,8 @@ class Int32Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2312,8 +2312,8 @@ class Int64Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2329,8 +2329,8 @@ class Float32Schema( def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2346,8 +2346,8 @@ class Float64Schema( def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2370,8 +2370,8 @@ class StrSchema( def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: + return super().__new__(cls, arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2380,8 +2380,8 @@ class UUIDSchema(UUIDBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg_: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(UUIDSchema[str], inst) @@ -2391,8 +2391,8 @@ class DateSchema(DateBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg_: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DateSchema[str], inst) @@ -2402,8 +2402,8 @@ class DateTimeSchema(DateTimeBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg_: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DateTimeSchema[str], inst) @@ -2413,7 +2413,7 @@ class DecimalSchema(DecimalBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__(cls, arg: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2422,7 +2422,7 @@ class DecimalSchema(DecimalBase, StrSchema[T]): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg_, **kwargs) + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DecimalSchema[str], inst) @@ -2437,9 +2437,9 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg_: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__(cls, arg: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class FileSchema( @@ -2466,9 +2466,9 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class BinarySchema( @@ -2485,8 +2485,8 @@ class BinarySchema( FileSchema, ) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: - return super().__new__(cls, arg_) + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: + return super().__new__(cls, arg) class BoolSchema( @@ -2502,8 +2502,8 @@ class BoolSchema( def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: + return super().__new__(cls, arg, **kwargs) class AnyTypeSchema( @@ -2523,7 +2523,7 @@ class AnyTypeSchema( def __new__( cls, - *args_: typing.Union[ + *arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2569,11 +2569,11 @@ class AnyTypeSchema( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *args_, configuration_=configuration_, **kwargs) + return super().__new__(cls, *arg, configuration_=configuration_, **kwargs) def __init__( self, - *args_: typing.Union[ + *arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2635,10 +2635,10 @@ class NotAnyTypeSchema(AnyTypeSchema[T]): def __new__( cls, - *args_, + *arg, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *args_, configuration_=configuration_) + inst = super().__new__(cls, *arg, configuration_=configuration_) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2657,11 +2657,11 @@ class DictSchema( def __new__( cls, - *args_: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *args_, **kwargs, configuration_=configuration_) + return super().__new__(cls, *arg, **kwargs, configuration_=configuration_) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index 0b305f816fb..85582b6b447 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ user.User[frozendict.frozendict], dict, @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index b44c379e9a4..cafa6e05b71 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -37,7 +37,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -45,7 +45,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index 0810c0c68e0..04770ac5ea0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ ref_pet.RefPet[frozendict.frozendict], dict, @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index d8b4895eba5..fd3b7967a32 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ pet.Pet[frozendict.frozendict], dict, @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 08ced51b5fd..4b9bc8cb910 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -85,7 +85,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -104,7 +104,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 0065ae8d03a..fcd6d47dfdd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -75,7 +75,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -94,7 +94,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index f6c99f98c1a..f99828d5eb2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -201,7 +201,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, AbstractStepMessage[frozendict.frozendict], ], @@ -209,7 +209,7 @@ def __new__( ) -> AbstractStepMessage[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index e9b6c9238b1..32c123aae65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -36,7 +36,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, MapProperty[frozendict.frozendict], ], @@ -44,7 +44,7 @@ def __new__( ) -> MapProperty[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -79,7 +79,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, AdditionalProperties2[frozendict.frozendict], ], @@ -87,7 +87,7 @@ def __new__( ) -> AdditionalProperties2[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -122,7 +122,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[frozendict.frozendict] def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, MapOfMapProperty[frozendict.frozendict], ], @@ -130,7 +130,7 @@ def __new__( ) -> MapOfMapProperty[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -198,7 +198,7 @@ def __getitem__(self, name: str) -> AdditionalProperties4[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput8, MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], ], @@ -206,7 +206,7 @@ def __new__( ) -> MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -231,7 +231,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput11, EmptyMap[frozendict.frozendict], ], @@ -239,7 +239,7 @@ def __new__( ) -> EmptyMap[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -274,7 +274,7 @@ def __getitem__(self, name: str) -> AdditionalProperties6[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput12, MapWithUndeclaredPropertiesString[frozendict.frozendict], ], @@ -282,7 +282,7 @@ def __new__( ) -> MapWithUndeclaredPropertiesString[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -447,7 +447,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput13, AdditionalPropertiesClass[frozendict.frozendict], ], @@ -455,7 +455,7 @@ def __new__( ) -> AdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index d5a21e50b45..82e852a4ad8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -63,7 +63,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, _0[frozendict.frozendict], ], @@ -71,7 +71,7 @@ def __new__( ) -> _0[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -96,7 +96,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -115,7 +115,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -186,7 +186,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, _1[frozendict.frozendict], ], @@ -194,7 +194,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -219,7 +219,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput5, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -238,7 +238,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -309,7 +309,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput6, _2[frozendict.frozendict], ], @@ -317,7 +317,7 @@ def __new__( ) -> _2[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -354,7 +354,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput7, AdditionalPropertiesValidator[frozendict.frozendict], ], @@ -362,7 +362,7 @@ def __new__( ) -> AdditionalPropertiesValidator[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 079d2fa3ac1..4c88d670c1d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ enum_class.EnumClass[str], str @@ -34,7 +34,7 @@ def __new__( ) -> AdditionalProperties[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -77,7 +77,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[tuple]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict], ], @@ -85,7 +85,7 @@ def __new__( ) -> AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index 08b01ee9133..c07e1c24489 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -42,7 +42,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[decimal.Decimal]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Address[frozendict.frozendict], ], @@ -50,7 +50,7 @@ def __new__( ) -> Address[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index 9a8fd9bdd64..b6aa0d34752 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -108,7 +108,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Animal[frozendict.frozendict], ], @@ -116,7 +116,7 @@ def __new__( ) -> Animal[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index 281437ad0c8..ceb2892e066 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -29,7 +29,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ animal.Animal[frozendict.frozendict], dict, @@ -40,7 +40,7 @@ def __new__( ) -> AnimalFarm[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index f93861cbcdf..19d5dee144a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -27,7 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -46,7 +46,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -83,7 +83,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -102,7 +102,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -139,7 +139,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -158,7 +158,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -195,7 +195,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -214,7 +214,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -250,7 +250,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput5, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -269,7 +269,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -305,7 +305,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput6, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -324,7 +324,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -360,7 +360,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput7, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -379,7 +379,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -415,7 +415,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput8, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -434,7 +434,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -470,7 +470,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput9, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -489,7 +489,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -875,7 +875,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput10, AnyTypeAndFormat[frozendict.frozendict], ], @@ -883,7 +883,7 @@ def __new__( ) -> AnyTypeAndFormat[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index aaa32d00019..49b7db278e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -32,7 +32,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -51,7 +51,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 9318be148c3..8a87a30edb1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -92,7 +92,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ApiResponse[frozendict.frozendict], ], @@ -100,7 +100,7 @@ def __new__( ) -> ApiResponse[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 8a18db9007e..3285cc57b85 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -124,7 +124,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput, Apple[frozendict.frozendict], @@ -138,7 +138,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index d94a01a8bc9..6688a1dbda6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, AppleReq[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> AppleReq[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index 0d00d87c344..76b39eee45c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -31,7 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -58,7 +58,7 @@ def __new__( ) -> ArrayHoldingAnyType[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index a9e889565e5..368402784dc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items2[decimal.Decimal], decimal.Decimal, @@ -37,7 +37,7 @@ def __new__( ) -> Items[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -63,7 +63,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[tuple], list, @@ -74,7 +74,7 @@ def __new__( ) -> ArrayArrayNumber[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -147,7 +147,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ArrayOfArrayOfNumberOnly[frozendict.frozendict], ], @@ -155,7 +155,7 @@ def __new__( ) -> ArrayOfArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 07da4cccb04..63a86458494 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -29,7 +29,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ string_enum.StringEnum[typing.Union[ schemas.NoneClass, @@ -43,7 +43,7 @@ def __new__( ) -> ArrayOfEnums[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index b13376dea02..b73e778d691 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[decimal.Decimal], decimal.Decimal, @@ -37,7 +37,7 @@ def __new__( ) -> ArrayNumber[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -110,7 +110,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ArrayOfNumberOnly[frozendict.frozendict], ], @@ -118,7 +118,7 @@ def __new__( ) -> ArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 183eafb4a43..21eb36d13cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> ArrayOfString[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -62,7 +62,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items3[decimal.Decimal], decimal.Decimal, @@ -73,7 +73,7 @@ def __new__( ) -> Items2[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -99,7 +99,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items2[tuple], list, @@ -110,7 +110,7 @@ def __new__( ) -> ArrayArrayOfInteger[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -136,7 +136,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ read_only_first.ReadOnlyFirst[frozendict.frozendict], dict, @@ -147,7 +147,7 @@ def __new__( ) -> Items4[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -173,7 +173,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items4[tuple], list, @@ -184,7 +184,7 @@ def __new__( ) -> ArrayArrayOfModel[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -277,7 +277,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ArrayTest[frozendict.frozendict], ], @@ -285,7 +285,7 @@ def __new__( ) -> ArrayTest[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index 00cc8d64ab8..3f826be2fff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -44,7 +44,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[decimal.Decimal], decimal.Decimal, @@ -55,7 +55,7 @@ def __new__( ) -> ArrayWithValidationsInItems[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index b5b543ab5d5..7333e790b63 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -80,7 +80,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Banana[frozendict.frozendict], ], @@ -88,7 +88,7 @@ def __new__( ) -> Banana[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index 427b16ef5fb..faf14ae8586 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -88,7 +88,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, BananaReq[frozendict.frozendict], ], @@ -96,7 +96,7 @@ def __new__( ) -> BananaReq[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index b9f9f81f62d..505a73164bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -98,7 +98,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, BasquePig[frozendict.frozendict], ], @@ -106,7 +106,7 @@ def __new__( ) -> BasquePig[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index b45c61fa6b7..0e3f85376e0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -121,7 +121,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Capitalization[frozendict.frozendict], ], @@ -129,7 +129,7 @@ def __new__( ) -> Capitalization[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index a134a62d07a..eb7c3fbd5fc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -66,7 +66,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -74,7 +74,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -104,7 +104,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -123,7 +123,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index a95c8b73643..777205e623b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -101,7 +101,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Category[frozendict.frozendict], ], @@ -109,7 +109,7 @@ def __new__( ) -> Category[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index edcee354c88..9b7086eaa6b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -66,7 +66,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -74,7 +74,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -104,7 +104,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -123,7 +123,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index c51297a7d91..a674e20f68d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -74,7 +74,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -93,7 +93,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 7072e8a1739..c4eb6b3ad82 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -71,7 +71,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Client[frozendict.frozendict], ], @@ -79,7 +79,7 @@ def __new__( ) -> Client[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index c3a9bcfaadc..ed29ecde530 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -124,7 +124,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 0b6f5d89096..1c8a12c18b1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -37,7 +37,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -64,7 +64,7 @@ def __new__( ) -> _9[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -130,7 +130,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -149,7 +149,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 4d1d3802130..c8581f32104 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -31,7 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -58,7 +58,7 @@ def __new__( ) -> ComposedArray[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index 3a7ded794e5..d08a479a88d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -37,12 +37,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: bool, + arg: bool, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedBool[schemas.BoolClass]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index 05697e3bf57..f53e8dd6d3c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -37,12 +37,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: None, + arg: None, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNone[schemas.NoneClass]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index dddbe81c82c..e8578689688 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -37,12 +37,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[decimal.Decimal, int, float], + arg: typing.Union[decimal.Decimal, int, float], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNumber[decimal.Decimal]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 051f0c6d594..3fdd3e471ad 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -38,7 +38,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, ComposedObject[frozendict.frozendict], ], @@ -46,7 +46,7 @@ def __new__( ) -> ComposedObject[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 7aa70a4ec1e..e4d900ef664 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -28,7 +28,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _4[frozendict.frozendict], ], @@ -36,7 +36,7 @@ def __new__( ) -> _4[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -63,7 +63,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -90,7 +90,7 @@ def __new__( ) -> _5[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -150,7 +150,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -169,7 +169,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index eea6534414d..25509e9222f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -37,12 +37,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: str, + arg: str, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedString[str]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index aac6f6d57ed..f31c63475fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -98,7 +98,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, DanishPig[frozendict.frozendict], ], @@ -106,7 +106,7 @@ def __new__( ) -> DanishPig[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index 82f0c8dde58..c64852940e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -66,7 +66,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -74,7 +74,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -104,7 +104,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -123,7 +123,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index 19340092347..b1764648f6a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ shape.Shape[ schemas.INPUT_BASE_TYPES @@ -51,7 +51,7 @@ def __new__( ) -> Shapes[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -156,7 +156,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Drawing[frozendict.frozendict], ], @@ -164,7 +164,7 @@ def __new__( ) -> Drawing[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index d1e8fe393d3..fae06f8133f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -76,7 +76,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -86,7 +86,7 @@ def __new__( ) -> ArrayEnum[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -168,7 +168,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, EnumArrays[frozendict.frozendict], ], @@ -176,7 +176,7 @@ def __new__( ) -> EnumArrays[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 14b9d4fb3fd..7dbdae86558 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -212,7 +212,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, EnumTest[frozendict.frozendict], ], @@ -220,7 +220,7 @@ def __new__( ) -> EnumTest[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 0633830b0c4..6e7a1f66f11 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -124,7 +124,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index b16ee5a7d9f..4094c1cea23 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -73,7 +73,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, File[frozendict.frozendict], ], @@ -81,7 +81,7 @@ def __new__( ) -> File[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index c3fa71ad120..ffff84aa788 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -24,7 +24,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ file.File[frozendict.frozendict], dict, @@ -35,7 +35,7 @@ def __new__( ) -> Files[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -95,7 +95,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, FileSchemaTestClass[frozendict.frozendict], ], @@ -103,7 +103,7 @@ def __new__( ) -> FileSchemaTestClass[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index d9ee214525c..e7de26aa1fe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -54,7 +54,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Foo[frozendict.frozendict], ], @@ -62,7 +62,7 @@ def __new__( ) -> Foo[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index c4099f70f4c..9d83a8509df 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -106,7 +106,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[decimal.Decimal], decimal.Decimal, @@ -118,7 +118,7 @@ def __new__( ) -> ArrayWithUniqueItems[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -482,7 +482,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, FormatTest[frozendict.frozendict], ], @@ -490,7 +490,7 @@ def __new__( ) -> FormatTest[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 0b4dda9133b..23d28b24b62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -82,7 +82,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, FromSchema[frozendict.frozendict], ], @@ -90,7 +90,7 @@ def __new__( ) -> FromSchema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index 5a2bd2650a6..ed46fe34110 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -73,7 +73,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -92,7 +92,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 55b4b1b58d8..b1a5b5a9ca2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -32,7 +32,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -51,7 +51,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index 748f8a821eb..dcea346102b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -73,7 +73,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -92,7 +92,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index b3bb1e41d59..7bad3cdf765 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, GrandparentAnimal[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> GrandparentAnimal[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index 6e609c56d74..09bd25dd75c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -81,7 +81,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, HasOnlyReadOnly[frozendict.frozendict], ], @@ -89,7 +89,7 @@ def __new__( ) -> HasOnlyReadOnly[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 84736354378..c4e8b83c222 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -30,7 +30,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str ], @@ -43,7 +43,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -126,7 +126,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, HealthCheckResult[frozendict.frozendict], ], @@ -134,7 +134,7 @@ def __new__( ) -> HealthCheckResult[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index dc953d21825..4f8db5e79bd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -124,7 +124,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index e5447f1ac81..24afe39451e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -33,7 +33,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items2[frozendict.frozendict], dict, @@ -44,7 +44,7 @@ def __new__( ) -> Items[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 488c75865fe..424729aeafe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -26,7 +26,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -45,7 +45,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -84,7 +84,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -111,7 +111,7 @@ def __new__( ) -> JSONPatchRequest[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index 226a17b0611..f0ee7ff0c7f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -162,7 +162,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, JSONPatchRequestAddReplaceTest[frozendict.frozendict], ], @@ -170,7 +170,7 @@ def __new__( ) -> JSONPatchRequestAddReplaceTest[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 1f8a5b53482..be5d0d71fdb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -117,7 +117,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, JSONPatchRequestMoveCopy[frozendict.frozendict], ], @@ -125,7 +125,7 @@ def __new__( ) -> JSONPatchRequestMoveCopy[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index a09bb96ef4e..498834e0bd8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -101,7 +101,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, JSONPatchRequestRemove[frozendict.frozendict], ], @@ -109,7 +109,7 @@ def __new__( ) -> JSONPatchRequestRemove[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index 23c184e92c1..dfc382be380 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -40,7 +40,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -59,7 +59,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index da3ced9d1ed..98a08d892af 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -36,7 +36,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, AdditionalProperties[frozendict.frozendict], ], @@ -44,7 +44,7 @@ def __new__( ) -> AdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -79,7 +79,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, MapMapOfString[frozendict.frozendict], ], @@ -87,7 +87,7 @@ def __new__( ) -> MapMapOfString[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -147,7 +147,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, MapOfEnumString[frozendict.frozendict], ], @@ -155,7 +155,7 @@ def __new__( ) -> MapOfEnumString[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -190,7 +190,7 @@ def __getitem__(self, name: str) -> AdditionalProperties4[schemas.BoolClass]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, DirectMap[frozendict.frozendict], ], @@ -198,7 +198,7 @@ def __new__( ) -> DirectMap[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -263,7 +263,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput5, MapTest[frozendict.frozendict], ], @@ -271,7 +271,7 @@ def __new__( ) -> MapTest[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 969856dc4a7..6e3cb43c950 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -30,7 +30,7 @@ def __getitem__(self, name: str) -> animal.Animal[frozendict.frozendict]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Map[frozendict.frozendict], ], @@ -38,7 +38,7 @@ def __new__( ) -> Map[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -128,7 +128,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], ], @@ -136,7 +136,7 @@ def __new__( ) -> MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index a33c397eae5..f75a49a1d1c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -71,7 +71,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Money[frozendict.frozendict], ], @@ -79,7 +79,7 @@ def __new__( ) -> Money[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index d7a38b8a5ef..c05954b9031 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -103,7 +103,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -122,7 +122,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 12de9acdfcf..65323f97672 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -88,7 +88,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, NoAdditionalProperties[frozendict.frozendict], ], @@ -96,7 +96,7 @@ def __new__( ) -> NoAdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 5e6b9468f62..b2bbc62656c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -31,7 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput10, AdditionalProperties4[frozendict.frozendict], @@ -45,7 +45,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -80,7 +80,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, decimal.Decimal, int @@ -94,7 +94,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -128,7 +128,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, decimal.Decimal, int, @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -177,7 +177,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, bool ], @@ -190,7 +190,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -224,7 +224,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str ], @@ -237,7 +237,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -273,7 +273,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str, datetime.date @@ -287,7 +287,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -323,7 +323,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str, datetime.datetime @@ -337,7 +337,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -374,7 +374,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, list, tuple @@ -388,7 +388,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -423,7 +423,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput2, Items2[frozendict.frozendict], @@ -437,7 +437,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -472,7 +472,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, list, tuple @@ -486,7 +486,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -521,7 +521,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput3, Items3[frozendict.frozendict], @@ -535,7 +535,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -563,7 +563,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items3[typing.Union[ schemas.NoneClass, @@ -578,7 +578,7 @@ def __new__( ) -> ArrayItemsNullable[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -628,7 +628,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[frozendict.frozendict]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput5, ObjectNullableProp[frozendict.frozendict], @@ -642,7 +642,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -677,7 +677,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput6, AdditionalProperties2[frozendict.frozendict], @@ -691,7 +691,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -745,7 +745,7 @@ def __getitem__(self, name: str) -> AdditionalProperties2[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput7, ObjectAndItemsNullableProp[frozendict.frozendict], @@ -759,7 +759,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -794,7 +794,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput8, AdditionalProperties3[frozendict.frozendict], @@ -808,7 +808,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -855,7 +855,7 @@ def __getitem__(self, name: str) -> AdditionalProperties3[typing.Union[ def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput9, ObjectItemsNullable[frozendict.frozendict], ], @@ -863,7 +863,7 @@ def __new__( ) -> ObjectItemsNullable[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -1115,7 +1115,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput11, NullableClass[frozendict.frozendict], ], @@ -1123,7 +1123,7 @@ def __new__( ) -> NullableClass[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 0f3fdc8fc1e..ca5a3991097 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -34,7 +34,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -53,7 +53,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index 24112af86f4..bd97de75715 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -35,7 +35,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str ], @@ -48,7 +48,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 86c26f66ef9..f67ead9ebb4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -73,7 +73,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, NumberOnly[frozendict.frozendict], ], @@ -81,7 +81,7 @@ def __new__( ) -> NumberOnly[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index cd1c31cee5a..47a6dd9bc14 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -82,7 +82,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjWithRequiredProps[frozendict.frozendict], ], @@ -90,7 +90,7 @@ def __new__( ) -> ObjWithRequiredProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 7034a82b185..274d1ca6dd5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -78,7 +78,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjWithRequiredPropsBase[frozendict.frozendict], ], @@ -86,7 +86,7 @@ def __new__( ) -> ObjWithRequiredPropsBase[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 76002f0073a..498cd273853 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -93,7 +93,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectModelWithArgAndArgsProperties[frozendict.frozendict], ], @@ -101,7 +101,7 @@ def __new__( ) -> ObjectModelWithArgAndArgsProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index d85bc68ea15..1d626589258 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -64,7 +64,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectModelWithRefProps[frozendict.frozendict], ], @@ -72,7 +72,7 @@ def __new__( ) -> ObjectModelWithRefProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 5ce3b34c798..30e38e4bafe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -123,7 +123,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -131,7 +131,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -161,7 +161,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -180,7 +180,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 5e8099b5aaf..0cdb55e79e7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -87,7 +87,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, ObjectWithCollidingProperties[frozendict.frozendict], ], @@ -95,7 +95,7 @@ def __new__( ) -> ObjectWithCollidingProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index b313e913320..2918e7694cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -63,7 +63,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectWithDecimalProperties[frozendict.frozendict], ], @@ -71,7 +71,7 @@ def __new__( ) -> ObjectWithDecimalProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 7c6f138dbf9..d9e9704d5f6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -98,7 +98,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectWithDifficultlyNamedProps[frozendict.frozendict], ], @@ -106,7 +106,7 @@ def __new__( ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index d0454b34111..9ab3901be60 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -167,7 +167,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, ObjectWithInlineCompositionProperty[frozendict.frozendict], ], @@ -175,7 +175,7 @@ def __new__( ) -> ObjectWithInlineCompositionProperty[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index db3452b7158..fc6c87a644e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -62,7 +62,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectWithInvalidNamedRefedProperties[frozendict.frozendict], ], @@ -70,7 +70,7 @@ def __new__( ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 29090dbefd4..d3b4db2f37c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -71,7 +71,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectWithOptionalTestProp[frozendict.frozendict], ], @@ -79,7 +79,7 @@ def __new__( ) -> ObjectWithOptionalTestProp[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index bc46dd41e01..3d81c06f2e0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -30,7 +30,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ObjectWithValidations[frozendict.frozendict], ], @@ -38,7 +38,7 @@ def __new__( ) -> ObjectWithValidations[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index 32f3a7c1941..ed36decff18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -167,7 +167,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Order[frozendict.frozendict], ], @@ -175,7 +175,7 @@ def __new__( ) -> Order[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 807a9cd3d35..11e5890d6fe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -40,7 +40,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ParentPet[frozendict.frozendict], ], @@ -48,7 +48,7 @@ def __new__( ) -> ParentPet[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 22e7f9e14e1..7cd28452204 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -27,7 +27,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -37,7 +37,7 @@ def __new__( ) -> PhotoUrls[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -63,7 +63,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ tag.Tag[frozendict.frozendict], dict, @@ -74,7 +74,7 @@ def __new__( ) -> Tags[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -195,7 +195,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Pet[frozendict.frozendict], ], @@ -203,7 +203,7 @@ def __new__( ) -> Pet[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index 314c6eb5ab7..202632b3593 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -39,7 +39,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -58,7 +58,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 77302d836ff..bfe474f371d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -61,7 +61,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Player[frozendict.frozendict], ], @@ -69,7 +69,7 @@ def __new__( ) -> Player[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index a876b5716b4..949810fe744 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -39,7 +39,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -58,7 +58,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index e64ff5c274b..1de127e1cfa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -114,7 +114,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -133,7 +133,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index 112a289ab1b..fbe56b859ce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -81,7 +81,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ReadOnlyFirst[frozendict.frozendict], ], @@ -89,7 +89,7 @@ def __new__( ) -> ReadOnlyFirst[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index d075a0080bc..697b053f9bd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -75,7 +75,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ReqPropsFromExplicitAddProps[frozendict.frozendict], ], @@ -83,7 +83,7 @@ def __new__( ) -> ReqPropsFromExplicitAddProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 43d0d72c3ae..55cd3d6708d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -163,7 +163,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, ReqPropsFromTrueAddProps[frozendict.frozendict], ], @@ -171,7 +171,7 @@ def __new__( ) -> ReqPropsFromTrueAddProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index e7a859caaee..6f3588b1999 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -154,7 +154,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, ReqPropsFromUnsetAddProps[frozendict.frozendict], ], @@ -162,7 +162,7 @@ def __new__( ) -> ReqPropsFromUnsetAddProps[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index c0f79fdc58f..afe40462de6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -124,7 +124,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index 9373e77a05d..f12cb9aa845 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -29,7 +29,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ SelfReferencingArrayModel[tuple], list, @@ -40,7 +40,7 @@ def __new__( ) -> SelfReferencingArrayModel[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index a575bccc67b..72c10823ce3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -46,7 +46,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, SelfReferencingObjectModel[frozendict.frozendict], ], @@ -54,7 +54,7 @@ def __new__( ) -> SelfReferencingObjectModel[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index 5339d2643ab..0b2152b0978 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -39,7 +39,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -58,7 +58,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 324442c1638..3b08344310e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 52a6c4b15d0..3c8e9d348ee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -86,7 +86,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, _1[frozendict.frozendict], ], @@ -94,7 +94,7 @@ def __new__( ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -124,7 +124,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -143,7 +143,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index a08b0af442d..6e222f849ee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -31,7 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -50,7 +50,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 5257fee6396..e8f1b08633f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -73,7 +73,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, SpecialModelName[frozendict.frozendict], ], @@ -81,7 +81,7 @@ def __new__( ) -> SpecialModelName[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index d19bf29f3b2..e7673982446 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -41,7 +41,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, StringBooleanMap[frozendict.frozendict], ], @@ -49,7 +49,7 @@ def __new__( ) -> StringBooleanMap[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index 2aa895efdec..2e3489ab724 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -74,7 +74,7 @@ def NONE(cls) -> StringEnum[schemas.NoneClass]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, str ], @@ -87,7 +87,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 36eed4a8ba9..3b95f0dfbaa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -82,7 +82,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Tag[frozendict.frozendict], ], @@ -90,7 +90,7 @@ def __new__( ) -> Tag[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index bec7339cbf2..751de8a83ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -40,7 +40,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -59,7 +59,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index 5649c3d482f..d30b4a0e8c9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -114,7 +114,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -133,7 +133,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index 7695187ba82..bc0fe1f2856 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -41,7 +41,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ None, DictInput2, ObjectWithNoDeclaredPropsNullable[frozendict.frozendict], @@ -55,7 +55,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -88,7 +88,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -107,7 +107,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -386,7 +386,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput6, User[frozendict.frozendict], ], @@ -394,7 +394,7 @@ def __new__( ) -> User[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 1b726aa0736..17fdbe70fe8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -118,7 +118,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Whale[frozendict.frozendict], ], @@ -126,7 +126,7 @@ def __new__( ) -> Whale[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 5d7f9fce469..e00a8514275 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -161,7 +161,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, Zebra[frozendict.frozendict], ], @@ -169,7 +169,7 @@ def __new__( ) -> Zebra[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 8017187a20e..0b0100e6c9d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -51,7 +51,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -61,7 +61,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 8017187a20e..0b0100e6c9d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -51,7 +51,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -61,7 +61,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 4e840726777..cd521f3ae6a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -51,7 +51,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -61,7 +61,7 @@ def __new__( ) -> EnumFormStringArray[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -170,7 +170,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -178,7 +178,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 6d3918d8101..40e7f96854e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -354,7 +354,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -362,7 +362,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 3947adbd58e..0ce950d68de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -36,7 +36,7 @@ def __getitem__(self, name: str) -> AdditionalProperties[str]: def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -44,7 +44,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index f460f2943ff..f4d6b3ab843 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index a45963791d7..e5d7ebed000 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -162,7 +162,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, Schema[frozendict.frozendict], ], @@ -170,7 +170,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index f460f2943ff..f4d6b3ab843 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index a45963791d7..e5d7ebed000 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -162,7 +162,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, Schema[frozendict.frozendict], ], @@ -170,7 +170,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index f460f2943ff..f4d6b3ab843 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index a45963791d7..e5d7ebed000 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -42,7 +42,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], @@ -61,7 +61,7 @@ def __new__( ]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -162,7 +162,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput2, Schema[frozendict.frozendict], ], @@ -170,7 +170,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 54351638c49..6541405dd3a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -88,7 +88,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -96,7 +96,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 414dd17ff59..6006d02a76e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -66,7 +66,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -74,7 +74,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index ce265a17802..9f14b0e7473 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -85,7 +85,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -93,7 +93,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 61bf4700f39..ecbaada1b4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -85,7 +85,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -93,7 +93,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index dde5663e0c2..784d420e3ac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[typing.Union[bytes, schemas.FileIO]], bytes, @@ -37,7 +37,7 @@ def __new__( ) -> Files[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( @@ -105,7 +105,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -113,7 +113,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 4f878a7b278..93422e411af 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -49,7 +49,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -57,7 +57,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index 9a5e27bedca..d201c569f30 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -83,7 +83,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, Variables[frozendict.frozendict], ], @@ -91,7 +91,7 @@ def __new__( ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index d0b062b4b28..c2f118e2987 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -56,7 +56,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -66,7 +66,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index 9a5e27bedca..d201c569f30 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -83,7 +83,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, Variables[frozendict.frozendict], ], @@ -91,7 +91,7 @@ def __new__( ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index 872a0bd631a..5acdd4a2d80 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[str], str @@ -35,7 +35,7 @@ def __new__( ) -> Schema[tuple]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 39285c6a1a4..dd15ddbe0b6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -76,7 +76,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -84,7 +84,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 8c02f2e06d8..55b262f346a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -78,7 +78,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput, Schema[frozendict.frozendict], ], @@ -86,7 +86,7 @@ def __new__( ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py index 89dda66ed27..7ca8c92a811 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py @@ -46,18 +46,18 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg_, (io.FileIO, io.BufferedReader)): - if arg_.closed: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg_.close() + arg.close() super_cls: typing.Type = super(FileIO, cls) - inst = super_cls.__new__(cls, arg_.name) - super(FileIO, inst).__init__(arg_.name) + inst = super_cls.__new__(cls, arg.name) + super(FileIO, inst).__init__(arg.name) return inst - raise exceptions.ApiValueError('FileIO must be passed arg_ which contains the open file') + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - def __init__(self, arg_: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): """ if this does not exist, then classes with FileIO as a mixin (AnyType etc) will see the io.FileIO __init__ signature rather than the __new__ one @@ -129,11 +129,11 @@ def __call__(cls, *args, **kwargs): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg_) + The same instance is returned for a given key of (cls, arg) """ _instances = {} - def __new__(cls, arg_: typing.Any, **kwargs): + def __new__(cls, arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -141,16 +141,16 @@ def __new__(cls, arg_: typing.Any, **kwargs): Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg_, str(arg_)) + key = (cls, arg, str(arg)) if key not in cls._instances: - if isinstance(arg_, (none_type_, bool, BoolClass, NoneClass)): + if isinstance(arg, (none_type_, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: super_inst: typing.Type = super() - cls._instances[key] = super_inst.__new__(cls, arg_) + cls._instances[key] = super_inst.__new__(cls, arg) return cls._instances[key] def __repr__(self): @@ -1403,7 +1403,7 @@ def __remove_unsets(kwargs): def __new__( cls, - *args_: typing.Union[ + *arg: typing.Union[ dict, frozendict.frozendict, list, @@ -1448,7 +1448,7 @@ def __new__( Schema __new__ Args: - args_ (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc @@ -1457,14 +1457,14 @@ def __new__( are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args_ and not __kwargs: + if not arg and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args_ and not isinstance(args_[0], dict): - __arg = args_[0] + if not __kwargs and arg and not isinstance(arg[0], dict): + __arg = arg[0] else: - __arg = cls.__get_input_dict(*args_, **__kwargs) + __arg = cls.__get_input_dict(*arg, **__kwargs) __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -2135,8 +2135,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + return super().__new__(cls, arg, **kwargs) class NoneSchema( @@ -2152,8 +2152,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, **kwargs) class NumberSchema( @@ -2173,8 +2173,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, **kwargs) class IntBase: @@ -2199,8 +2199,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2212,8 +2212,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2225,8 +2225,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2242,8 +2242,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2259,8 +2259,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2283,8 +2283,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: + return super().__new__(cls, arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2293,8 +2293,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg_: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(UUIDSchema[str], inst) @@ -2304,8 +2304,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg_: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DateSchema[str], inst) @@ -2315,8 +2315,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg_: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DateTimeSchema[str], inst) @@ -2326,7 +2326,7 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__(cls, arg: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2335,7 +2335,7 @@ def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg_, **kwargs) + inst = super().__new__(cls, arg, **kwargs) return typing.cast(DecimalSchema[str], inst) @@ -2350,9 +2350,9 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg_: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__(cls, arg: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class FileSchema( @@ -2379,9 +2379,9 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class BinarySchema( @@ -2398,8 +2398,8 @@ class Schema_(metaclass=SingletonMeta): FileSchema, ) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: - return super().__new__(cls, arg_) + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: + return super().__new__(cls, arg) class BoolSchema( @@ -2415,8 +2415,8 @@ class Schema_(metaclass=SingletonMeta): def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg_, **kwargs) + def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: + return super().__new__(cls, arg, **kwargs) class AnyTypeSchema( @@ -2436,7 +2436,7 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_: typing.Union[ + *arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2482,11 +2482,11 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *args_, configuration_=configuration_, **kwargs) + return super().__new__(cls, *arg, configuration_=configuration_, **kwargs) def __init__( self, - *args_: typing.Union[ + *arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2548,10 +2548,10 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_, + *arg, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *args_, configuration_=configuration_) + inst = super().__new__(cls, *arg, configuration_=configuration_) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2570,11 +2570,11 @@ def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: t def __new__( cls, - *args_: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *args_, **kwargs, configuration_=configuration_) + return super().__new__(cls, *arg, **kwargs, configuration_=configuration_) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 4cc8a1940a3..09866f3a008 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -129,7 +129,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, Variables[frozendict.frozendict], ], @@ -137,7 +137,7 @@ def __new__( ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 23e3d9557b0..73c866dabaa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -83,7 +83,7 @@ def __getitem__( def __new__( cls, - arg_: typing.Union[ + arg: typing.Union[ DictInput3, Variables[frozendict.frozendict], ], @@ -91,7 +91,7 @@ def __new__( ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, - arg_, + arg, configuration_=configuration_, ) inst = typing.cast( From 0481983a1ccde5b886fe25f1f59acea5f2121cfc Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 12:47:30 -0700 Subject: [PATCH 30/36] Schema input configuration_ -> configuration --- .../src/main/resources/python/api_client.hbs | 2 +- .../python/components/schemas/_helper_new.hbs | 4 +- .../python/components/schemas/schema_test.hbs | 6 +- ...helper_operation_test_response_content.hbs | 2 +- .../python/paths/path/verb/operation_test.hbs | 4 +- .../src/main/resources/python/schemas.hbs | 60 ++++++++-------- .../python/src/petstore_api/api_client.py | 2 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../content/application_xml/schema.py | 4 +- .../components/schema/_200_response.py | 4 +- .../petstore_api/components/schema/_return.py | 4 +- .../schema/abstract_step_message.py | 4 +- .../schema/additional_properties_class.py | 28 ++++---- .../schema/additional_properties_validator.py | 24 +++---- ...ditional_properties_with_array_of_enums.py | 8 +-- .../petstore_api/components/schema/address.py | 4 +- .../petstore_api/components/schema/animal.py | 4 +- .../components/schema/animal_farm.py | 4 +- .../components/schema/any_type_and_format.py | 40 +++++------ .../components/schema/any_type_not_string.py | 4 +- .../components/schema/api_response.py | 4 +- .../petstore_api/components/schema/apple.py | 4 +- .../components/schema/apple_req.py | 4 +- .../schema/array_holding_any_type.py | 4 +- .../schema/array_of_array_of_number_only.py | 12 ++-- .../components/schema/array_of_enums.py | 4 +- .../components/schema/array_of_number_only.py | 8 +-- .../components/schema/array_test.py | 24 +++---- .../schema/array_with_validations_in_items.py | 4 +- .../petstore_api/components/schema/banana.py | 4 +- .../components/schema/banana_req.py | 4 +- .../components/schema/basque_pig.py | 4 +- .../components/schema/capitalization.py | 4 +- .../src/petstore_api/components/schema/cat.py | 8 +-- .../components/schema/category.py | 4 +- .../components/schema/child_cat.py | 8 +-- .../components/schema/class_model.py | 4 +- .../petstore_api/components/schema/client.py | 4 +- .../schema/complex_quadrilateral.py | 8 +-- ...d_any_of_different_types_no_validations.py | 8 +-- .../components/schema/composed_array.py | 4 +- .../components/schema/composed_bool.py | 4 +- .../components/schema/composed_none.py | 4 +- .../components/schema/composed_number.py | 4 +- .../components/schema/composed_object.py | 4 +- .../schema/composed_one_of_different_types.py | 12 ++-- .../components/schema/composed_string.py | 4 +- .../components/schema/danish_pig.py | 4 +- .../src/petstore_api/components/schema/dog.py | 8 +-- .../petstore_api/components/schema/drawing.py | 8 +-- .../components/schema/enum_arrays.py | 8 +-- .../components/schema/enum_test.py | 4 +- .../components/schema/equilateral_triangle.py | 8 +-- .../petstore_api/components/schema/file.py | 4 +- .../schema/file_schema_test_class.py | 8 +-- .../src/petstore_api/components/schema/foo.py | 4 +- .../components/schema/format_test.py | 8 +-- .../components/schema/from_schema.py | 4 +- .../petstore_api/components/schema/fruit.py | 4 +- .../components/schema/fruit_req.py | 4 +- .../components/schema/gm_fruit.py | 4 +- .../components/schema/grandparent_animal.py | 4 +- .../components/schema/has_only_read_only.py | 4 +- .../components/schema/health_check_result.py | 8 +-- .../components/schema/isosceles_triangle.py | 8 +-- .../petstore_api/components/schema/items.py | 4 +- .../components/schema/json_patch_request.py | 8 +-- .../json_patch_request_add_replace_test.py | 4 +- .../schema/json_patch_request_move_copy.py | 4 +- .../schema/json_patch_request_remove.py | 4 +- .../petstore_api/components/schema/mammal.py | 4 +- .../components/schema/map_test.py | 20 +++--- ...perties_and_additional_properties_class.py | 8 +-- .../petstore_api/components/schema/money.py | 4 +- .../petstore_api/components/schema/name.py | 4 +- .../schema/no_additional_properties.py | 4 +- .../components/schema/nullable_class.py | 72 +++++++++---------- .../components/schema/nullable_shape.py | 4 +- .../components/schema/nullable_string.py | 4 +- .../components/schema/number_only.py | 4 +- .../schema/obj_with_required_props.py | 4 +- .../schema/obj_with_required_props_base.py | 4 +- ...ject_model_with_arg_and_args_properties.py | 4 +- .../schema/object_model_with_ref_props.py | 4 +- ..._with_req_test_prop_from_unset_add_prop.py | 8 +-- .../object_with_colliding_properties.py | 4 +- .../schema/object_with_decimal_properties.py | 4 +- .../object_with_difficultly_named_props.py | 4 +- ...object_with_inline_composition_property.py | 8 +-- ...ect_with_invalid_named_refed_properties.py | 4 +- .../schema/object_with_optional_test_prop.py | 4 +- .../schema/object_with_validations.py | 4 +- .../petstore_api/components/schema/order.py | 4 +- .../components/schema/parent_pet.py | 4 +- .../src/petstore_api/components/schema/pet.py | 12 ++-- .../src/petstore_api/components/schema/pig.py | 4 +- .../petstore_api/components/schema/player.py | 4 +- .../components/schema/quadrilateral.py | 4 +- .../schema/quadrilateral_interface.py | 4 +- .../components/schema/read_only_first.py | 4 +- .../req_props_from_explicit_add_props.py | 4 +- .../schema/req_props_from_true_add_props.py | 4 +- .../schema/req_props_from_unset_add_props.py | 4 +- .../components/schema/scalene_triangle.py | 8 +-- .../schema/self_referencing_array_model.py | 4 +- .../schema/self_referencing_object_model.py | 4 +- .../petstore_api/components/schema/shape.py | 4 +- .../components/schema/shape_or_null.py | 4 +- .../components/schema/simple_quadrilateral.py | 8 +-- .../components/schema/some_object.py | 4 +- .../components/schema/special_model_name.py | 4 +- .../components/schema/string_boolean_map.py | 4 +- .../components/schema/string_enum.py | 4 +- .../src/petstore_api/components/schema/tag.py | 4 +- .../components/schema/triangle.py | 4 +- .../components/schema/triangle_interface.py | 4 +- .../petstore_api/components/schema/user.py | 12 ++-- .../petstore_api/components/schema/whale.py | 4 +- .../petstore_api/components/schema/zebra.py | 4 +- .../fake/get/parameters/parameter_0/schema.py | 4 +- .../fake/get/parameters/parameter_2/schema.py | 4 +- .../schema.py | 8 +-- .../schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../post/parameters/parameter_0/schema.py | 4 +- .../post/parameters/parameter_1/schema.py | 8 +-- .../content/application_json/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +-- .../content/application_json/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +-- .../schema.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../put/parameters/parameter_0/schema.py | 4 +- .../put/parameters/parameter_1/schema.py | 4 +- .../put/parameters/parameter_2/schema.py | 4 +- .../put/parameters/parameter_3/schema.py | 4 +- .../put/parameters/parameter_4/schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../content/multipart_form_data/schema.py | 8 +-- .../content/application_json/schema.py | 4 +- .../paths/foo/get/servers/server_1.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../pet_find_by_status/servers/server_1.py | 4 +- .../get/parameters/parameter_0/schema.py | 4 +- .../schema.py | 4 +- .../content/multipart_form_data/schema.py | 4 +- .../python/src/petstore_api/schemas.py | 60 ++++++++-------- .../src/petstore_api/servers/server_0.py | 4 +- .../src/petstore_api/servers/server_1.py | 4 +- .../python/tests_manual/test_validate.py | 12 ++-- 153 files changed, 522 insertions(+), 522 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs index af61f59c93f..41d53b3d221 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs @@ -939,7 +939,7 @@ class OpenApiResponse(JSONDetector, TypedDictInputVerifier, typing.Generic[T]): else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) deserialized_body = body_schema.from_openapi_data_( - body_data, configuration_=configuration) + body_data, configuration=configuration) elif streamed: response.release_conn() diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 7c5edfa9a68..600cfa3198b 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -60,7 +60,7 @@ def __new__( arg: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, {{/if}} {{/if}} - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None {{#if types}} {{#eq types.size 1}} ) -> {{jsonPathPiece.camelCase}}[{{> components/schemas/_helper_schema_python_base_types }}]: @@ -81,7 +81,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( {{#if types}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs index dc481868581..2f3a629da3a 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs @@ -12,7 +12,7 @@ from {{packageName}}.configurations import schema_configuration class Test{{jsonPathPiece.camelCase}}(unittest.TestCase): """{{jsonPathPiece.camelCase}} unit test stubs""" - configuration_ = schema_configuration.SchemaConfiguration() + configuration = schema_configuration.SchemaConfiguration() {{#each testCases}} {{#with this }} @@ -23,7 +23,7 @@ class Test{{jsonPathPiece.camelCase}}(unittest.TestCase): {{#with data}} {{> components/schemas/_helper_payload_renderer endChar=',' }} {{/with}} - configuration_=self.configuration_ + configuration=self.configuration ) {{else}} with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): @@ -31,7 +31,7 @@ class Test{{jsonPathPiece.camelCase}}(unittest.TestCase): {{#with data}} {{> components/schemas/_helper_payload_renderer endChar=','}} {{/with}} - configuration_=self.configuration_ + configuration=self.configuration ) {{/if}} {{/with}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs index 9c694f75e59..396b7d4cd59 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs @@ -29,7 +29,7 @@ def test_{{@key}}_{{#if valid}}passes{{else}}fails{{/if}}(self): assert isinstance(api_response.body, self.response_body_schema) deserialized_response_body = self.response_body_schema.from_openapi_data_( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body {{else}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs index 4e94c9ba6c5..8bcb52759cc 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs @@ -89,7 +89,7 @@ class Test{{httpMethod.camelCase}}(ApiTestMixin, unittest.TestCase): {{#if valid}} body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema.from_openapi_data_( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -103,7 +103,7 @@ class Test{{httpMethod.camelCase}}(ApiTestMixin, unittest.TestCase): with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema.from_openapi_data_( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.{{httpMethod.original}}(body=body) {{/if}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index e675bd52f6f..8477d0de353 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -1506,7 +1506,7 @@ class Schema(typing.Generic[T]): io.BufferedReader, bytes ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ): """ Schema from_openapi_data_ @@ -1517,7 +1517,7 @@ class Schema(typing.Generic[T]): cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) ) path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) @@ -1547,7 +1547,7 @@ class Schema(typing.Generic[T]): *arg: typing.Union[ {{> _helper_types_all_incl_schema }} ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ Unset, {{> _helper_types_all_incl_schema }} @@ -1559,7 +1559,7 @@ class Schema(typing.Generic[T]): Args: arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables @@ -1581,7 +1581,7 @@ class Schema(typing.Generic[T]): __arg, __from_server, __validated_path_to_schemas, ('args[0]',), __path_to_type) __validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(__validated_path_to_schemas) ) __path_to_schemas = cls.__get_new_cls(cast_arg, __validation_metadata, __path_to_type) @@ -2219,8 +2219,8 @@ class ListSchema( types: typing.FrozenSet[typing.Type] = frozenset({tuple}) @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg, **kwargs) @@ -2236,8 +2236,8 @@ class NoneSchema( types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) @classmethod - def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: None, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: return super().__new__(cls, arg, **kwargs) @@ -2257,8 +2257,8 @@ class NumberSchema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Union[int, float], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: return super().__new__(cls, arg, **kwargs) @@ -2283,8 +2283,8 @@ class IntSchema(IntBase, NumberSchema[T]): format: str = 'int' @classmethod - def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: int, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2326,8 +2326,8 @@ class Float32Schema( format: str = 'float' @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2343,8 +2343,8 @@ class Float64Schema( format: str = 'double' @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2367,8 +2367,8 @@ class StrSchema( types: typing.FrozenSet[typing.Type] = frozenset({str}) @classmethod - def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: str, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: return super().__new__(cls, arg, **kwargs) @@ -2499,8 +2499,8 @@ class BoolSchema( types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) @classmethod - def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: bool, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: return super().__new__(cls, arg, **kwargs) @@ -2541,7 +2541,7 @@ class AnyTypeSchema( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ str, uuid.UUID, @@ -2569,7 +2569,7 @@ class AnyTypeSchema( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *arg, configuration_=configuration_, **kwargs) + return super().__new__(cls, *arg, configuration=configuration, **kwargs) def __init__( self, @@ -2591,7 +2591,7 @@ class AnyTypeSchema( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ str, uuid.UUID, @@ -2636,9 +2636,9 @@ class NotAnyTypeSchema(AnyTypeSchema[T]): def __new__( cls, *arg, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *arg, configuration_=configuration_) + inst = super().__new__(cls, *arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2652,16 +2652,16 @@ class DictSchema( types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__( cls, *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *arg, **kwargs, configuration_=configuration_) + return super().__new__(cls, *arg, **kwargs, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py index 49cca911d4e..b9a17ec991a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py @@ -941,7 +941,7 @@ def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_confi else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) deserialized_body = body_schema.from_openapi_data_( - body_data, configuration_=configuration) + body_data, configuration=configuration) elif streamed: response.release_conn() diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index 85582b6b447..3b2e472d7df 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -31,12 +31,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index cafa6e05b71..e735d848f7f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -41,12 +41,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index 04770ac5ea0..0cc37157f48 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -31,12 +31,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index fd3b7967a32..d004980c97b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -31,12 +31,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 4b9bc8cb910..55e91e9c7aa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -89,7 +89,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _200Response[ typing.Union[ frozendict.frozendict, @@ -105,7 +105,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _200Response[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index fcd6d47dfdd..e78223ca5c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -79,7 +79,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Return[ typing.Union[ frozendict.frozendict, @@ -95,7 +95,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _Return[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index f99828d5eb2..99798f3ca61 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -205,12 +205,12 @@ def __new__( DictInput, AbstractStepMessage[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AbstractStepMessage[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AbstractStepMessage[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 32c123aae65..8b9bf4d7bd4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -40,12 +40,12 @@ def __new__( DictInput, MapProperty[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapProperty[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapProperty[frozendict.frozendict], @@ -83,12 +83,12 @@ def __new__( DictInput2, AdditionalProperties2[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties2[frozendict.frozendict], @@ -126,12 +126,12 @@ def __new__( DictInput3, MapOfMapProperty[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfMapProperty[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapOfMapProperty[frozendict.frozendict], @@ -202,12 +202,12 @@ def __new__( DictInput8, MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], @@ -235,12 +235,12 @@ def __new__( DictInput11, EmptyMap[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EmptyMap[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( EmptyMap[frozendict.frozendict], @@ -278,12 +278,12 @@ def __new__( DictInput12, MapWithUndeclaredPropertiesString[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapWithUndeclaredPropertiesString[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapWithUndeclaredPropertiesString[frozendict.frozendict], @@ -451,12 +451,12 @@ def __new__( DictInput13, AdditionalPropertiesClass[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalPropertiesClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 82e852a4ad8..4d63f383ce6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -67,12 +67,12 @@ def __new__( DictInput2, _0[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _0[frozendict.frozendict], @@ -100,7 +100,7 @@ def __new__( DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ typing.Union[ frozendict.frozendict, @@ -116,7 +116,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties2[ @@ -190,12 +190,12 @@ def __new__( DictInput4, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -223,7 +223,7 @@ def __new__( DictInput5, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ typing.Union[ frozendict.frozendict, @@ -239,7 +239,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties3[ @@ -313,12 +313,12 @@ def __new__( DictInput6, _2[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _2[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _2[frozendict.frozendict], @@ -358,12 +358,12 @@ def __new__( DictInput7, AdditionalPropertiesValidator[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesValidator[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalPropertiesValidator[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index 4c88d670c1d..6a36c29f1a7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -30,12 +30,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties[tuple], @@ -81,12 +81,12 @@ def __new__( DictInput, AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index c07e1c24489..5649854f272 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -46,12 +46,12 @@ def __new__( DictInput, Address[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Address[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Address[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index b6aa0d34752..6d2a111d73d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -112,12 +112,12 @@ def __new__( DictInput, Animal[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Animal[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Animal[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index ceb2892e066..ba8d62ba587 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -36,12 +36,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnimalFarm[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AnimalFarm[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 19d5dee144a..395babbcabc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -31,7 +31,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Uuid[ typing.Union[ frozendict.frozendict, @@ -47,7 +47,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Uuid[ @@ -87,7 +87,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Date[ typing.Union[ frozendict.frozendict, @@ -103,7 +103,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Date[ @@ -143,7 +143,7 @@ def __new__( DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateTime[ typing.Union[ frozendict.frozendict, @@ -159,7 +159,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( DateTime[ @@ -199,7 +199,7 @@ def __new__( DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Number[ typing.Union[ frozendict.frozendict, @@ -215,7 +215,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Number[ @@ -254,7 +254,7 @@ def __new__( DictInput5, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Binary[ typing.Union[ frozendict.frozendict, @@ -270,7 +270,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Binary[ @@ -309,7 +309,7 @@ def __new__( DictInput6, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int32[ typing.Union[ frozendict.frozendict, @@ -325,7 +325,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Int32[ @@ -364,7 +364,7 @@ def __new__( DictInput7, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Int64[ typing.Union[ frozendict.frozendict, @@ -380,7 +380,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Int64[ @@ -419,7 +419,7 @@ def __new__( DictInput8, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Double[ typing.Union[ frozendict.frozendict, @@ -435,7 +435,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Double[ @@ -474,7 +474,7 @@ def __new__( DictInput9, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Float[ typing.Union[ frozendict.frozendict, @@ -490,7 +490,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _Float[ @@ -879,12 +879,12 @@ def __new__( DictInput10, AnyTypeAndFormat[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeAndFormat[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AnyTypeAndFormat[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index 49b7db278e2..1f6dfe2f3bb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -36,7 +36,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeNotString[ typing.Union[ frozendict.frozendict, @@ -52,7 +52,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AnyTypeNotString[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index 8a87a30edb1..bb6c1a65154 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -96,12 +96,12 @@ def __new__( DictInput, ApiResponse[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ApiResponse[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ApiResponse[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 3285cc57b85..5f01c9f2856 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -129,7 +129,7 @@ def __new__( DictInput, Apple[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Apple[ typing.Union[ schemas.NoneClass, @@ -139,7 +139,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Apple[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 6688a1dbda6..5717aeabd09 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -90,12 +90,12 @@ def __new__( DictInput3, AppleReq[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AppleReq[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AppleReq[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index 76b39eee45c..a0ae1adc46c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -54,12 +54,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayHoldingAnyType[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayHoldingAnyType[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 368402784dc..e6c8ba4d0fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -33,12 +33,12 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items[tuple], @@ -70,12 +70,12 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayNumber[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayArrayNumber[tuple], @@ -151,12 +151,12 @@ def __new__( DictInput, ArrayOfArrayOfNumberOnly[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayOfArrayOfNumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 63a86458494..d30dd9c3de8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -39,12 +39,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfEnums[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayOfEnums[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index b73e778d691..5f9679681de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -33,12 +33,12 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayNumber[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayNumber[tuple], @@ -114,12 +114,12 @@ def __new__( DictInput, ArrayOfNumberOnly[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayOfNumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index 21eb36d13cb..81113e93cc1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayOfString[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayOfString[tuple], @@ -69,12 +69,12 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items2[tuple], @@ -106,12 +106,12 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayOfInteger[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayArrayOfInteger[tuple], @@ -143,12 +143,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items4[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items4[tuple], @@ -180,12 +180,12 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayArrayOfModel[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayArrayOfModel[tuple], @@ -281,12 +281,12 @@ def __new__( DictInput, ArrayTest[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayTest[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index 3f826be2fff..e462577da10 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -51,12 +51,12 @@ def __new__( int ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayWithValidationsInItems[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayWithValidationsInItems[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 7333e790b63..5c88f13a1c3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -84,12 +84,12 @@ def __new__( DictInput, Banana[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Banana[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Banana[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index faf14ae8586..19acd6183fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -92,12 +92,12 @@ def __new__( DictInput3, BananaReq[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BananaReq[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( BananaReq[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 505a73164bb..9a897f4a78e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -102,12 +102,12 @@ def __new__( DictInput, BasquePig[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BasquePig[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( BasquePig[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 0e3f85376e0..e293f41af1e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -125,12 +125,12 @@ def __new__( DictInput, Capitalization[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Capitalization[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Capitalization[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index eb7c3fbd5fc..d6e07bd11a5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -70,12 +70,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -108,7 +108,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Cat[ typing.Union[ frozendict.frozendict, @@ -124,7 +124,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Cat[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 777205e623b..e9be5d2002e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -105,12 +105,12 @@ def __new__( DictInput, Category[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Category[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Category[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 9b7086eaa6b..06381d6b353 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -70,12 +70,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -108,7 +108,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ChildCat[ typing.Union[ frozendict.frozendict, @@ -124,7 +124,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ChildCat[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index a674e20f68d..909bf933950 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -78,7 +78,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ClassModel[ typing.Union[ frozendict.frozendict, @@ -94,7 +94,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ClassModel[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index c4eb6b3ad82..78fd38277e3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -75,12 +75,12 @@ def __new__( DictInput, Client[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Client[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Client[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index ed29ecde530..52779450b2f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -90,12 +90,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -128,7 +128,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComplexQuadrilateral[ typing.Union[ frozendict.frozendict, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComplexQuadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index 1c8a12c18b1..7f957018dfb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -60,12 +60,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _9[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _9[tuple], @@ -134,7 +134,7 @@ def __new__( DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedAnyOfDifferentTypesNoValidations[ typing.Union[ frozendict.frozendict, @@ -150,7 +150,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedAnyOfDifferentTypesNoValidations[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index c8581f32104..cb26db2fdb2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -54,12 +54,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedArray[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedArray[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py index d08a479a88d..b62b2550dad 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_bool.py @@ -38,12 +38,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg: bool, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedBool[schemas.BoolClass]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedBool[schemas.BoolClass], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py index f53e8dd6d3c..1750ad03a6d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_none.py @@ -38,12 +38,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg: None, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNone[schemas.NoneClass]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedNone[schemas.NoneClass], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py index e8578689688..cb3fd661104 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_number.py @@ -38,12 +38,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg: typing.Union[decimal.Decimal, int, float], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedNumber[decimal.Decimal]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedNumber[decimal.Decimal], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index 3fdd3e471ad..0f6578202e3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -42,12 +42,12 @@ def __new__( DictInput2, ComposedObject[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedObject[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedObject[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index e4d900ef664..f1fd509c2c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -32,12 +32,12 @@ def __new__( DictInput, _4[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _4[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _4[frozendict.frozendict], @@ -86,12 +86,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _5[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _5[tuple], @@ -154,7 +154,7 @@ def __new__( DictInput3, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedOneOfDifferentTypes[ typing.Union[ frozendict.frozendict, @@ -170,7 +170,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedOneOfDifferentTypes[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py index 25509e9222f..3752195f807 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_string.py @@ -38,12 +38,12 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, arg: str, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ComposedString[str]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ComposedString[str], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index f31c63475fa..4c822644d12 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -102,12 +102,12 @@ def __new__( DictInput, DanishPig[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DanishPig[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( DanishPig[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index c64852940e2..162ef1073b6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -70,12 +70,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -108,7 +108,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Dog[ typing.Union[ frozendict.frozendict, @@ -124,7 +124,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Dog[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index b1764648f6a..dfef6559c7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -47,12 +47,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Shapes[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Shapes[tuple], @@ -160,12 +160,12 @@ def __new__( DictInput, Drawing[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Drawing[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Drawing[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index fae06f8133f..874dec8c419 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -82,12 +82,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayEnum[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayEnum[tuple], @@ -172,12 +172,12 @@ def __new__( DictInput, EnumArrays[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumArrays[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( EnumArrays[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index 7dbdae86558..7020eb16191 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -216,12 +216,12 @@ def __new__( DictInput, EnumTest[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumTest[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( EnumTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 6e7a1f66f11..d2383c15f23 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -90,12 +90,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -128,7 +128,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EquilateralTriangle[ typing.Union[ frozendict.frozendict, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( EquilateralTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index 4094c1cea23..6030065c74b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -77,12 +77,12 @@ def __new__( DictInput, File[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> File[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( File[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index ffff84aa788..ad51f55ac45 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -31,12 +31,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Files[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Files[tuple], @@ -99,12 +99,12 @@ def __new__( DictInput, FileSchemaTestClass[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FileSchemaTestClass[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( FileSchemaTestClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index e7de26aa1fe..1b1ecfed8b9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -58,12 +58,12 @@ def __new__( DictInput, Foo[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Foo[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Foo[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index 9d83a8509df..933706e4be9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -114,12 +114,12 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayWithUniqueItems[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayWithUniqueItems[tuple], @@ -486,12 +486,12 @@ def __new__( DictInput, FormatTest[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FormatTest[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( FormatTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index 23d28b24b62..87bb727cf30 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -86,12 +86,12 @@ def __new__( DictInput, FromSchema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FromSchema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( FromSchema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index ed46fe34110..944df35c6fb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -77,7 +77,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Fruit[ typing.Union[ frozendict.frozendict, @@ -93,7 +93,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Fruit[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index b1a5b5a9ca2..df8b57733f7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -36,7 +36,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> FruitReq[ typing.Union[ frozendict.frozendict, @@ -52,7 +52,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( FruitReq[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index dcea346102b..e21589d209a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -77,7 +77,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GmFruit[ typing.Union[ frozendict.frozendict, @@ -93,7 +93,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( GmFruit[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 7bad3cdf765..2b9eb0b14a2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -90,12 +90,12 @@ def __new__( DictInput, GrandparentAnimal[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> GrandparentAnimal[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( GrandparentAnimal[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index 09bd25dd75c..a4970aa3151 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -85,12 +85,12 @@ def __new__( DictInput, HasOnlyReadOnly[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HasOnlyReadOnly[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( HasOnlyReadOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index c4e8b83c222..2d2961effa0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -34,7 +34,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableMessage[ typing.Union[ schemas.NoneClass, @@ -44,7 +44,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NullableMessage[ @@ -130,12 +130,12 @@ def __new__( DictInput, HealthCheckResult[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HealthCheckResult[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( HealthCheckResult[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 4f8db5e79bd..0a157d150e1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -90,12 +90,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -128,7 +128,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> IsoscelesTriangle[ typing.Union[ frozendict.frozendict, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( IsoscelesTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index 24afe39451e..30c81a097d6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -40,12 +40,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 424729aeafe..812eaa63fc2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -30,7 +30,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[ typing.Union[ frozendict.frozendict, @@ -46,7 +46,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items[ @@ -107,12 +107,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequest[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( JSONPatchRequest[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index f0ee7ff0c7f..52e19920bbf 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -166,12 +166,12 @@ def __new__( DictInput4, JSONPatchRequestAddReplaceTest[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestAddReplaceTest[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( JSONPatchRequestAddReplaceTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index be5d0d71fdb..abc283c72c1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -121,12 +121,12 @@ def __new__( DictInput3, JSONPatchRequestMoveCopy[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestMoveCopy[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( JSONPatchRequestMoveCopy[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index 498834e0bd8..74fd8f88a65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -105,12 +105,12 @@ def __new__( DictInput3, JSONPatchRequestRemove[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JSONPatchRequestRemove[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( JSONPatchRequestRemove[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index dfc382be380..daa0b7fc08a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -44,7 +44,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Mammal[ typing.Union[ frozendict.frozendict, @@ -60,7 +60,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Mammal[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index 98a08d892af..fbfcdc7e7ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -40,12 +40,12 @@ def __new__( DictInput, AdditionalProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties[frozendict.frozendict], @@ -83,12 +83,12 @@ def __new__( DictInput2, MapMapOfString[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapMapOfString[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapMapOfString[frozendict.frozendict], @@ -151,12 +151,12 @@ def __new__( DictInput3, MapOfEnumString[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapOfEnumString[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapOfEnumString[frozendict.frozendict], @@ -194,12 +194,12 @@ def __new__( DictInput4, DirectMap[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DirectMap[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( DirectMap[frozendict.frozendict], @@ -267,12 +267,12 @@ def __new__( DictInput5, MapTest[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MapTest[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MapTest[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 6e3cb43c950..a86f414bed7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -34,12 +34,12 @@ def __new__( DictInput, Map[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Map[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Map[frozendict.frozendict], @@ -132,12 +132,12 @@ def __new__( DictInput2, MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index f75a49a1d1c..0e895094b5c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -75,12 +75,12 @@ def __new__( DictInput, Money[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Money[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Money[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index c05954b9031..71cb48e19db 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -107,7 +107,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Name[ typing.Union[ frozendict.frozendict, @@ -123,7 +123,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Name[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 65323f97672..6419decfc6c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -92,12 +92,12 @@ def __new__( DictInput3, NoAdditionalProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NoAdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NoAdditionalProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index b2bbc62656c..6f31c5ed383 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -36,7 +36,7 @@ def __new__( DictInput10, AdditionalProperties4[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties4[ typing.Union[ schemas.NoneClass, @@ -46,7 +46,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties4[ @@ -85,7 +85,7 @@ def __new__( decimal.Decimal, int ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> IntegerProp[ typing.Union[ schemas.NoneClass, @@ -95,7 +95,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( IntegerProp[ @@ -134,7 +134,7 @@ def __new__( int, float ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NumberProp[ typing.Union[ schemas.NoneClass, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NumberProp[ @@ -181,7 +181,7 @@ def __new__( None, bool ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BooleanProp[ typing.Union[ schemas.NoneClass, @@ -191,7 +191,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( BooleanProp[ @@ -228,7 +228,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringProp[ typing.Union[ schemas.NoneClass, @@ -238,7 +238,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( StringProp[ @@ -278,7 +278,7 @@ def __new__( str, datetime.date ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateProp[ typing.Union[ schemas.NoneClass, @@ -288,7 +288,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( DateProp[ @@ -328,7 +328,7 @@ def __new__( str, datetime.datetime ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DatetimeProp[ typing.Union[ schemas.NoneClass, @@ -338,7 +338,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( DatetimeProp[ @@ -379,7 +379,7 @@ def __new__( list, tuple ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayNullableProp[ typing.Union[ schemas.NoneClass, @@ -389,7 +389,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayNullableProp[ @@ -428,7 +428,7 @@ def __new__( DictInput2, Items2[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[ typing.Union[ schemas.NoneClass, @@ -438,7 +438,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items2[ @@ -477,7 +477,7 @@ def __new__( list, tuple ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayAndItemsNullableProp[ typing.Union[ schemas.NoneClass, @@ -487,7 +487,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayAndItemsNullableProp[ @@ -526,7 +526,7 @@ def __new__( DictInput3, Items3[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items3[ typing.Union[ schemas.NoneClass, @@ -536,7 +536,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Items3[ @@ -574,12 +574,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayItemsNullable[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ArrayItemsNullable[tuple], @@ -633,7 +633,7 @@ def __new__( DictInput5, ObjectNullableProp[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectNullableProp[ typing.Union[ schemas.NoneClass, @@ -643,7 +643,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectNullableProp[ @@ -682,7 +682,7 @@ def __new__( DictInput6, AdditionalProperties2[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties2[ typing.Union[ schemas.NoneClass, @@ -692,7 +692,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties2[ @@ -750,7 +750,7 @@ def __new__( DictInput7, ObjectAndItemsNullableProp[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectAndItemsNullableProp[ typing.Union[ schemas.NoneClass, @@ -760,7 +760,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectAndItemsNullableProp[ @@ -799,7 +799,7 @@ def __new__( DictInput8, AdditionalProperties3[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalProperties3[ typing.Union[ schemas.NoneClass, @@ -809,7 +809,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AdditionalProperties3[ @@ -859,12 +859,12 @@ def __new__( DictInput9, ObjectItemsNullable[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectItemsNullable[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectItemsNullable[frozendict.frozendict], @@ -1119,12 +1119,12 @@ def __new__( DictInput11, NullableClass[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableClass[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NullableClass[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index ca5a3991097..0ccc4aef75d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -38,7 +38,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableShape[ typing.Union[ frozendict.frozendict, @@ -54,7 +54,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NullableShape[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index bd97de75715..9eb2cd949d2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -39,7 +39,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NullableString[ typing.Union[ schemas.NoneClass, @@ -49,7 +49,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NullableString[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index f67ead9ebb4..b3ec01a0680 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -77,12 +77,12 @@ def __new__( DictInput, NumberOnly[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NumberOnly[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( NumberOnly[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 47a6dd9bc14..a2047925381 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -86,12 +86,12 @@ def __new__( DictInput, ObjWithRequiredProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjWithRequiredProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 274d1ca6dd5..daa7216b1b7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -82,12 +82,12 @@ def __new__( DictInput, ObjWithRequiredPropsBase[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjWithRequiredPropsBase[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjWithRequiredPropsBase[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 498cd273853..8fc3c471178 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -97,12 +97,12 @@ def __new__( DictInput, ObjectModelWithArgAndArgsProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithArgAndArgsProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectModelWithArgAndArgsProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 1d626589258..eeb5e08f89f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -68,12 +68,12 @@ def __new__( DictInput, ObjectModelWithRefProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectModelWithRefProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectModelWithRefProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 30e38e4bafe..d14fa946af2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -127,12 +127,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -165,7 +165,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ typing.Union[ frozendict.frozendict, @@ -181,7 +181,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index 0cdb55e79e7..d024088c522 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -91,12 +91,12 @@ def __new__( DictInput3, ObjectWithCollidingProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithCollidingProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithCollidingProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 2918e7694cb..ec93d5c2492 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -67,12 +67,12 @@ def __new__( DictInput, ObjectWithDecimalProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDecimalProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithDecimalProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index d9e9704d5f6..48d0a8b8309 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -102,12 +102,12 @@ def __new__( DictInput, ObjectWithDifficultlyNamedProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithDifficultlyNamedProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 9ab3901be60..94b7fbcd87c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SomeProp[ @@ -171,12 +171,12 @@ def __new__( DictInput2, ObjectWithInlineCompositionProperty[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInlineCompositionProperty[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithInlineCompositionProperty[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index fc6c87a644e..150694396b5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -66,12 +66,12 @@ def __new__( DictInput, ObjectWithInvalidNamedRefedProperties[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithInvalidNamedRefedProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index d3b4db2f37c..65fd9e8da4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -75,12 +75,12 @@ def __new__( DictInput, ObjectWithOptionalTestProp[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithOptionalTestProp[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithOptionalTestProp[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index 3d81c06f2e0..e2c27bf8685 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -34,12 +34,12 @@ def __new__( DictInput, ObjectWithValidations[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithValidations[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithValidations[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index ed36decff18..d63908c2bf4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -171,12 +171,12 @@ def __new__( DictInput, Order[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Order[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Order[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 11e5890d6fe..0550c5dde68 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -44,12 +44,12 @@ def __new__( DictInput, ParentPet[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ParentPet[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ParentPet[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 7cd28452204..0d4a6718af3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -33,12 +33,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PhotoUrls[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( PhotoUrls[tuple], @@ -70,12 +70,12 @@ def __new__( frozendict.frozendict ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Tags[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Tags[tuple], @@ -199,12 +199,12 @@ def __new__( DictInput, Pet[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pet[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Pet[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index 202632b3593..ca5dd12e266 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -43,7 +43,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Pig[ typing.Union[ frozendict.frozendict, @@ -59,7 +59,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Pig[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index bfe474f371d..55475a03062 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -65,12 +65,12 @@ def __new__( DictInput, Player[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Player[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Player[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 949810fe744..a3c3c1f018c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -43,7 +43,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Quadrilateral[ typing.Union[ frozendict.frozendict, @@ -59,7 +59,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Quadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 1de127e1cfa..f6d0a0fc210 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -118,7 +118,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> QuadrilateralInterface[ typing.Union[ frozendict.frozendict, @@ -134,7 +134,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( QuadrilateralInterface[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index fbe56b859ce..34a6ac89893 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -85,12 +85,12 @@ def __new__( DictInput, ReadOnlyFirst[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReadOnlyFirst[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ReadOnlyFirst[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 697b053f9bd..dcae10106ed 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -79,12 +79,12 @@ def __new__( DictInput, ReqPropsFromExplicitAddProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromExplicitAddProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ReqPropsFromExplicitAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index 55cd3d6708d..f0ace10fd01 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -167,12 +167,12 @@ def __new__( DictInput2, ReqPropsFromTrueAddProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromTrueAddProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ReqPropsFromTrueAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index 6f3588b1999..7871037ecc9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -158,12 +158,12 @@ def __new__( DictInput, ReqPropsFromUnsetAddProps[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ReqPropsFromUnsetAddProps[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ReqPropsFromUnsetAddProps[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index afe40462de6..5d6875ad447 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -90,12 +90,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -128,7 +128,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ScaleneTriangle[ typing.Union[ frozendict.frozendict, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ScaleneTriangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index f12cb9aa845..ca334be603c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -36,12 +36,12 @@ def __new__( tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SelfReferencingArrayModel[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SelfReferencingArrayModel[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index 72c10823ce3..6baa205c3ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -50,12 +50,12 @@ def __new__( DictInput, SelfReferencingObjectModel[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SelfReferencingObjectModel[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SelfReferencingObjectModel[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index 0b2152b0978..a9a33053af3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -43,7 +43,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Shape[ typing.Union[ frozendict.frozendict, @@ -59,7 +59,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Shape[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 3b08344310e..8babf55cfb1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ShapeOrNull[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ShapeOrNull[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 3c8e9d348ee..9fd3c3bd9ef 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -90,12 +90,12 @@ def __new__( DictInput, _1[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( _1[frozendict.frozendict], @@ -128,7 +128,7 @@ def __new__( DictInput2, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SimpleQuadrilateral[ typing.Union[ frozendict.frozendict, @@ -144,7 +144,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SimpleQuadrilateral[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index 6e222f849ee..519eefa206d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -35,7 +35,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeObject[ typing.Union[ frozendict.frozendict, @@ -51,7 +51,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SomeObject[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index e8f1b08633f..e689a3706cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -77,12 +77,12 @@ def __new__( DictInput, SpecialModelName[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SpecialModelName[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SpecialModelName[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index e7673982446..b9054c57f58 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -45,12 +45,12 @@ def __new__( DictInput, StringBooleanMap[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringBooleanMap[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( StringBooleanMap[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index 2e3489ab724..d5d219b3e52 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -78,7 +78,7 @@ def __new__( None, str ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> StringEnum[ typing.Union[ schemas.NoneClass, @@ -88,7 +88,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( StringEnum[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 3b95f0dfbaa..e5d53077b46 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -86,12 +86,12 @@ def __new__( DictInput, Tag[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Tag[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Tag[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index 751de8a83ae..6cc3283e11d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -44,7 +44,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Triangle[ typing.Union[ frozendict.frozendict, @@ -60,7 +60,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Triangle[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index d30b4a0e8c9..bf62cea3ec7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -118,7 +118,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> TriangleInterface[ typing.Union[ frozendict.frozendict, @@ -134,7 +134,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( TriangleInterface[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index bc0fe1f2856..ba1248fb87e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -46,7 +46,7 @@ def __new__( DictInput2, ObjectWithNoDeclaredPropsNullable[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectWithNoDeclaredPropsNullable[ typing.Union[ schemas.NoneClass, @@ -56,7 +56,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( ObjectWithNoDeclaredPropsNullable[ @@ -92,7 +92,7 @@ def __new__( DictInput4, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyTypeExceptNullProp[ typing.Union[ frozendict.frozendict, @@ -108,7 +108,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( AnyTypeExceptNullProp[ @@ -390,12 +390,12 @@ def __new__( DictInput6, User[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> User[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( User[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 17fdbe70fe8..8dae2746749 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -122,12 +122,12 @@ def __new__( DictInput, Whale[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Whale[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Whale[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index e00a8514275..f51a2d4ff47 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -165,12 +165,12 @@ def __new__( DictInput2, Zebra[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Zebra[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Zebra[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 0b0100e6c9d..a6444b113e7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -57,12 +57,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 0b0100e6c9d..a6444b113e7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -57,12 +57,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index cd521f3ae6a..2c685798b0a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -57,12 +57,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumFormStringArray[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( EnumFormStringArray[tuple], @@ -174,12 +174,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 40e7f96854e..3b881af06d0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -358,12 +358,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index 0ce950d68de..ed3b0efe6cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -40,12 +40,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index f4d6b3ab843..3ba836edc2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index e5d7ebed000..c511b637709 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SomeProp[ @@ -166,12 +166,12 @@ def __new__( DictInput2, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index f4d6b3ab843..3ba836edc2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index e5d7ebed000..c511b637709 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SomeProp[ @@ -166,12 +166,12 @@ def __new__( DictInput2, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index f4d6b3ab843..3ba836edc2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index e5d7ebed000..c511b637709 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -46,7 +46,7 @@ def __new__( DictInput, schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SomeProp[ typing.Union[ frozendict.frozendict, @@ -62,7 +62,7 @@ def __new__( inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( SomeProp[ @@ -166,12 +166,12 @@ def __new__( DictInput2, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 6541405dd3a..ce8e6e45c6d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -92,12 +92,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 6006d02a76e..1ac5a4cfea6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -70,12 +70,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 9f14b0e7473..57b7408eb89 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -89,12 +89,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index ecbaada1b4e..cd06892d4a8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -89,12 +89,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index 784d420e3ac..5041eaf1c9b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -33,12 +33,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Files[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Files[tuple], @@ -109,12 +109,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index 93422e411af..a419a0a2578 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -53,12 +53,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index d201c569f30..add1d9245e4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -87,12 +87,12 @@ def __new__( DictInput3, Variables[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Variables[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index c2f118e2987..907cae35ac7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -62,12 +62,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index d201c569f30..add1d9245e4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -87,12 +87,12 @@ def __new__( DictInput3, Variables[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Variables[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index 5acdd4a2d80..7485f322135 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -31,12 +31,12 @@ def __new__( str ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[tuple]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[tuple], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index dd15ddbe0b6..bf98a57d3fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -80,12 +80,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 55b262f346a..8e30315013a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -82,12 +82,12 @@ def __new__( DictInput, Schema[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Schema[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py index 7ca8c92a811..b6c3c356752 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py @@ -1365,7 +1365,7 @@ def from_openapi_data_( io.BufferedReader, bytes ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ): """ Schema from_openapi_data_ @@ -1376,7 +1376,7 @@ def from_openapi_data_( cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) ) path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) @@ -1422,7 +1422,7 @@ def __new__( io.BufferedReader, 'Schema', ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ Unset, dict, @@ -1450,7 +1450,7 @@ def __new__( Args: arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables @@ -1472,7 +1472,7 @@ def __new__( __arg, __from_server, __validated_path_to_schemas, ('args[0]',), __path_to_type) __validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(__validated_path_to_schemas) ) __path_to_schemas = cls.__get_new_cls(cast_arg, __validation_metadata, __path_to_type) @@ -2132,8 +2132,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg, **kwargs) @@ -2149,8 +2149,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) @classmethod - def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: None, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: return super().__new__(cls, arg, **kwargs) @@ -2170,8 +2170,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Union[int, float], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: return super().__new__(cls, arg, **kwargs) @@ -2196,8 +2196,8 @@ class Schema_(metaclass=SingletonMeta): format: str = 'int' @classmethod - def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: int, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2239,8 +2239,8 @@ class Schema_(metaclass=SingletonMeta): format: str = 'float' @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2256,8 +2256,8 @@ class Schema_(metaclass=SingletonMeta): format: str = 'double' @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: inst = super().__new__(cls, arg, **kwargs) @@ -2280,8 +2280,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) @classmethod - def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: str, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: return super().__new__(cls, arg, **kwargs) @@ -2412,8 +2412,8 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) @classmethod - def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: bool, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: return super().__new__(cls, arg, **kwargs) @@ -2454,7 +2454,7 @@ def __new__( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ str, uuid.UUID, @@ -2482,7 +2482,7 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *arg, configuration_=configuration_, **kwargs) + return super().__new__(cls, *arg, configuration=configuration, **kwargs) def __init__( self, @@ -2504,7 +2504,7 @@ def __init__( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[ str, uuid.UUID, @@ -2549,9 +2549,9 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, *arg, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *arg, configuration_=configuration_) + inst = super().__new__(cls, *arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2565,16 +2565,16 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) + def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return super().from_openapi_data_(arg, configuration=configuration) def __new__( cls, *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *arg, **kwargs, configuration_=configuration_) + return super().__new__(cls, *arg, **kwargs, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 09866f3a008..6b80e29790d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -133,12 +133,12 @@ def __new__( DictInput3, Variables[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Variables[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index 73c866dabaa..efcef2b8e5a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -87,12 +87,12 @@ def __new__( DictInput3, Variables[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Variables[frozendict.frozendict]: inst = super().__new__( cls, arg, - configuration_=configuration_, + configuration=configuration, ) inst = typing.cast( Variables[frozendict.frozendict], diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py index 60a96e8e213..62766344bed 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py @@ -179,7 +179,7 @@ def test_list_validate_direct_instantiation(self): side_effect=array_with_validations_in_items.Items._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - array_with_validations_in_items.ArrayWithValidationsInItems([7], configuration_=used_configuration) + array_with_validations_in_items.ArrayWithValidationsInItems([7], configuration=used_configuration) mock_outer_validate.assert_called_once_with( (Decimal("7"),), validation_metadata=ValidationMetadata(path_to_item=("args[0]",), configuration=used_configuration) @@ -203,7 +203,7 @@ def test_list_validate_direct_instantiation_cast_item(self): side_effect=array_with_validations_in_items.Items._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - array_with_validations_in_items.ArrayWithValidationsInItems([item], configuration_=used_configuration) + array_with_validations_in_items.ArrayWithValidationsInItems([item], configuration=used_configuration) mock_outer_validate.assert_called_once_with( tuple([Decimal('7')]), validation_metadata=ValidationMetadata( @@ -226,7 +226,7 @@ def test_list_validate_from_openai_data_instantiation(self): side_effect=array_with_validations_in_items.Items._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - array_with_validations_in_items.ArrayWithValidationsInItems.from_openapi_data_([7], configuration_=used_configuration) + array_with_validations_in_items.ArrayWithValidationsInItems.from_openapi_data_([7], configuration=used_configuration) mock_outer_validate.assert_called_once_with( (Decimal("7"),), validation_metadata=ValidationMetadata(path_to_item=("args[0]",), configuration=used_configuration) @@ -244,7 +244,7 @@ def test_dict_validate_direct_instantiation(self): side_effect=Bar._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - Foo({'bar': "a"}, configuration_=used_configuration) + Foo({'bar': "a"}, configuration=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict({"bar": "a"}), validation_metadata=ValidationMetadata( @@ -270,7 +270,7 @@ def test_dict_validate_direct_instantiation_cast_item(self): "_validate", side_effect=Bar._validate, ) as mock_inner_validate: - Foo({'bar': bar}, configuration_=used_configuration) + Foo({'bar': bar}, configuration=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict(dict(bar='a')), validation_metadata=ValidationMetadata( @@ -289,7 +289,7 @@ def test_dict_validate_from_openapi_data_instantiation(self): side_effect=Bar._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - Foo.from_openapi_data_({"bar": "a"}, configuration_=used_configuration) + Foo.from_openapi_data_({"bar": "a"}, configuration=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict({"bar": "a"}), validation_metadata=ValidationMetadata( From aebb488c14e964a299103b7147ec472d9d8e8e01 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 15:13:19 -0700 Subject: [PATCH 31/36] Removes 'from_openapi_data_' --- .../src/main/resources/python/api_client.hbs | 12 +- .../python/components/schemas/schema_test.hbs | 4 +- ...helper_operation_test_response_content.hbs | 2 +- .../python/paths/path/verb/operation_test.hbs | 4 +- .../src/main/resources/python/schemas.hbs | 284 +++++++---------- .../main/resources/python/servers/server.hbs | 2 +- .../python/src/petstore_api/api_client.py | 12 +- .../paths/foo/get/servers/server_1.py | 2 +- .../pet_find_by_status/servers/server_1.py | 2 +- .../python/src/petstore_api/schemas.py | 300 +++++++----------- .../src/petstore_api/servers/server_0.py | 2 +- .../src/petstore_api/servers/server_1.py | 2 +- .../tests_manual/test_any_type_schema.py | 2 +- .../test_composed_one_of_different_types.py | 4 +- .../test_date_time_with_validations.py | 16 +- .../test_date_with_validations.py | 19 +- .../python/tests_manual/test_fruit.py | 2 +- .../python/tests_manual/test_json_encoder.py | 4 +- ...ect_with_invalid_named_refed_properties.py | 7 +- .../python/tests_manual/test_validate.py | 10 +- 20 files changed, 267 insertions(+), 425 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs index 41d53b3d221..c253ccb0e5f 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs @@ -717,13 +717,13 @@ class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): """ if cls.style: extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.from_openapi_data_(extracted_data) + return cls.schema(extracted_data) assert cls.content is not None for content_type, media_type in cls.content.items(): if cls._content_type_is_json(content_type): cast_in_data = json.loads(in_data) assert media_type.schema is not None - return media_type.schema.from_openapi_data_(cast_in_data) + return media_type.schema(cast_in_data) else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') @@ -938,8 +938,12 @@ class OpenApiResponse(JSONDetector, TypedDictInputVerifier, typing.Generic[T]): content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_( - body_data, configuration=configuration) + body_schema = schemas._get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema(body_data) + else: + deserialized_body = body_schema( + body_data, configuration=configuration) elif streamed: response.release_conn() diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs index 2f3a629da3a..e9c9fa002e4 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/schema_test.hbs @@ -19,7 +19,7 @@ class Test{{jsonPathPiece.camelCase}}(unittest.TestCase): def test_{{@key}}_{{#if valid}}passes{{else}}fails{{/if}}(self): # {{description}} {{#if valid}} - {{jsonPathPiece.camelCase}}.from_openapi_data_( + {{jsonPathPiece.camelCase}}( {{#with data}} {{> components/schemas/_helper_payload_renderer endChar=',' }} {{/with}} @@ -27,7 +27,7 @@ class Test{{jsonPathPiece.camelCase}}(unittest.TestCase): ) {{else}} with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): - {{jsonPathPiece.camelCase}}.from_openapi_data_( + {{jsonPathPiece.camelCase}}( {{#with data}} {{> components/schemas/_helper_payload_renderer endChar=','}} {{/with}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs index 396b7d4cd59..7d2f0e05627 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_test_response_content.hbs @@ -27,7 +27,7 @@ def test_{{@key}}_{{#if valid}}passes{{else}}fails{{/if}}(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, configuration=self.schema_config ) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs index 8bcb52759cc..cdbf4b95f49 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation_test.hbs @@ -87,7 +87,7 @@ class Test{{httpMethod.camelCase}}(ApiTestMixin, unittest.TestCase): {{/with}} ) {{#if valid}} - body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema.from_openapi_data_( + body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema( payload, configuration=self.schema_config ) @@ -101,7 +101,7 @@ class Test{{httpMethod.camelCase}}(ApiTestMixin, unittest.TestCase): assert isinstance(api_response.body, schemas.Unset) {{else}} with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): - body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema.from_openapi_data_( + body = {{httpMethod.original}}.request_body.RequestBody.content["{{{../@key.original}}}"].schema( payload, configuration=self.schema_config ) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index 8477d0de353..5123004c430 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -1491,89 +1491,29 @@ class Schema(typing.Generic[T]): used_arg = arg return super_cls.__new__(cls, used_arg) - @classmethod - def from_openapi_data_( - cls, - arg: typing.Union[ - str, - int, - float, - bool, - None, - dict, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - """ - Schema from_openapi_data_ - """ - from_server = True - validated_path_to_schemas = {} - path_to_type = {} - cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - @staticmethod def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} def __new__( cls, - *arg: typing.Union[ + arg: typing.Union[ {{> _helper_types_all_incl_schema }} ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - Unset, - {{> _helper_types_all_incl_schema }} - ] ): """ Schema __new__ Args: arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables are instance properties if they are named normally :( """ - __kwargs = cls.__remove_unsets(kwargs) - if not arg and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and arg and not isinstance(arg[0], dict): - __arg = arg[0] - else: - __arg = cls.__get_input_dict(*arg, **__kwargs) + __arg = arg __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -2218,12 +2158,12 @@ class ListSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Sequence[typing.Any], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ListSchema[tuple]: + return super().__new__(cls, arg, configuration=configuration) class NoneSchema( @@ -2235,12 +2175,12 @@ class NoneSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) - @classmethod - def from_openapi_data_(cls, arg: None, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, configuration=configuration) class NumberSchema( @@ -2256,12 +2196,12 @@ class NumberSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) - @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, configuration=configuration) class IntBase: @@ -2282,12 +2222,12 @@ class IntSchema(IntBase, NumberSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int' - @classmethod - def from_openapi_data_(cls, arg: int, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2299,8 +2239,12 @@ class Int32Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2312,8 +2256,12 @@ class Int64Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2325,12 +2273,12 @@ class Float32Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'float' - @classmethod - def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2342,12 +2290,12 @@ class Float64Schema( types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'double' - @classmethod - def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2366,12 +2314,12 @@ class StrSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) - @classmethod - def from_openapi_data_(cls, arg: str, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StrSchema[str]: + return super().__new__(cls, arg, configuration=configuration) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2380,8 +2328,12 @@ class UUIDSchema(UUIDBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(UUIDSchema[str], inst) @@ -2391,8 +2343,12 @@ class DateSchema(DateBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateSchema[str], inst) @@ -2402,8 +2358,12 @@ class DateTimeSchema(DateTimeBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateTimeSchema[str], inst) @@ -2413,7 +2373,11 @@ class DecimalSchema(DecimalBase, StrSchema[T]): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2422,7 +2386,7 @@ class DecimalSchema(DecimalBase, StrSchema[T]): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg, **kwargs) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DecimalSchema[str], inst) @@ -2437,7 +2401,11 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) return super_cls.__new__(cls, arg) @@ -2466,7 +2434,11 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) return super_cls.__new__(cls, arg) @@ -2485,7 +2457,11 @@ class BinarySchema( FileSchema, ) - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BinarySchema[typing.Union[FileIO, bytes]]: return super().__new__(cls, arg) @@ -2498,12 +2474,12 @@ class BoolSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) - @classmethod - def from_openapi_data_(cls, arg: bool, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BoolSchema[bool]: + return super().__new__(cls, arg, configuration=configuration) class AnyTypeSchema( @@ -2523,7 +2499,7 @@ class AnyTypeSchema( def __new__( cls, - *arg: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2541,26 +2517,7 @@ class AnyTypeSchema( io.FileIO, io.BufferedReader ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader, - Unset - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> AnyTypeSchema[typing.Union[ NoneClass, frozendict.frozendict, @@ -2569,11 +2526,11 @@ class AnyTypeSchema( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *arg, configuration=configuration, **kwargs) + return super().__new__(cls, arg, configuration=configuration) def __init__( self, - *arg: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2592,24 +2549,6 @@ class AnyTypeSchema( io.BufferedReader ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader - ], ): """ this exists to override the __init__ method form FileIO in NoneFrozenDictTupleStrDecimalBoolFileBytesMixin @@ -2635,10 +2574,10 @@ class NotAnyTypeSchema(AnyTypeSchema[T]): def __new__( cls, - *arg, + arg, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *arg, configuration=configuration) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2651,17 +2590,12 @@ class DictSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) - @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - def __new__( cls, - *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *arg, **kwargs, configuration=configuration) + return super().__new__(cls, arg, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/servers/server.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/servers/server.hbs index 18435f062fc..8f2d34ef5d4 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/servers/server.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/servers/server.hbs @@ -22,7 +22,7 @@ class {{jsonPathPiece.camelCase}}(server.Server{{#if variables}}With{{else}}With ''' {{/if}} {{#if variables}} - variables: Variables[frozendict.frozendict] = Variables.from_openapi_data_({ + variables: Variables[frozendict.frozendict] = Variables({ {{#with variables}} {{#each properties}} "{{{@key.original}}}": {{jsonPathPiece.camelCase}}.Schema_.default, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py index b9a17ec991a..56888878eed 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py @@ -719,13 +719,13 @@ def deserialize( """ if cls.style: extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.from_openapi_data_(extracted_data) + return cls.schema(extracted_data) assert cls.content is not None for content_type, media_type in cls.content.items(): if cls._content_type_is_json(content_type): cast_in_data = json.loads(in_data) assert media_type.schema is not None - return media_type.schema.from_openapi_data_(cast_in_data) + return media_type.schema(cast_in_data) else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') @@ -940,8 +940,12 @@ def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_confi content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_( - body_data, configuration=configuration) + body_schema = schemas._get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema(body_data) + else: + deserialized_body = body_schema( + body_data, configuration=configuration) elif streamed: response.release_conn() diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py index add1d9245e4..c6a21dbf3c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/servers/server_1.py @@ -104,7 +104,7 @@ def __new__( @dataclasses.dataclass class Server1(server.ServerWithVariables): - variables: Variables[frozendict.frozendict] = Variables.from_openapi_data_({ + variables: Variables[frozendict.frozendict] = Variables({ "version": Version.Schema_.default, }) variables_cls: typing.Type[Variables] = Variables diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py index add1d9245e4..c6a21dbf3c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/servers/server_1.py @@ -104,7 +104,7 @@ def __new__( @dataclasses.dataclass class Server1(server.ServerWithVariables): - variables: Variables[frozendict.frozendict] = Variables.from_openapi_data_({ + variables: Variables[frozendict.frozendict] = Variables({ "version": Version.Schema_.default, }) variables_cls: typing.Type[Variables] = Variables diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py index b6c3c356752..a3e6ee2e0a4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py @@ -1350,60 +1350,13 @@ def _get_new_instance_without_conversion( used_arg = arg return super_cls.__new__(cls, used_arg) - @classmethod - def from_openapi_data_( - cls, - arg: typing.Union[ - str, - int, - float, - bool, - None, - dict, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - """ - Schema from_openapi_data_ - """ - from_server = True - validated_path_to_schemas = {} - path_to_type = {} - cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - @staticmethod def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} def __new__( cls, - *arg: typing.Union[ + arg: typing.Union[ dict, frozendict.frozendict, list, @@ -1423,48 +1376,19 @@ def __new__( 'Schema', ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - Unset, - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - 'Schema', - ] ): """ Schema __new__ Args: arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables are instance properties if they are named normally :( """ - __kwargs = cls.__remove_unsets(kwargs) - if not arg and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and arg and not isinstance(arg[0], dict): - __arg = arg[0] - else: - __arg = cls.__get_input_dict(*arg, **__kwargs) + __arg = arg __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -2131,12 +2055,12 @@ class ListSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Sequence[typing.Any], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ListSchema[tuple]: + return super().__new__(cls, arg, configuration=configuration) class NoneSchema( @@ -2148,12 +2072,12 @@ class NoneSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) - @classmethod - def from_openapi_data_(cls, arg: None, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, configuration=configuration) class NumberSchema( @@ -2169,12 +2093,12 @@ class NumberSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) - @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, configuration=configuration) class IntBase: @@ -2195,12 +2119,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int' - @classmethod - def from_openapi_data_(cls, arg: int, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2212,8 +2136,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2225,8 +2153,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2238,12 +2170,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'float' - @classmethod - def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2255,12 +2187,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'double' - @classmethod - def from_openapi_data_(cls, arg: float, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2279,12 +2211,12 @@ class StrSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) - @classmethod - def from_openapi_data_(cls, arg: str, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StrSchema[str]: + return super().__new__(cls, arg, configuration=configuration) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2293,8 +2225,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(UUIDSchema[str], inst) @@ -2304,8 +2240,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateSchema[str], inst) @@ -2315,8 +2255,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateTimeSchema[str], inst) @@ -2326,7 +2270,11 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2335,7 +2283,7 @@ def __new__(cls, arg: str, **kwargs: schema_configuration.SchemaConfiguration) - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg, **kwargs) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DecimalSchema[str], inst) @@ -2350,7 +2298,11 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) return super_cls.__new__(cls, arg) @@ -2379,7 +2331,11 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) return super_cls.__new__(cls, arg) @@ -2398,7 +2354,11 @@ class Schema_(metaclass=SingletonMeta): FileSchema, ) - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BinarySchema[typing.Union[FileIO, bytes]]: return super().__new__(cls, arg) @@ -2411,12 +2371,12 @@ class BoolSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) - @classmethod - def from_openapi_data_(cls, arg: bool, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - - def __new__(cls, arg: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg, **kwargs) + def __new__( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BoolSchema[bool]: + return super().__new__(cls, arg, configuration=configuration) class AnyTypeSchema( @@ -2436,7 +2396,7 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *arg: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2454,26 +2414,7 @@ def __new__( io.FileIO, io.BufferedReader ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader, - Unset - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> AnyTypeSchema[typing.Union[ NoneClass, frozendict.frozendict, @@ -2482,11 +2423,11 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *arg, configuration=configuration, **kwargs) + return super().__new__(cls, arg, configuration=configuration) def __init__( self, - *arg: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2505,24 +2446,6 @@ def __init__( io.BufferedReader ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader - ], ): """ this exists to override the __init__ method form FileIO in NoneFrozenDictTupleStrDecimalBoolFileBytesMixin @@ -2548,10 +2471,10 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *arg, + arg, configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *arg, configuration=configuration) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2564,17 +2487,12 @@ class DictSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) - @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration=configuration) - def __new__( cls, - *arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *arg, **kwargs, configuration=configuration) + return super().__new__(cls, arg, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py index 6b80e29790d..cf87e669ae9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_0.py @@ -153,7 +153,7 @@ class Server0(server.ServerWithVariables): ''' petstore server ''' - variables: Variables[frozendict.frozendict] = Variables.from_openapi_data_({ + variables: Variables[frozendict.frozendict] = Variables({ "server": Server.Schema_.default, "port": Port.Schema_.default, }) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py index efcef2b8e5a..b4920fb4c53 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/servers/server_1.py @@ -107,7 +107,7 @@ class Server1(server.ServerWithVariables): ''' The local server ''' - variables: Variables[frozendict.frozendict] = Variables.from_openapi_data_({ + variables: Variables[frozendict.frozendict] = Variables({ "version": Version.Schema_.default, }) variables_cls: typing.Type[Variables] = Variables diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py index 16fd7a3e043..560cfd60f92 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py @@ -47,7 +47,7 @@ class Schema_: DictSchema, ) - m = Model(a=1, b='hi') + m = Model({'a': 1, 'b': 'hi'}) assert isinstance(m, Model) assert isinstance(m, AnyTypeSchema) assert isinstance(m, DictSchema) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py index 926ea796b92..43994b404d9 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py @@ -59,7 +59,7 @@ def test_ComposedOneOfDifferentTypes(self): assert inst.is_none_() is True # date - inst = ComposedOneOfDifferentTypes.from_openapi_data_('2019-01-10') + inst = ComposedOneOfDifferentTypes('2019-01-10') assert isinstance(inst, ComposedOneOfDifferentTypes) assert isinstance(inst, DateSchema) assert isinstance(inst, str) @@ -77,7 +77,7 @@ def test_ComposedOneOfDifferentTypes(self): assert inst.as_date_.day == 10 # date-time - inst = ComposedOneOfDifferentTypes.from_openapi_data_('2020-01-02T03:04:05Z') + inst = ComposedOneOfDifferentTypes('2020-01-02T03:04:05Z') assert isinstance(inst, ComposedOneOfDifferentTypes) assert isinstance(inst, DateTimeSchema) assert isinstance(inst, str) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py index 8af6233f888..f8bee456b0b 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py @@ -36,22 +36,14 @@ def testDateTimeWithValidations(self): inst = DateTimeWithValidations(valid_value) assert inst == expected_datetime - # when passing data in with from_openapi_data_ one must use str - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"Invalid type. Required value type is str and passed " - r"type was at \('args\[0\]',\)" - ): - DateTimeWithValidations.from_openapi_data_(datetime(2020, 1, 1)) - - # when passing data from_openapi_data_ we can use str + # various formats work input_value_to_datetime = { "2020-01-01T00:00:00": datetime(2020, 1, 1, tzinfo=None), "2020-01-01T00:00:00Z": datetime(2020, 1, 1, tzinfo=timezone.utc), "2020-01-01T00:00:00+00:00": datetime(2020, 1, 1, tzinfo=timezone.utc) } for input_value, expected_datetime in input_value_to_datetime.items(): - inst = DateTimeWithValidations.from_openapi_data_(input_value) + inst = DateTimeWithValidations(input_value) assert inst.as_datetime_ == expected_datetime # value error is raised if an invalid string is passed in @@ -59,7 +51,7 @@ def testDateTimeWithValidations(self): petstore_api.ApiValueError, r"Value does not conform to the required ISO-8601 datetime format. Invalid value 'abcd' for type datetime at \('args\[0\]',\)" ): - DateTimeWithValidations.from_openapi_data_("abcd") + DateTimeWithValidations("abcd") # value error is raised if a date is passed in with self.assertRaisesRegex( @@ -74,7 +66,7 @@ def testDateTimeWithValidations(self): petstore_api.ApiValueError, error_regex ): - DateTimeWithValidations.from_openapi_data_("2019-01-01T00:00:00Z") + DateTimeWithValidations("2019-01-01T00:00:00Z") # pattern checking with date input error_regex = r"Invalid value `2019-01-01T00:00:00`, must match regular expression `.+?` at \('args\[0\]',\)" with self.assertRaisesRegex( diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py index c629ea151ef..aba06e8085f 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py @@ -36,20 +36,11 @@ def testDateWithValidations(self): inst = DateWithValidations(valid_value) assert inst == expected_date - # when passing data in with from_openapi_data_ one must use str - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"Invalid type. Required value type is str and passed " - r"type was at \('args\[0\]',\)" - - ): - DateWithValidations.from_openapi_data_(date(2020, 1, 1)) - - # when passing data in from the server we can use str + # various formats work valid_values = ["2020-01-01", "2020-01", "2020"] expected_date = date(2020, 1, 1) for valid_value in valid_values: - inst = DateWithValidations.from_openapi_data_(valid_value) + inst = DateWithValidations(valid_value) assert inst.as_date_ == expected_date # value error is raised if an invalid string is passed in @@ -57,7 +48,7 @@ def testDateWithValidations(self): petstore_api.ApiValueError, r"Value does not conform to the required ISO-8601 date format. Invalid value '2020-01-01T00:00:00Z' for type date at \('args\[0\]',\)" ): - DateWithValidations.from_openapi_data_("2020-01-01T00:00:00Z") + DateWithValidations("2020-01-01T00:00:00Z") # value error is raised if a datetime is passed in with self.assertRaisesRegex( @@ -71,7 +62,7 @@ def testDateWithValidations(self): petstore_api.ApiValueError, r"Value does not conform to the required ISO-8601 date format. Invalid value 'abcd' for type date at \('args\[0\]',\)" ): - DateWithValidations.from_openapi_data_("abcd") + DateWithValidations("abcd") # pattern checking for str input error_regex = r"Invalid value `2019-01-01`, must match regular expression `.+?` at \('args\[0\]',\)" @@ -79,7 +70,7 @@ def testDateWithValidations(self): petstore_api.ApiValueError, error_regex ): - DateWithValidations.from_openapi_data_("2019-01-01") + DateWithValidations("2019-01-01") # pattern checking for date input with self.assertRaisesRegex( petstore_api.ApiValueError, diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py index baf866b5458..75e30f46e35 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py @@ -64,7 +64,7 @@ def testFruit(self): additional_date='2021-01-02', ) - fruit = Fruit.from_openapi_data_(kwargs) + fruit = Fruit(kwargs) self.assertEqual( fruit, kwargs diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py b/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py index 7a02bdfa71d..bf5ffbbbf51 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py @@ -26,7 +26,7 @@ def test_receive_encode_str_types(self): schemas.DateTimeSchema: '2020-01-01T00:00:00' } for schema, value in schema_to_value.items(): - inst = schema.from_openapi_data_(value) + inst = schema(value) assert value == self.serializer.default(inst) def test_receive_encode_numeric_types(self): @@ -39,7 +39,7 @@ def test_receive_encode_numeric_types(self): 7.14: schemas.NumberSchema, } for value, schema in value_to_schema.items(): - inst = schema.from_openapi_data_(value) + inst = schema(value) pre_serialize_value = self.serializer.default(inst) assert value == pre_serialize_value and type(value) == type(pre_serialize_value) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py index a0df444d2a9..8027276c190 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py @@ -38,8 +38,7 @@ def test_instantiation_success(self): '!reference': (4, 5) } assert inst == primitive_data - # from_openapi_data_ works - inst = ObjectWithInvalidNamedRefedProperties.from_openapi_data_(primitive_data) + inst = ObjectWithInvalidNamedRefedProperties(primitive_data) assert inst == primitive_data def test_omitting_required_properties_fails(self): @@ -60,13 +59,13 @@ def test_omitting_required_properties_fails(self): } ) with self.assertRaises(exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties.from_openapi_data_( + ObjectWithInvalidNamedRefedProperties( { 'from': {'data': 'abc', 'id': 1}, } ) with self.assertRaises(exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties.from_openapi_data_( + ObjectWithInvalidNamedRefedProperties( { '!reference': [4, 5] } diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py index 62766344bed..a760e584204 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py @@ -150,7 +150,7 @@ def test_empty_list_validate(self): with patch.object( Schema, "_validate", return_value=return_value ) as mock_validate: - array_holding_any_type.ArrayHoldingAnyType.from_openapi_data_([]) + array_holding_any_type.ArrayHoldingAnyType([]) assert mock_validate.call_count == 1 def test_empty_dict_validate(self): @@ -164,7 +164,7 @@ def test_empty_dict_validate(self): with patch.object( Schema, "_validate", return_value=return_value ) as mock_validate: - Foo.from_openapi_data_({}) + Foo({}) assert mock_validate.call_count == 1 def test_list_validate_direct_instantiation(self): @@ -226,7 +226,7 @@ def test_list_validate_from_openai_data_instantiation(self): side_effect=array_with_validations_in_items.Items._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - array_with_validations_in_items.ArrayWithValidationsInItems.from_openapi_data_([7], configuration=used_configuration) + array_with_validations_in_items.ArrayWithValidationsInItems([7], configuration=used_configuration) mock_outer_validate.assert_called_once_with( (Decimal("7"),), validation_metadata=ValidationMetadata(path_to_item=("args[0]",), configuration=used_configuration) @@ -281,7 +281,7 @@ def test_dict_validate_direct_instantiation_cast_item(self): ) mock_inner_validate.assert_not_called() - def test_dict_validate_from_openapi_data_instantiation(self): + def test_dict_validate_instantiation_non_class_inst_data(self): with patch.object(Foo, "_validate", side_effect=Foo._validate) as mock_outer_validate: with patch.object( Bar, @@ -289,7 +289,7 @@ def test_dict_validate_from_openapi_data_instantiation(self): side_effect=Bar._validate, ) as mock_inner_validate: used_configuration = schema_configuration.SchemaConfiguration() - Foo.from_openapi_data_({"bar": "a"}, configuration=used_configuration) + Foo({"bar": "a"}, configuration=used_configuration) mock_outer_validate.assert_called_once_with( frozendict.frozendict({"bar": "a"}), validation_metadata=ValidationMetadata( From 6223163fb80015579a9dc614f2d6528d0d25aa10 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 15:57:46 -0700 Subject: [PATCH 32/36] Fixes java tests --- ...043_geometry_collection_expected_value.txt | 8 +++--- .../3_0/issue_13043_recursive_model.yaml | 1 + ...e_13043_recursive_model_expected_value.txt | 8 +++--- ...issue_7532_tree_example_value_expected.txt | 28 +++++++++---------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_geometry_collection_expected_value.txt b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_geometry_collection_expected_value.txt index 2d004d9d37e..8faf1c6e6a8 100644 --- a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_geometry_collection_expected_value.txt +++ b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_geometry_collection_expected_value.txt @@ -1,4 +1,4 @@ -geometry_collection.GeometryCollection( - type="GeometryCollection", - geometries=[], - ) \ No newline at end of file +geometry_collection.GeometryCollection({ + "type": "GeometryCollection", + "geometries": [], + }) \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model.yaml b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model.yaml index fec5944e7a2..a9771fdaf1b 100644 --- a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model.yaml +++ b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model.yaml @@ -49,6 +49,7 @@ paths: components: schemas: GeoJsonGeometry: + type: object title: GeoJsonGeometry description: GeoJSON geometry oneOf: diff --git a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model_expected_value.txt b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model_expected_value.txt index fb9d3068d74..5cf2cc8f379 100644 --- a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model_expected_value.txt +++ b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_13043_recursive_model_expected_value.txt @@ -1,4 +1,4 @@ -geo_json_geometry.GeoJsonGeometry( - type="GeometryCollection", - geometries=[], - ) \ No newline at end of file +geo_json_geometry.GeoJsonGeometry({ + "type": "GeometryCollection", + "geometries": [], + }) \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_7532_tree_example_value_expected.txt b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_7532_tree_example_value_expected.txt index db85c8b22cb..c5b7c53fffb 100644 --- a/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_7532_tree_example_value_expected.txt +++ b/modules/openapi-json-schema-generator/src/test/resources/3_0/issue_7532_tree_example_value_expected.txt @@ -1,15 +1,15 @@ -dict( - trees=tree.Tree( - id=1, - name="name_example", - description="description_example", - children=[ - tree.Tree() +{ + "trees": tree.Tree({ + "id": 1, + "name": "name_example", + "description": "description_example", + "children": [ + tree.Tree({}) ], - parent=tree.Tree(), - forest=forest.Forest(), - additional=dict( - "key": tree.Tree(), - ), - ), - ) \ No newline at end of file + "parent": tree.Tree({}), + "forest": forest.Forest({}), + "additional": { + "key": tree.Tree({}), + }, + }), + } \ No newline at end of file From 122126326b8b451aa70ac8c2255f9e920f047bcf Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 16:07:47 -0700 Subject: [PATCH 33/36] Samples regenerated --- .../python/.openapi-generator/VERSION | 2 +- .../client/3_0_3_unit_test/python/README.md | 8 +- .../python/docs/components/schema/_not.md | 4 +- .../post.md | 8 +- .../post.md | 6 +- .../post.md | 8 +- .../post.md | 2 +- .../post.md | 2 +- .../post.md | 6 +- .../post.md | 6 +- .../python/src/unit_test_api/api_client.py | 14 +- .../unit_test_api/components/schema/_not.py | 18 +- ...s_allows_a_schema_which_should_validate.py | 113 +++--- ...tionalproperties_are_allowed_by_default.py | 109 +++--- ...dditionalproperties_can_exist_by_itself.py | 21 +- ...operties_should_not_look_in_applicators.py | 85 +++-- .../unit_test_api/components/schema/allof.py | 61 ++- .../schema/allof_combined_with_anyof_oneof.py | 56 +-- .../components/schema/allof_simple_types.py | 42 ++- .../schema/allof_with_base_schema.py | 70 +++- .../schema/allof_with_one_empty_schema.py | 15 +- .../allof_with_the_first_empty_schema.py | 15 +- .../allof_with_the_last_empty_schema.py | 15 +- .../schema/allof_with_two_empty_schemas.py | 16 +- .../unit_test_api/components/schema/anyof.py | 28 +- .../components/schema/anyof_complex_types.py | 61 ++- .../schema/anyof_with_base_schema.py | 36 +- .../schema/anyof_with_one_empty_schema.py | 15 +- .../schema/array_type_matches_arrays.py | 9 +- .../unit_test_api/components/schema/by_int.py | 14 +- .../components/schema/by_number.py | 14 +- .../components/schema/by_small_number.py | 14 +- .../components/schema/date_time_format.py | 14 +- .../components/schema/email_format.py | 14 +- .../components/schema/enums_in_properties.py | 36 +- .../components/schema/forbidden_property.py | 63 ++-- .../components/schema/hostname_format.py | 14 +- .../invalid_string_value_for_default.py | 29 +- .../components/schema/ipv4_format.py | 14 +- .../components/schema/ipv6_format.py | 14 +- .../components/schema/json_pointer_format.py | 14 +- .../components/schema/maximum_validation.py | 14 +- ...aximum_validation_with_unsigned_integer.py | 14 +- .../components/schema/maxitems_validation.py | 14 +- .../components/schema/maxlength_validation.py | 14 +- ...axproperties0_means_the_object_is_empty.py | 14 +- .../schema/maxproperties_validation.py | 14 +- .../components/schema/minimum_validation.py | 14 +- .../minimum_validation_with_signed_integer.py | 14 +- .../components/schema/minitems_validation.py | 14 +- .../components/schema/minlength_validation.py | 14 +- .../schema/minproperties_validation.py | 14 +- ...ted_allof_to_check_validation_semantics.py | 28 +- ...ted_anyof_to_check_validation_semantics.py | 28 +- .../components/schema/nested_items.py | 32 +- ...ted_oneof_to_check_validation_semantics.py | 28 +- .../schema/not_more_complex_schema.py | 43 ++- .../schema/object_properties_validation.py | 41 ++- .../schema/object_type_matches_objects.py | 1 + .../unit_test_api/components/schema/oneof.py | 28 +- .../components/schema/oneof_complex_types.py | 61 ++- .../schema/oneof_with_base_schema.py | 36 +- .../schema/oneof_with_empty_schema.py | 15 +- .../components/schema/oneof_with_required.py | 164 ++++++++- .../schema/pattern_is_not_anchored.py | 14 +- .../components/schema/pattern_validation.py | 14 +- .../properties_with_escaped_characters.py | 55 ++- ...perty_named_ref_that_is_not_a_reference.py | 23 +- .../schema/ref_in_additionalproperties.py | 55 +-- .../components/schema/ref_in_allof.py | 14 +- .../components/schema/ref_in_anyof.py | 14 +- .../components/schema/ref_in_items.py | 8 +- .../components/schema/ref_in_not.py | 14 +- .../components/schema/ref_in_oneof.py | 14 +- .../components/schema/ref_in_property.py | 63 ++-- .../schema/required_default_validation.py | 64 ++-- .../components/schema/required_validation.py | 86 +++-- .../schema/required_with_empty_array.py | 64 ++-- .../required_with_escaped_characters.py | 187 +++++++++- ..._do_anything_if_the_property_is_missing.py | 33 +- .../schema/uniqueitems_false_validation.py | 14 +- .../schema/uniqueitems_validation.py | 14 +- .../components/schema/uri_format.py | 14 +- .../components/schema/uri_reference_format.py | 14 +- .../components/schema/uri_template_format.py | 14 +- .../python/src/unit_test_api/schemas.py | 348 +++++++----------- .../test_post.py | 12 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 32 +- .../test_post.py | 16 +- .../test_post.py | 8 +- .../test_post.py | 20 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 16 +- .../test_post.py | 16 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 28 +- .../test_post.py | 40 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 24 +- .../test_post.py | 8 +- .../test_post.py | 24 +- .../test_post.py | 36 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 16 +- .../test_post.py | 16 +- .../test_post.py | 16 +- .../test_post.py | 20 +- .../test_post.py | 8 +- .../test_post.py | 24 +- .../test_post.py | 16 +- .../test_post.py | 28 +- .../test_post.py | 16 +- .../test_post.py | 20 +- .../test_post.py | 24 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 40 +- .../test_post.py | 36 +- .../test_post.py | 24 +- .../test_post.py | 28 +- .../test_post.py | 16 +- .../test_post.py | 16 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 16 +- .../test_post.py | 4 +- .../test_post.py | 32 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 20 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 36 +- .../test_post.py | 12 +- .../test_post.py | 60 +-- .../test_post.py | 100 ++--- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 24 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 16 +- .../test_post.py | 4 +- .../test_post.py | 20 +- .../test_post.py | 12 +- .../test_post.py | 20 +- .../test_post.py | 12 +- .../test_post.py | 12 +- .../test_post.py | 20 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 16 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 8 +- .../test_post.py | 4 +- .../test_post.py | 28 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 16 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 4 +- .../test_post.py | 12 +- .../test_post.py | 8 +- .../test_post.py | 60 +-- .../test_post.py | 60 +-- .../test_post.py | 24 +- .../test_post.py | 24 +- .../test_post.py | 24 +- .../python/.openapi-generator/VERSION | 2 +- .../python/README.md | 6 +- .../python/docs/paths/operators/post.md | 6 +- .../python/src/this_package/api_client.py | 14 +- .../components/schema/addition_operator.py | 49 +-- .../components/schema/operator.py | 14 +- .../components/schema/subtraction_operator.py | 49 +-- .../python/src/this_package/schemas.py | 348 +++++++----------- .../python/.openapi-generator/VERSION | 2 +- .../python/src/this_package/api_client.py | 14 +- .../python/src/this_package/schemas.py | 348 +++++++----------- .../python/.openapi-generator/VERSION | 2 +- 272 files changed, 3294 insertions(+), 2824 deletions(-) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION index 4a36342fcab..56fea8a08d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0 +3.0.0 \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/README.md b/samples/openapi3/client/3_0_3_unit_test/python/README.md index fbf4e78db78..564ccd2d4b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/README.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/README.md @@ -183,10 +183,10 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) + body = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate({ + "foo": None, + "bar": None, + }) try: api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/components/schema/_not.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/components/schema/_not.md index ba7f83e0f06..ff55ae7ec6e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/components/schema/_not.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/components/schema/_not.md @@ -10,9 +10,9 @@ dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -[_not](#_not) | decimal.Decimal, int | decimal.Decimal | | +[_not](#not2) | decimal.Decimal, int | decimal.Decimal | | -# _Not +# Not2 ## Type Info Input Type | Accessed Type | Description | Notes diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md index 42d8ff5c339..81ee375a10f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md @@ -94,10 +94,10 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) + body = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate({ + "foo": None, + "bar": None, + }) try: api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md index 76ec9939fae..fa11e5691fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md @@ -94,9 +94,9 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself( - key=True, - ) + body = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself({ + "key": True, + }) try: api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md index ca3f27bbecc..3e9f7af7e6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md @@ -94,10 +94,10 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = enums_in_properties.EnumsInProperties( - foo="foo", - bar="bar", - ) + body = enums_in_properties.EnumsInProperties({ + "foo": "foo", + "bar": "bar", + }) try: api_response = api_instance.post_enums_in_properties_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md index 4840af7bb70..e82663b3f89 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md @@ -94,7 +94,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = object_type_matches_objects.ObjectTypeMatchesObjects() + body = object_type_matches_objects.ObjectTypeMatchesObjects({}) try: api_response = api_instance.post_object_type_matches_objects_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md index b5b16922ad5..2da14957daa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md @@ -94,7 +94,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = oneof_with_required.OneofWithRequired() + body = oneof_with_required.OneofWithRequired({}) try: api_response = api_instance.post_oneof_with_required_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md index 1c648efec64..3a5727bd1b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md @@ -94,9 +94,9 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = ref_in_additionalproperties.RefInAdditionalproperties( - key=property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference(None), - ) + body = ref_in_additionalproperties.RefInAdditionalproperties({ + "key": property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference(None), + }) try: api_response = api_instance.post_ref_in_additionalproperties_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md index 30ea2bf3093..3b0135f26ef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md @@ -94,9 +94,9 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) + body = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing({ + "alpha": 5, + }) try: api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( body=body, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py index 141bbdded25..2317e3781f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py @@ -719,13 +719,13 @@ def deserialize( """ if cls.style: extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.from_openapi_data_(extracted_data) + return cls.schema(extracted_data) assert cls.content is not None for content_type, media_type in cls.content.items(): if cls._content_type_is_json(content_type): cast_in_data = json.loads(in_data) assert media_type.schema is not None - return media_type.schema.from_openapi_data_(cast_in_data) + return media_type.schema(cast_in_data) else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') @@ -940,8 +940,12 @@ def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_confi content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_( - body_data, configuration_=configuration) + body_schema = schemas._get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema(body_data) + else: + deserialized_body = body_schema( + body_data, configuration=configuration) elif streamed: response.release_conn() @@ -1410,8 +1414,6 @@ def serialize( schema = schemas._get_class(media_type.schema) if isinstance(in_data, schema): cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = schema(**in_data) else: cast_in_data = schema(in_data) # TODO check for and use encoding if it exists diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py index cf5f06288e1..69cf3c22dc1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py @@ -10,7 +10,8 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * -_Not: typing_extensions.TypeAlias = schemas.IntSchema[U] +Not2: typing_extensions.TypeAlias = schemas.IntSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _Not( @@ -26,14 +27,16 @@ class _Not( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Not[ typing.Union[ frozendict.frozendict, @@ -48,9 +51,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _Not[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py index 141c2c50833..28dbd5a7229 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py @@ -11,7 +11,9 @@ from unit_test_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -20,6 +22,57 @@ "bar": typing.Type[Bar], } ) +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Bar[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + AdditionalProperties[schemas.BoolClass], + bool + ], + ] +] class AdditionalpropertiesAllowsASchemaWhichShouldValidate( @@ -78,64 +131,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - bar: typing.Union[ - Bar[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[schemas.BoolClass], - bool + arg: typing.Union[ + DictInput3, + AdditionalpropertiesAllowsASchemaWhichShouldValidate[frozendict.frozendict], ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidate[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - foo=foo, - bar=bar, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AdditionalpropertiesAllowsASchemaWhichShouldValidate[frozendict.frozendict], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py index 3c9a5a69a48..19628b6367c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py @@ -10,7 +10,9 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,6 +21,54 @@ "bar": typing.Type[Bar], } ) +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Bar[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class AdditionalpropertiesAreAllowedByDefault( @@ -86,53 +136,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - bar: typing.Union[ - Bar[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalpropertiesAreAllowedByDefault[ typing.Union[ frozendict.frozendict, @@ -147,11 +155,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - bar=bar, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AdditionalpropertiesAreAllowedByDefault[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py index 9ac63345f54..24e1e170158 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py @@ -11,6 +11,13 @@ from unit_test_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] +DictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[schemas.BoolClass], + bool + ], +] class AdditionalpropertiesCanExistByItself( @@ -34,18 +41,16 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[schemas.BoolClass], - bool + arg: typing.Union[ + DictInput, + AdditionalpropertiesCanExistByItself[frozendict.frozendict], ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalpropertiesCanExistByItself[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AdditionalpropertiesCanExistByItself[frozendict.frozendict], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py index 59b5fb746a2..b8708f55f53 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py @@ -11,6 +11,7 @@ from unit_test_api.shared_imports.schema_imports import * AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -18,6 +19,33 @@ "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -67,31 +95,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -106,10 +114,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -131,6 +137,13 @@ def __new__( AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput3 = typing.Mapping[ + str, + typing.Union[ + AdditionalProperties[schemas.BoolClass], + bool + ], +] class AdditionalpropertiesShouldNotLookInApplicators( @@ -156,12 +169,11 @@ def __getitem__(self, name: str) -> AdditionalProperties[schemas.BoolClass]: def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalProperties[schemas.BoolClass], - bool + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionalpropertiesShouldNotLookInApplicators[ typing.Union[ frozendict.frozendict, @@ -176,9 +188,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AdditionalpropertiesShouldNotLookInApplicators[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py index 6abfcd95011..026e08b8b46 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py @@ -17,6 +17,17 @@ "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -64,9 +75,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -81,9 +94,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -109,6 +121,16 @@ def __new__( "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( @@ -156,9 +178,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -173,9 +197,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -198,6 +221,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Allof( @@ -218,9 +242,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Allof[ typing.Union[ frozendict.frozendict, @@ -235,9 +261,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Allof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py index bc30c9f4b8c..bf74b017371 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _03( @@ -25,9 +26,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _03[ typing.Union[ frozendict.frozendict, @@ -42,9 +45,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _03[ @@ -66,6 +68,7 @@ def __new__( AllOf = typing.Tuple[ typing.Type[_03[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _02( @@ -81,9 +84,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _02[ typing.Union[ frozendict.frozendict, @@ -98,9 +103,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _02[ @@ -122,6 +126,7 @@ def __new__( AnyOf = typing.Tuple[ typing.Type[_02[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -137,9 +142,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -154,9 +161,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -178,6 +184,7 @@ def __new__( OneOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput4 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofCombinedWithAnyofOneof( @@ -200,9 +207,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput4, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofCombinedWithAnyofOneof[ typing.Union[ frozendict.frozendict, @@ -217,9 +226,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofCombinedWithAnyofOneof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py index 3861d8dd52a..394de256dfe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -25,9 +26,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -42,9 +45,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -63,6 +65,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _1( @@ -78,9 +81,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -95,9 +100,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -120,6 +124,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofSimpleTypes( @@ -140,9 +145,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofSimpleTypes[ typing.Union[ frozendict.frozendict, @@ -157,9 +164,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofSimpleTypes[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py index e66fd69a09e..776f780487a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py @@ -17,6 +17,16 @@ "foo": typing.Type[Foo], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -64,9 +74,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -81,9 +93,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -109,6 +120,16 @@ def __new__( "baz": typing.Type[Baz], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Baz[schemas.NoneClass], + None + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( @@ -156,9 +177,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -173,9 +196,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -205,6 +227,17 @@ def __new__( "bar": typing.Type[Bar], } ) +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class AllofWithBaseSchema( @@ -258,9 +291,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofWithBaseSchema[ typing.Union[ frozendict.frozendict, @@ -275,9 +310,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofWithBaseSchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py index 55d03fc6311..a5e59052b5c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py @@ -10,10 +10,12 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofWithOneEmptySchema( @@ -34,9 +36,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofWithOneEmptySchema[ typing.Union[ frozendict.frozendict, @@ -51,9 +55,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofWithOneEmptySchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py index e640c00767e..203852e5973 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py @@ -10,12 +10,14 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] _1: typing_extensions.TypeAlias = schemas.NumberSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofWithTheFirstEmptySchema( @@ -36,9 +38,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofWithTheFirstEmptySchema[ typing.Union[ frozendict.frozendict, @@ -53,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofWithTheFirstEmptySchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py index 18bd961fba1..1c0ce12f391 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py @@ -11,11 +11,13 @@ from unit_test_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.NumberSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofWithTheLastEmptySchema( @@ -36,9 +38,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofWithTheLastEmptySchema[ typing.Union[ frozendict.frozendict, @@ -53,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofWithTheLastEmptySchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py index bcb530a8db9..6083a4b1fd0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py @@ -10,12 +10,15 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _0: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AllofWithTwoEmptySchemas( @@ -36,9 +39,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AllofWithTwoEmptySchemas[ typing.Union[ frozendict.frozendict, @@ -53,9 +58,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AllofWithTwoEmptySchemas[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py index db5ab8f98c5..7a581dc82f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py @@ -11,6 +11,7 @@ from unit_test_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.IntSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _1( @@ -26,9 +27,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -43,9 +46,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -68,6 +70,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Anyof( @@ -88,9 +91,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Anyof[ typing.Union[ frozendict.frozendict, @@ -105,9 +110,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Anyof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py index a437baabc35..a04591d6dfa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py @@ -17,6 +17,17 @@ "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -64,9 +75,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -81,9 +94,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -109,6 +121,16 @@ def __new__( "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( @@ -156,9 +178,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -173,9 +197,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -198,6 +221,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AnyofComplexTypes( @@ -218,9 +242,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyofComplexTypes[ typing.Union[ frozendict.frozendict, @@ -235,9 +261,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AnyofComplexTypes[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py index ff8e02bf23d..30e94846688 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -25,9 +26,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -42,9 +45,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -63,6 +65,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _1( @@ -78,9 +81,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -95,9 +100,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -142,13 +146,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: str, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + arg: str, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyofWithBaseSchema[str]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( AnyofWithBaseSchema[str], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py index ead1b940c10..90f282870cf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py @@ -11,11 +11,13 @@ from unit_test_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.NumberSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] AnyOf = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class AnyofWithOneEmptySchema( @@ -36,9 +38,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AnyofWithOneEmptySchema[ typing.Union[ frozendict.frozendict, @@ -53,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( AnyofWithOneEmptySchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py index 68aae77b810..8454fc24556 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] @@ -30,7 +31,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[ schemas.INPUT_BASE_TYPES @@ -53,12 +54,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ArrayTypeMatchesArrays[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( ArrayTypeMatchesArrays[tuple], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py index 8d48c6ff0a1..8c8b9b3ba2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ByInt( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ByInt[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( ByInt[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py index 6b8c819d611..2c5e9a1e983 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class ByNumber( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ByNumber[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( ByNumber[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py index 5eaa6cdac4e..3280d002587 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class BySmallNumber( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> BySmallNumber[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( BySmallNumber[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py index 2d202d5bdd6..f911669ebf5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class DateTimeFormat( @@ -31,9 +32,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> DateTimeFormat[ typing.Union[ frozendict.frozendict, @@ -48,9 +51,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( DateTimeFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py index 8ec0d70100d..0c309ac1877 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class EmailFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EmailFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( EmailFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py index ee45bbd69ec..689257df234 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py @@ -59,6 +59,20 @@ def BAR(cls) -> Bar[str]: "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[str], + str + ], + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class EnumsInProperties( @@ -114,26 +128,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - bar: typing.Union[ - Bar[str], - str + arg: typing.Union[ + DictInput, + EnumsInProperties[frozendict.frozendict], ], - foo: typing.Union[ - Foo[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> EnumsInProperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - bar=bar, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( EnumsInProperties[frozendict.frozendict], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py index dd596562f38..7b267335233 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py @@ -17,6 +17,33 @@ "foo": typing.Type[Foo], } ) +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ForbiddenProperty( @@ -71,31 +98,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ForbiddenProperty[ typing.Union[ frozendict.frozendict, @@ -110,10 +117,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( ForbiddenProperty[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py index 11d784597b8..480e399f52f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class HostnameFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> HostnameFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( HostnameFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py index 9e2bb008e57..a60c731cae6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py @@ -30,6 +30,16 @@ class Schema_(metaclass=schemas.SingletonMeta): "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class InvalidStringValueForDefault( @@ -75,14 +85,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - bar: typing.Union[ - Bar[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> InvalidStringValueForDefault[ typing.Union[ frozendict.frozendict, @@ -97,10 +104,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - bar=bar, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( InvalidStringValueForDefault[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py index 5a05f608b8b..2a755da93bf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Ipv4Format( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Ipv4Format[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Ipv4Format[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py index be23fd2b76c..3adf3b8614d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Ipv6Format( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Ipv6Format[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Ipv6Format[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py index 42e84fce010..068694c7933 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class JsonPointerFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> JsonPointerFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( JsonPointerFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py index 14714346cb3..3deb7d9788b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MaximumValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MaximumValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MaximumValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py index 9d3b5f2d81a..728307c35a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MaximumValidationWithUnsignedInteger( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MaximumValidationWithUnsignedInteger[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MaximumValidationWithUnsignedInteger[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py index 296641f1fe1..abc670311e4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MaxitemsValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MaxitemsValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MaxitemsValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py index 8f3481fc68b..e967cc113d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MaxlengthValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MaxlengthValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MaxlengthValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py index 4258f1d4f9d..692756ecfc6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Maxproperties0MeansTheObjectIsEmpty( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Maxproperties0MeansTheObjectIsEmpty[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Maxproperties0MeansTheObjectIsEmpty[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py index 4a0f296bbb1..a8f25faeb57 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MaxpropertiesValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MaxpropertiesValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MaxpropertiesValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py index 3f47f668e0d..c7c03046e71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MinimumValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MinimumValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MinimumValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py index 663669f8064..5d66211df71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MinimumValidationWithSignedInteger( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MinimumValidationWithSignedInteger[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MinimumValidationWithSignedInteger[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py index b5c7396656c..7403c9563fa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MinitemsValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MinitemsValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MinitemsValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py index fd84680732a..df08640fb8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MinlengthValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MinlengthValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MinlengthValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py index 3bee8da4cf1..ae6954fb43b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class MinpropertiesValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> MinpropertiesValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( MinpropertiesValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py index 183cd7b7ca7..ba6d56eb199 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py @@ -14,6 +14,7 @@ AllOf = typing.Tuple[ typing.Type[_02[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -29,9 +30,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -46,9 +49,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -70,6 +72,7 @@ def __new__( AllOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class NestedAllofToCheckValidationSemantics( @@ -90,9 +93,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NestedAllofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, @@ -107,9 +112,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( NestedAllofToCheckValidationSemantics[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py index 018fbed6bb9..c9e8ccbf9c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py @@ -14,6 +14,7 @@ AnyOf = typing.Tuple[ typing.Type[_02[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -29,9 +30,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -46,9 +49,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -70,6 +72,7 @@ def __new__( AnyOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class NestedAnyofToCheckValidationSemantics( @@ -90,9 +93,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NestedAnyofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, @@ -107,9 +112,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( NestedAnyofToCheckValidationSemantics[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py index 282da9cd705..7a8601899f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py @@ -25,7 +25,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items4[decimal.Decimal], decimal.Decimal, @@ -33,12 +33,12 @@ def __new__( float ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items3[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( Items3[tuple], @@ -63,19 +63,19 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items3[tuple], list, tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items2[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( Items2[tuple], @@ -100,19 +100,19 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items2[tuple], list, tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Items[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( Items[tuple], @@ -142,19 +142,19 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ Items[tuple], list, tuple ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NestedItems[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( NestedItems[tuple], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py index 92dbb5d3bf5..fc96f22648d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py @@ -14,6 +14,7 @@ OneOf = typing.Tuple[ typing.Type[_02[schemas.U]], ] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -29,9 +30,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -46,9 +49,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -70,6 +72,7 @@ def __new__( OneOf = typing.Tuple[ typing.Type[_0[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class NestedOneofToCheckValidationSemantics( @@ -90,9 +93,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NestedOneofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, @@ -107,9 +112,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( NestedOneofToCheckValidationSemantics[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index 7d6875a4d83..9d579acc109 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -17,6 +17,16 @@ "foo": typing.Type[Foo], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _Not( @@ -56,21 +66,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - foo: typing.Union[ - Foo[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + _Not[frozendict.frozendict], + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _Not[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _Not[frozendict.frozendict], @@ -78,6 +83,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class NotMoreComplexSchema( @@ -98,9 +104,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> NotMoreComplexSchema[ typing.Union[ frozendict.frozendict, @@ -115,9 +123,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( NotMoreComplexSchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py index 3bf18389483..3ec9d874748 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py @@ -19,6 +19,21 @@ "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[decimal.Decimal], + decimal.Decimal, + int + ], + typing.Union[ + Bar[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class ObjectPropertiesValidation( @@ -68,20 +83,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int - ] = schemas.unset, - bar: typing.Union[ - Bar[str], - schemas.Unset, - str - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> ObjectPropertiesValidation[ typing.Union[ frozendict.frozendict, @@ -96,11 +102,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - bar=bar, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( ObjectPropertiesValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_type_matches_objects.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_type_matches_objects.py index f95a814a561..fe1585ec78c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_type_matches_objects.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_type_matches_objects.py @@ -10,4 +10,5 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] ObjectTypeMatchesObjects: typing_extensions.TypeAlias = schemas.DictSchema[U] diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py index b920d695a4f..5b72f695bd8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py @@ -11,6 +11,7 @@ from unit_test_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.IntSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _1( @@ -26,9 +27,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -43,9 +46,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -68,6 +70,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Oneof( @@ -88,9 +91,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Oneof[ typing.Union[ frozendict.frozendict, @@ -105,9 +110,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Oneof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py index 9a95c94c98c..6b12e24286b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py @@ -17,6 +17,17 @@ "bar": typing.Type[Bar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Bar[decimal.Decimal], + decimal.Decimal, + int + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -64,9 +75,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -81,9 +94,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -109,6 +121,16 @@ def __new__( "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( @@ -156,9 +178,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -173,9 +197,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -198,6 +221,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class OneofComplexTypes( @@ -218,9 +242,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> OneofComplexTypes[ typing.Union[ frozendict.frozendict, @@ -235,9 +261,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( OneofComplexTypes[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py index b8ba029a4eb..31c60cf077f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _0( @@ -25,9 +26,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -42,9 +45,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -63,6 +65,7 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class _1( @@ -78,9 +81,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -95,9 +100,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -142,13 +146,13 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: str, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + arg: str, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> OneofWithBaseSchema[str]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( OneofWithBaseSchema[str], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py index ca8705889a2..e03a993813b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py @@ -11,11 +11,13 @@ from unit_test_api.shared_imports.schema_imports import * _0: typing_extensions.TypeAlias = schemas.NumberSchema[U] +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] _1: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] OneOf = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class OneofWithEmptySchema( @@ -36,9 +38,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> OneofWithEmptySchema[ typing.Union[ frozendict.frozendict, @@ -53,9 +57,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( OneofWithEmptySchema[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py index 535bdd7fdac..f2cd25e173c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py @@ -10,6 +10,68 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _0( @@ -101,9 +163,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _0[ typing.Union[ frozendict.frozendict, @@ -118,9 +182,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _0[ @@ -139,6 +202,68 @@ def __new__( ) return inst +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class _1( @@ -230,9 +355,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> _1[ typing.Union[ frozendict.frozendict, @@ -247,9 +374,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( _1[ @@ -272,6 +398,7 @@ def __new__( typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] +DictInput3 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class OneofWithRequired( @@ -294,15 +421,16 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + OneofWithRequired[frozendict.frozendict], + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> OneofWithRequired[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( OneofWithRequired[frozendict.frozendict], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py index 16416b2de31..5f07a775146 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class PatternIsNotAnchored( @@ -32,9 +33,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PatternIsNotAnchored[ typing.Union[ frozendict.frozendict, @@ -49,9 +52,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( PatternIsNotAnchored[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py index cd28f452f0d..8f61d8c643e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class PatternValidation( @@ -32,9 +33,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PatternValidation[ typing.Union[ frozendict.frozendict, @@ -49,9 +52,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( PatternValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py index cfb37ff352d..6feee3c4c07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py @@ -27,6 +27,48 @@ "foo\fbar": typing.Type[FooFbar], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + FooNbar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + FooBar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + FooBar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + FooRbar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + FooTbar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + typing.Union[ + FooFbar[decimal.Decimal], + decimal.Decimal, + int, + float + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class PropertiesWithEscapedCharacters( @@ -92,9 +134,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PropertiesWithEscapedCharacters[ typing.Union[ frozendict.frozendict, @@ -109,9 +153,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( PropertiesWithEscapedCharacters[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py index 6f1a114f1b7..88192629a7e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py @@ -17,6 +17,16 @@ "$ref": typing.Type[Ref], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Ref[str], + str + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class PropertyNamedRefThatIsNotAReference( @@ -62,9 +72,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> PropertyNamedRefThatIsNotAReference[ typing.Union[ frozendict.frozendict, @@ -79,9 +91,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( PropertyNamedRefThatIsNotAReference[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py index aec11997502..08ce2decd55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py @@ -42,35 +42,16 @@ def __getitem__(self, name: str) -> property_named_ref_that_is_not_a_reference.P def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[ - schemas.INPUT_BASE_TYPES - ], - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + arg: typing.Union[ + DictInput, + RefInAdditionalproperties[frozendict.frozendict], ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInAdditionalproperties[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInAdditionalproperties[frozendict.frozendict], @@ -80,3 +61,27 @@ def __new__( from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference +DictInput = typing.Mapping[ + str, + typing.Union[ + property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], +] diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py index 4dca37c7804..1080f2956f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class RefInAllof( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInAllof[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInAllof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py index 5f4b98a0e92..d16651b9af7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class RefInAnyof( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInAnyof[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInAnyof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py index 51d6c06e927..b61a56f16f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py @@ -29,7 +29,7 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - arg_: typing.Sequence[ + arg: typing.Sequence[ typing.Union[ property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[ schemas.INPUT_BASE_TYPES @@ -52,12 +52,12 @@ def __new__( io.BufferedReader ] ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInItems[tuple]: inst = super().__new__( cls, - arg_, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( RefInItems[tuple], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py index 5a9f9a7e7b6..be775bc9b21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class RefInNot( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInNot[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInNot[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py index 58548748ba2..86de4ac60b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class RefInOneof( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInOneof[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInOneof[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py index 9be138cf449..f49e2024e5b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py @@ -64,31 +64,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - a: typing.Union[ - property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RefInProperty[ typing.Union[ frozendict.frozendict, @@ -103,10 +83,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - a=a, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RefInProperty[ @@ -133,3 +111,30 @@ def __new__( "a": typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py index fcacf281873..ccef05eab5b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,6 +18,33 @@ "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class RequiredDefaultValidation( @@ -71,31 +99,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RequiredDefaultValidation[ typing.Union[ frozendict.frozendict, @@ -110,10 +118,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RequiredDefaultValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py index 216367e2b8e..0a223a43458 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py @@ -10,7 +10,9 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] +DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -19,6 +21,54 @@ "bar": typing.Type[Bar], } ) +DictInput3 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + Bar[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class RequiredValidation( @@ -102,31 +152,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - bar: typing.Union[ - Bar[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput3, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RequiredValidation[ typing.Union[ frozendict.frozendict, @@ -141,10 +171,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - bar=bar, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RequiredValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py index 127ee15485b..95222531811 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema[U] Properties = typing_extensions.TypedDict( 'Properties', @@ -17,6 +18,33 @@ "foo": typing.Type[Foo], } ) +DictInput2 = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Foo[ + schemas.INPUT_BASE_TYPES + ], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class RequiredWithEmptyArray( @@ -71,31 +99,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - foo: typing.Union[ - Foo[ - schemas.INPUT_BASE_TYPES - ], - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput2, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RequiredWithEmptyArray[ typing.Union[ frozendict.frozendict, @@ -110,10 +118,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - foo=foo, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RequiredWithEmptyArray[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py index 26295127b1f..4d589f0ea1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py @@ -10,6 +10,180 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class RequiredWithEscapedCharacters( @@ -136,9 +310,11 @@ def __getitem__( def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> RequiredWithEscapedCharacters[ typing.Union[ frozendict.frozendict, @@ -153,9 +329,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( RequiredWithEscapedCharacters[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py index c33552ffbef..0272a23578d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -30,6 +30,18 @@ class Schema_(metaclass=schemas.SingletonMeta): "alpha": typing.Type[Alpha], } ) +DictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + Alpha[decimal.Decimal], + decimal.Decimal, + int, + float + ], + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ] +] class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( @@ -74,23 +86,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - alpha: typing.Union[ - Alpha[decimal.Decimal], - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing[frozendict.frozendict], + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - alpha=alpha, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing[frozendict.frozendict], diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py index 276bb8fd317..861e8eb01c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class UniqueitemsFalseValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> UniqueitemsFalseValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( UniqueitemsFalseValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py index 144918fc43a..69acad75bae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class UniqueitemsValidation( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> UniqueitemsValidation[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( UniqueitemsValidation[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py index a5d4cc3df6e..c7434fb77cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class UriFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> UriFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( UriFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py index 0459886ab18..0d70d9f1efd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class UriReferenceFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> UriReferenceFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( UriReferenceFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py index 24ae897eecd..6ff207b7f24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py @@ -10,6 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class UriTemplateFormat( @@ -30,9 +31,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> UriTemplateFormat[ typing.Union[ frozendict.frozendict, @@ -47,9 +50,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( UriTemplateFormat[ diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py index 58ba9d009c3..80b292c8ab9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py @@ -46,18 +46,18 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg_, (io.FileIO, io.BufferedReader)): - if arg_.closed: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg_.close() + arg.close() super_cls: typing.Type = super(FileIO, cls) - inst = super_cls.__new__(cls, arg_.name) - super(FileIO, inst).__init__(arg_.name) + inst = super_cls.__new__(cls, arg.name) + super(FileIO, inst).__init__(arg.name) return inst - raise exceptions.ApiValueError('FileIO must be passed arg_ which contains the open file') + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - def __init__(self, arg_: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): """ if this does not exist, then classes with FileIO as a mixin (AnyType etc) will see the io.FileIO __init__ signature rather than the __new__ one @@ -129,11 +129,11 @@ def __call__(cls, *args, **kwargs): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg_) + The same instance is returned for a given key of (cls, arg) """ _instances = {} - def __new__(cls, arg_: typing.Any, **kwargs): + def __new__(cls, arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -141,16 +141,16 @@ def __new__(cls, arg_: typing.Any, **kwargs): Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg_, str(arg_)) + key = (cls, arg, str(arg)) if key not in cls._instances: - if isinstance(arg_, (none_type_, bool, BoolClass, NoneClass)): + if isinstance(arg, (none_type_, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: super_inst: typing.Type = super() - cls._instances[key] = super_inst.__new__(cls, arg_) + cls._instances[key] = super_inst.__new__(cls, arg) return cls._instances[key] def __repr__(self): @@ -1350,60 +1350,13 @@ def _get_new_instance_without_conversion( used_arg = arg return super_cls.__new__(cls, used_arg) - @classmethod - def from_openapi_data_( - cls, - arg: typing.Union[ - str, - int, - float, - bool, - None, - dict, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - """ - Schema from_openapi_data_ - """ - from_server = True - validated_path_to_schemas = {} - path_to_type = {} - cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - @staticmethod def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ dict, frozendict.frozendict, list, @@ -1422,49 +1375,20 @@ def __new__( io.BufferedReader, 'Schema', ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - Unset, - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - 'Schema', - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ Schema __new__ Args: - args_ (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables are instance properties if they are named normally :( """ - __kwargs = cls.__remove_unsets(kwargs) - if not args_ and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and args_ and not isinstance(args_[0], dict): - __arg = args_[0] - else: - __arg = cls.__get_input_dict(*args_, **__kwargs) + __arg = arg __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -1472,7 +1396,7 @@ def __new__( __arg, __from_server, __validated_path_to_schemas, ('args[0]',), __path_to_type) __validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(__validated_path_to_schemas) ) __path_to_schemas = cls.__get_new_cls(cast_arg, __validation_metadata, __path_to_type) @@ -2131,12 +2055,12 @@ class ListSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Sequence[typing.Any], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ListSchema[tuple]: + return super().__new__(cls, arg, configuration=configuration) class NoneSchema( @@ -2148,12 +2072,12 @@ class NoneSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) - @classmethod - def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, configuration=configuration) class NumberSchema( @@ -2169,12 +2093,12 @@ class NumberSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) - @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, configuration=configuration) class IntBase: @@ -2195,12 +2119,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int' - @classmethod - def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2212,8 +2136,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2225,8 +2153,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2238,12 +2170,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'float' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2255,12 +2187,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'double' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2279,12 +2211,12 @@ class StrSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) - @classmethod - def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StrSchema[str]: + return super().__new__(cls, arg, configuration=configuration) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2293,8 +2225,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg_: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(UUIDSchema[str], inst) @@ -2304,8 +2240,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg_: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateSchema[str], inst) @@ -2315,8 +2255,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg_: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateTimeSchema[str], inst) @@ -2326,7 +2270,11 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2335,7 +2283,7 @@ def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg_, **kwargs) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DecimalSchema[str], inst) @@ -2350,9 +2298,13 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg_: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class FileSchema( @@ -2379,9 +2331,13 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class BinarySchema( @@ -2398,8 +2354,12 @@ class Schema_(metaclass=SingletonMeta): FileSchema, ) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: - return super().__new__(cls, arg_) + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BinarySchema[typing.Union[FileIO, bytes]]: + return super().__new__(cls, arg) class BoolSchema( @@ -2411,12 +2371,12 @@ class BoolSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) - @classmethod - def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BoolSchema[bool]: + return super().__new__(cls, arg, configuration=configuration) class AnyTypeSchema( @@ -2436,7 +2396,7 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2454,26 +2414,7 @@ def __new__( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader, - Unset - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> AnyTypeSchema[typing.Union[ NoneClass, frozendict.frozendict, @@ -2482,30 +2423,11 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *args_, configuration_=configuration_, **kwargs) + return super().__new__(cls, arg, configuration=configuration) def __init__( self, - *args_: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2523,6 +2445,7 @@ def __init__( io.FileIO, io.BufferedReader ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ this exists to override the __init__ method form FileIO in NoneFrozenDictTupleStrDecimalBoolFileBytesMixin @@ -2548,10 +2471,10 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *args_, configuration_=configuration_) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2564,17 +2487,12 @@ class DictSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) - @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], + arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *args_, **kwargs, configuration_=configuration_) + return super().__new__(cls, arg, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py index e405bd03b13..f15aeb543cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py @@ -40,9 +40,9 @@ def test_no_additional_properties_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -78,9 +78,9 @@ def test_an_additional_invalid_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -98,9 +98,9 @@ def test_an_additional_valid_property_is_valid_passes(self): True, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py index ff8a255f387..e0975aca036 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py @@ -44,9 +44,9 @@ def test_additional_properties_are_allowed_passes(self): True, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py index deffb8bbf1a..2425510c060 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py @@ -41,9 +41,9 @@ def test_an_additional_invalid_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -57,9 +57,9 @@ def test_an_additional_valid_property_is_valid_passes(self): True, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py index a22f81ef13e..86768a16864 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py @@ -43,9 +43,9 @@ def test_properties_defined_in_allof_are_not_examined_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -61,9 +61,9 @@ def test_valid_test_case_passes(self): True, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py index c8bbde097bd..261309152ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py @@ -38,9 +38,9 @@ def test_allof_true_anyof_false_oneof_false_fails(self): 2 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_allof_false_anyof_false_oneof_true_fails(self): 5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -66,9 +66,9 @@ def test_allof_false_anyof_true_oneof_true_fails(self): 15 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -80,9 +80,9 @@ def test_allof_true_anyof_true_oneof_false_fails(self): 6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -93,9 +93,9 @@ def test_allof_true_anyof_true_oneof_true_passes(self): payload = ( 30 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -124,9 +124,9 @@ def test_allof_true_anyof_false_oneof_true_fails(self): 10 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -138,9 +138,9 @@ def test_allof_false_anyof_true_oneof_false_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -152,9 +152,9 @@ def test_allof_false_anyof_false_oneof_false_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py index 8482d79bf74..5df4d205e2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py @@ -42,9 +42,9 @@ def test_allof_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -76,9 +76,9 @@ def test_mismatch_first_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -93,9 +93,9 @@ def test_mismatch_second_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -112,9 +112,9 @@ def test_wrong_type_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py index bd08af095ca..293398325fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py @@ -37,9 +37,9 @@ def test_valid_passes(self): payload = ( 25 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_mismatch_one_fails(self): 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py index d4ceab02644..17a7e55055f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py @@ -44,9 +44,9 @@ def test_valid_passes(self): None, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -80,9 +80,9 @@ def test_mismatch_first_allof_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -99,9 +99,9 @@ def test_mismatch_base_schema_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -116,9 +116,9 @@ def test_mismatch_both_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -135,9 +135,9 @@ def test_mismatch_second_allof_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py index 20629b6cf3f..681f63c7fda 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py @@ -37,9 +37,9 @@ def test_any_data_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py index c5a52d6e26e..be8428c551b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py @@ -38,9 +38,9 @@ def test_string_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_number_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py index 2d8c950e78e..6a0258e09ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py @@ -38,9 +38,9 @@ def test_string_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_number_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py index b953f98a8d6..732383f65cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py @@ -37,9 +37,9 @@ def test_any_data_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py index cf32bd6641e..e933b12ea4d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py @@ -40,9 +40,9 @@ def test_second_anyof_valid_complex_passes(self): "baz", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -76,9 +76,9 @@ def test_neither_anyof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -94,9 +94,9 @@ def test_both_anyof_valid_complex_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -127,9 +127,9 @@ def test_first_anyof_valid_complex_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py index f74f07df3b8..aad966b7d3a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py @@ -37,9 +37,9 @@ def test_second_anyof_valid_passes(self): payload = ( 2.5 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_neither_anyof_valid_fails(self): 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_both_anyof_valid_passes(self): payload = ( 3 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -111,9 +111,9 @@ def test_first_anyof_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py index d3842e63b82..d55ecd6f22b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py @@ -37,9 +37,9 @@ def test_one_anyof_valid_passes(self): payload = ( "foobar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_both_anyof_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -82,9 +82,9 @@ def test_mismatch_base_schema_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py index 3f2ffacc85b..600adbb752d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py @@ -37,9 +37,9 @@ def test_string_is_valid_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -67,9 +67,9 @@ def test_number_is_valid_passes(self): payload = ( 123 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py index e8f6e586311..52ad8853dac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py @@ -38,9 +38,9 @@ def test_a_float_is_not_an_array_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_a_boolean_is_not_an_array_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -66,9 +66,9 @@ def test_null_is_not_an_array_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_an_object_is_not_an_array_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -95,9 +95,9 @@ def test_a_string_is_not_an_array_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -109,9 +109,9 @@ def test_an_array_is_an_array_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -140,9 +140,9 @@ def test_an_integer_is_not_an_array_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py index 131e97d1d8f..c33cd2d5fb0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py @@ -38,9 +38,9 @@ def test_an_empty_string_is_not_a_boolean_fails(self): "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_a_float_is_not_a_boolean_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -66,9 +66,9 @@ def test_null_is_not_a_boolean_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -80,9 +80,9 @@ def test_zero_is_not_a_boolean_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -95,9 +95,9 @@ def test_an_array_is_not_a_boolean_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -109,9 +109,9 @@ def test_a_string_is_not_a_boolean_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -122,9 +122,9 @@ def test_false_is_a_boolean_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -153,9 +153,9 @@ def test_an_integer_is_not_a_boolean_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -166,9 +166,9 @@ def test_true_is_a_boolean_passes(self): payload = ( True ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -198,9 +198,9 @@ def test_an_object_is_not_a_boolean_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py index 0630223eb69..8811cb4d2f6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py @@ -38,9 +38,9 @@ def test_int_by_int_fail_fails(self): 7 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_int_by_int_passes(self): payload = ( 10 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -81,9 +81,9 @@ def test_ignores_non_numbers_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py index 99d77ccd787..7a466e3a93b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py @@ -37,9 +37,9 @@ def test_45_is_multiple_of15_passes(self): payload = ( 4.5 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_35_is_not_multiple_of15_fails(self): 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_zero_is_multiple_of_anything_passes(self): payload = ( 0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py index e65af0fc028..eb20a0fd2fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py @@ -38,9 +38,9 @@ def test_000751_is_not_multiple_of00001_fails(self): 0.00751 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_00075_is_multiple_of00001_passes(self): payload = ( 0.0075 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py index 67fa3736f09..ae84b5387c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py index 8f7ebbdc2db..f1cad3da7a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py index 9344ad2e3e1..28a209063aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py @@ -37,9 +37,9 @@ def test_integer_zero_is_valid_passes(self): payload = ( 0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -67,9 +67,9 @@ def test_float_zero_is_valid_passes(self): payload = ( 0.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_false_is_invalid_fails(self): False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py index 33e60f2aaf5..c1cabbd65ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py @@ -38,9 +38,9 @@ def test_true_is_invalid_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_integer_one_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -81,9 +81,9 @@ def test_float_one_is_valid_passes(self): payload = ( 1.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py index b68af02fbcc..a28e7be8fb4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py @@ -37,9 +37,9 @@ def test_member2_is_valid_passes(self): payload = ( "foo\rbar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -67,9 +67,9 @@ def test_member1_is_valid_passes(self): payload = ( "foo\nbar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_another_string_is_invalid_fails(self): "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py index 5f5630a0b59..c54add351ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py @@ -37,9 +37,9 @@ def test_false_is_valid_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_float_zero_is_invalid_fails(self): 0.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -82,9 +82,9 @@ def test_integer_zero_is_invalid_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py index 362b23ad685..0eb7f9e4f0e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py @@ -38,9 +38,9 @@ def test_float_one_is_invalid_fails(self): 1.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_true_is_valid_passes(self): payload = ( True ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -82,9 +82,9 @@ def test_integer_one_is_invalid_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py index 0c6fb413d60..a392409d02d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py @@ -40,9 +40,9 @@ def test_missing_optional_property_is_valid_passes(self): "bar", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -76,9 +76,9 @@ def test_wrong_foo_value_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -94,9 +94,9 @@ def test_both_properties_are_valid_passes(self): "bar", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -130,9 +130,9 @@ def test_wrong_bar_value_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -145,9 +145,9 @@ def test_missing_all_properties_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -162,9 +162,9 @@ def test_missing_required_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py index 30d2bb2c598..bcde8b44ff5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py @@ -43,9 +43,9 @@ def test_property_present_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -61,9 +61,9 @@ def test_property_absent_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py index f571547b270..a6ee24e478f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py index 694ab48ba35..e58a77eb2c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py @@ -39,9 +39,9 @@ def test_an_object_is_not_an_integer_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -53,9 +53,9 @@ def test_a_string_is_not_an_integer_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -67,9 +67,9 @@ def test_null_is_not_an_integer_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -80,9 +80,9 @@ def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): payload = ( 1.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -111,9 +111,9 @@ def test_a_float_is_not_an_integer_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -125,9 +125,9 @@ def test_a_boolean_is_not_an_integer_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -138,9 +138,9 @@ def test_an_integer_is_an_integer_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -169,9 +169,9 @@ def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -184,9 +184,9 @@ def test_an_array_is_not_an_integer_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py index 7e08c067c59..da2a5fc1961 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py @@ -38,9 +38,9 @@ def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fa 1.0E308 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_valid_integer_with_multipleof_float_passes(self): payload = ( 123456789 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py index 4bea2c765a6..38be95b0f20 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py @@ -40,9 +40,9 @@ def test_valid_when_property_is_specified_passes(self): "good", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -71,9 +71,9 @@ def test_still_valid_when_the_invalid_default_is_used_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py index a9948ca5ad2..b7e8379bbfd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py index 1b1e979a101..fb8568e2952 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py index 93fbdd3e4bf..64384819aaa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py index ce67700b6dd..916633f55b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py @@ -37,9 +37,9 @@ def test_below_the_maximum_is_valid_passes(self): payload = ( 2.6 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -67,9 +67,9 @@ def test_boundary_point_is_valid_passes(self): payload = ( 3.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_above_the_maximum_is_invalid_fails(self): 3.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -111,9 +111,9 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py index 344a15f4dd2..8a0a57d42a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py @@ -37,9 +37,9 @@ def test_below_the_maximum_is_invalid_passes(self): payload = ( 299.97 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_above_the_maximum_is_invalid_fails(self): 300.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_boundary_point_integer_is_valid_passes(self): payload = ( 300 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -111,9 +111,9 @@ def test_boundary_point_float_is_valid_passes(self): payload = ( 300.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py index 7619d269d9f..3063b45ada8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py @@ -42,9 +42,9 @@ def test_too_long_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -55,9 +55,9 @@ def test_ignores_non_arrays_passes(self): payload = ( "foobar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -87,9 +87,9 @@ def test_shorter_is_valid_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -120,9 +120,9 @@ def test_exact_length_is_valid_passes(self): 2, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py index 5a8b29616bf..fde578d8304 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_too_long_is_invalid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_ignores_non_strings_passes(self): payload = ( 100 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -81,9 +81,9 @@ def test_shorter_is_valid_passes(self): payload = ( "f" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -111,9 +111,9 @@ def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): payload = ( "💩💩" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -141,9 +141,9 @@ def test_exact_length_is_valid_passes(self): payload = ( "fo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py index ac2b78f0a5e..332e765cb65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py @@ -38,9 +38,9 @@ def test_no_properties_is_valid_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -72,9 +72,9 @@ def test_one_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py index f8d77c92109..5582af475e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py @@ -45,9 +45,9 @@ def test_too_long_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -62,9 +62,9 @@ def test_ignores_arrays_passes(self): 3, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -92,9 +92,9 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -122,9 +122,9 @@ def test_ignores_strings_passes(self): payload = ( "foobar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -155,9 +155,9 @@ def test_shorter_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -190,9 +190,9 @@ def test_exact_length_is_valid_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py index dbddf328a5d..d8262a3651b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py @@ -37,9 +37,9 @@ def test_boundary_point_is_valid_passes(self): payload = ( 1.1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_below_the_minimum_is_invalid_fails(self): 0.6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_above_the_minimum_is_valid_passes(self): payload = ( 2.6 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -111,9 +111,9 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py index 70a8fbe0c6a..0742d31eac4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py @@ -37,9 +37,9 @@ def test_boundary_point_is_valid_passes(self): payload = ( -2 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -67,9 +67,9 @@ def test_positive_above_the_minimum_is_valid_passes(self): payload = ( 0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_int_below_the_minimum_is_invalid_fails(self): -3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -112,9 +112,9 @@ def test_float_below_the_minimum_is_invalid_fails(self): -2.0001 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -125,9 +125,9 @@ def test_boundary_point_with_float_is_valid_passes(self): payload = ( -2.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -155,9 +155,9 @@ def test_negative_above_the_minimum_is_valid_passes(self): payload = ( -1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -185,9 +185,9 @@ def test_ignores_non_numbers_passes(self): payload = ( "x" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py index e3e8eef31a0..cc18bf66c08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py @@ -39,9 +39,9 @@ def test_too_short_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_ignores_non_arrays_passes(self): payload = ( "" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -85,9 +85,9 @@ def test_longer_is_valid_passes(self): 2, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -117,9 +117,9 @@ def test_exact_length_is_valid_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py index f067cfb2608..bab32534e66 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_too_short_is_invalid_fails(self): "f" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): "💩" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -65,9 +65,9 @@ def test_longer_is_valid_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -95,9 +95,9 @@ def test_ignores_non_strings_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -125,9 +125,9 @@ def test_exact_length_is_valid_passes(self): payload = ( "fo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py index 77efeefd1e3..8f4443382fd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -100,9 +100,9 @@ def test_too_short_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -113,9 +113,9 @@ def test_ignores_strings_passes(self): payload = ( "" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -148,9 +148,9 @@ def test_longer_is_valid_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -181,9 +181,9 @@ def test_exact_length_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py index 4cac8da4035..14ce6918c0d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py @@ -38,9 +38,9 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py index 66bd488dba4..193edd18ec0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py @@ -38,9 +38,9 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py index 8b2ebd0863d..bc3920c80df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py @@ -66,9 +66,9 @@ def test_valid_nested_array_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -126,9 +126,9 @@ def test_nested_array_with_invalid_type_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -163,9 +163,9 @@ def test_not_deep_enough_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py index 79fae8b0c63..78ea94e0c0e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py @@ -38,9 +38,9 @@ def test_anything_non_null_is_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_null_is_valid_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py index c20953589b2..da684d22c1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py @@ -40,9 +40,9 @@ def test_other_match_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_mismatch_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -87,9 +87,9 @@ def test_match_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py index f323a8e8230..169efee31b7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py @@ -37,9 +37,9 @@ def test_allowed_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_disallowed_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py index 7cda19888ec..c3de333ced3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py @@ -37,9 +37,9 @@ def test_match_string_with_nul_passes(self): payload = ( "hello\x00there" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_do_not_match_string_lacking_nul_fails(self): "hellothere" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py index 2b2aa3d220e..62cee8ceee0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py @@ -38,9 +38,9 @@ def test_a_float_is_not_null_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -53,9 +53,9 @@ def test_an_object_is_not_null_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -67,9 +67,9 @@ def test_false_is_not_null_fails(self): False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_an_integer_is_not_null_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -95,9 +95,9 @@ def test_true_is_not_null_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -109,9 +109,9 @@ def test_zero_is_not_null_fails(self): 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -123,9 +123,9 @@ def test_an_empty_string_is_not_null_fails(self): "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -136,9 +136,9 @@ def test_null_is_null_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -168,9 +168,9 @@ def test_an_array_is_not_null_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -182,9 +182,9 @@ def test_a_string_is_not_null_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py index 462d1c17bd7..eced3ce39a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py @@ -39,9 +39,9 @@ def test_an_array_is_not_a_number_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -53,9 +53,9 @@ def test_null_is_not_a_number_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -68,9 +68,9 @@ def test_an_object_is_not_a_number_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -82,9 +82,9 @@ def test_a_boolean_is_not_a_number_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -95,9 +95,9 @@ def test_a_float_is_a_number_passes(self): payload = ( 1.1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -126,9 +126,9 @@ def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -140,9 +140,9 @@ def test_a_string_is_not_a_number_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -153,9 +153,9 @@ def test_an_integer_is_a_number_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -183,9 +183,9 @@ def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(sel payload = ( 1.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py index 5ef3c7a826a..9d2bbbe2319 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -105,9 +105,9 @@ def test_one_property_invalid_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -123,9 +123,9 @@ def test_both_properties_present_and_valid_is_valid_passes(self): "baz", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -157,9 +157,9 @@ def test_doesn_t_invalidate_other_properties_passes(self): ], } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -195,9 +195,9 @@ def test_both_properties_invalid_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py index c96b0772c46..227eba60ff6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py @@ -38,9 +38,9 @@ def test_a_float_is_not_an_object_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_null_is_not_an_object_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -67,9 +67,9 @@ def test_an_array_is_not_an_object_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_an_object_is_an_object_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -112,9 +112,9 @@ def test_a_string_is_not_an_object_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -126,9 +126,9 @@ def test_an_integer_is_not_an_object_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -140,9 +140,9 @@ def test_a_boolean_is_not_an_object_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py index 688337554a3..8efc6e74828 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py @@ -40,9 +40,9 @@ def test_first_oneof_valid_complex_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -76,9 +76,9 @@ def test_neither_oneof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -95,9 +95,9 @@ def test_both_oneof_valid_complex_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -111,9 +111,9 @@ def test_second_oneof_valid_complex_passes(self): "baz", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py index b8286a3094e..63ea9fd120e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py @@ -37,9 +37,9 @@ def test_second_oneof_valid_passes(self): payload = ( 2.5 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_both_oneof_valid_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -81,9 +81,9 @@ def test_first_oneof_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -112,9 +112,9 @@ def test_neither_oneof_valid_fails(self): 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py index c1aca49ec9f..255d481fb01 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py @@ -38,9 +38,9 @@ def test_both_oneof_valid_fails(self): "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -52,9 +52,9 @@ def test_mismatch_base_schema_fails(self): 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -65,9 +65,9 @@ def test_one_oneof_valid_passes(self): payload = ( "foobar" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py index e56ca68609f..cdce9abd24b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py @@ -38,9 +38,9 @@ def test_both_valid_invalid_fails(self): 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_one_valid_valid_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py index 6f02861219e..0c4f3a3590d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py @@ -45,9 +45,9 @@ def test_both_valid_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -62,9 +62,9 @@ def test_both_invalid_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -80,9 +80,9 @@ def test_first_valid_valid_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -115,9 +115,9 @@ def test_second_valid_valid_passes(self): 3, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py index 0d360657861..0033b8479e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py @@ -37,9 +37,9 @@ def test_matches_a_substring_passes(self): payload = ( "xxaayy" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py index fcd7cf37499..5b1225c2fe9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -69,9 +69,9 @@ def test_ignores_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -99,9 +99,9 @@ def test_ignores_null_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -129,9 +129,9 @@ def test_ignores_floats_passes(self): payload = ( 1.0 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -160,9 +160,9 @@ def test_a_non_matching_pattern_is_invalid_fails(self): "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -173,9 +173,9 @@ def test_ignores_booleans_passes(self): payload = ( True ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -203,9 +203,9 @@ def test_a_matching_pattern_is_valid_passes(self): payload = ( "aaa" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -233,9 +233,9 @@ def test_ignores_integers_passes(self): payload = ( 123 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py index e637aed94cc..9c4582a563f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py @@ -50,9 +50,9 @@ def test_object_with_all_numbers_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -94,9 +94,9 @@ def test_object_with_strings_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py index b4de0ea88c2..165d0824cde 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py @@ -40,9 +40,9 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py index d8a9b509097..fdbd7138e1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py @@ -43,9 +43,9 @@ def test_property_named_ref_valid_passes(self): }, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -80,9 +80,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py index 8c90cc228b0..eea27eecfba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py @@ -40,9 +40,9 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py index e6ef6d1bc08..bc076beca9f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py @@ -40,9 +40,9 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py index 85e5c628d52..f64f821b240 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py @@ -42,9 +42,9 @@ def test_property_named_ref_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -78,9 +78,9 @@ def test_property_named_ref_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py index 412a9122a9a..ae61c3d2420 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py @@ -40,9 +40,9 @@ def test_property_named_ref_valid_passes(self): 2, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py index 7f14d63262e..60d23e4199a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py @@ -40,9 +40,9 @@ def test_property_named_ref_valid_passes(self): "a", } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -74,9 +74,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py index f81d4221f98..c2c4a9aa0cf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py @@ -43,9 +43,9 @@ def test_property_named_ref_valid_passes(self): }, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -80,9 +80,9 @@ def test_property_named_ref_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py index 85ca95b6909..616c2fe7da4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_not_required_by_default_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py index b6f82d684f8..854cbd672c7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_ignores_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -71,9 +71,9 @@ def test_present_required_property_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -101,9 +101,9 @@ def test_ignores_other_non_objects_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -131,9 +131,9 @@ def test_ignores_strings_passes(self): payload = ( "" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -165,9 +165,9 @@ def test_non_present_required_property_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py index f58036a6316..0a7f19b8b09 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py @@ -38,9 +38,9 @@ def test_property_not_required_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py index 0835214ff4d..c1bc44bd088 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py @@ -43,9 +43,9 @@ def test_object_with_some_properties_missing_is_invalid_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -69,9 +69,9 @@ def test_object_with_all_properties_present_is_valid_passes(self): 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py index d495d345199..bf9f08f4754 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py @@ -38,9 +38,9 @@ def test_something_else_is_invalid_fails(self): 4 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_one_of_the_enum_is_valid_passes(self): payload = ( 1 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py index 8264b0ed117..5d4cee79e60 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py @@ -38,9 +38,9 @@ def test_1_is_not_a_string_fails(self): 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -51,9 +51,9 @@ def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): payload = ( "1" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -81,9 +81,9 @@ def test_an_empty_string_is_still_a_string_passes(self): payload = ( "" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -112,9 +112,9 @@ def test_a_float_is_not_a_string_fails(self): 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -127,9 +127,9 @@ def test_an_object_is_not_a_string_fails(self): } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -142,9 +142,9 @@ def test_an_array_is_not_a_string_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -156,9 +156,9 @@ def test_a_boolean_is_not_a_string_fails(self): True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -170,9 +170,9 @@ def test_null_is_not_a_string_fails(self): None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -183,9 +183,9 @@ def test_a_string_is_a_string_passes(self): payload = ( "foo" ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py index c40840cfc15..1de20d59d3e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py @@ -38,9 +38,9 @@ def test_missing_properties_are_not_filled_in_with_the_default_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -71,9 +71,9 @@ def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(se 1, } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -105,9 +105,9 @@ def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(sel } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py index 74d02e77830..47bd3452311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py @@ -40,9 +40,9 @@ def test_non_unique_array_of_integers_is_valid_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -79,9 +79,9 @@ def test_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -130,9 +130,9 @@ def test_non_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -169,9 +169,9 @@ def test_non_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -202,9 +202,9 @@ def test_1_and_true_are_unique_passes(self): True, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -235,9 +235,9 @@ def test_unique_array_of_integers_is_valid_passes(self): 2, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -272,9 +272,9 @@ def test_non_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -306,9 +306,9 @@ def test_numbers_are_unique_if_mathematically_unequal_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -339,9 +339,9 @@ def test_false_is_not_equal_to_zero_passes(self): False, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -390,9 +390,9 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -423,9 +423,9 @@ def test_0_and_false_are_unique_passes(self): False, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -460,9 +460,9 @@ def test_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -493,9 +493,9 @@ def test_true_is_not_equal_to_one_passes(self): True, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -534,9 +534,9 @@ def test_non_unique_heterogeneous_types_are_valid_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -573,9 +573,9 @@ def test_unique_heterogeneous_types_are_valid_passes(self): 1, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py index c750957e9e8..0af1bab8859 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py @@ -46,9 +46,9 @@ def test_unique_array_of_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -85,9 +85,9 @@ def test_a_true_and_a1_are_unique_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -127,9 +127,9 @@ def test_non_unique_heterogeneous_types_are_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -153,9 +153,9 @@ def test_nested0_and_false_are_unique_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -192,9 +192,9 @@ def test_a_false_and_a0_are_unique_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -227,9 +227,9 @@ def test_numbers_are_unique_if_mathematically_unequal_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -243,9 +243,9 @@ def test_false_is_not_equal_to_zero_passes(self): False, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -280,9 +280,9 @@ def test_0_and_false_are_unique_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -317,9 +317,9 @@ def test_unique_array_of_arrays_is_valid_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -369,9 +369,9 @@ def test_non_unique_array_of_nested_objects_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -387,9 +387,9 @@ def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -403,9 +403,9 @@ def test_true_is_not_equal_to_one_passes(self): True, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -447,9 +447,9 @@ def test_objects_are_non_unique_despite_key_order_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -464,9 +464,9 @@ def test_unique_array_of_strings_is_valid_passes(self): "baz", ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -501,9 +501,9 @@ def test_1_and_true_are_unique_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -544,9 +544,9 @@ def test_different_objects_are_unique_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -577,9 +577,9 @@ def test_unique_array_of_integers_is_valid_passes(self): 2, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -618,9 +618,9 @@ def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -641,9 +641,9 @@ def test_non_unique_array_of_objects_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -675,9 +675,9 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -713,9 +713,9 @@ def test_non_unique_array_of_arrays_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -731,9 +731,9 @@ def test_non_unique_array_of_strings_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) @@ -757,9 +757,9 @@ def test_nested1_and_true_are_unique_passes(self): ], ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -797,9 +797,9 @@ def test_unique_heterogeneous_types_are_valid_passes(self): "{}", ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -831,9 +831,9 @@ def test_non_unique_array_of_integers_is_invalid_fails(self): ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) self.api.post(body=body) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py index 8ace838bbe5..3cc0beabcf7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py index fca23685ddc..5c08623b302 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py index b0f29e0e939..3bb19fef352 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py @@ -38,9 +38,9 @@ def test_all_string_formats_ignore_objects_passes(self): { } ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -68,9 +68,9 @@ def test_all_string_formats_ignore_booleans_passes(self): payload = ( False ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -98,9 +98,9 @@ def test_all_string_formats_ignore_integers_passes(self): payload = ( 12 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -128,9 +128,9 @@ def test_all_string_formats_ignore_floats_passes(self): payload = ( 13.7 ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -159,9 +159,9 @@ def test_all_string_formats_ignore_arrays_passes(self): [ ] ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), @@ -189,9 +189,9 @@ def test_all_string_formats_ignore_nulls_passes(self): payload = ( None ) - body = post.request_body.RequestBody.content["application/json"].schema.from_openapi_data_( + body = post.request_body.RequestBody.content["application/json"].schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) mock_request.return_value = self.response( self.json_bytes(self.response_body), diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py index 84ef58965d2..1d268e35657 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_no_additional_properties_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -126,9 +126,9 @@ def test_an_additional_valid_property_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py index c571322fcd4..0e2453f4d41 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py @@ -62,9 +62,9 @@ def test_additional_properties_are_allowed_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py index 0d1efdfb80a..39048124e4f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py @@ -85,9 +85,9 @@ def test_an_additional_valid_property_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py index ab19e3d8f8e..d7b1b7ad9ed 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py @@ -89,9 +89,9 @@ def test_valid_test_case_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py index 341f48266b0..3467b596aa0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py @@ -151,9 +151,9 @@ def test_allof_true_anyof_true_oneof_true_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py index f82b0391fa2..f132c9458a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py @@ -60,9 +60,9 @@ def test_allof_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py index 1c673eb4462..97f5b50dcc6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py index 1f927a5ef30..7e15a5dbf22 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py @@ -62,9 +62,9 @@ def test_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py index dab2d49f05c..45b9993ca8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_any_data_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py index 104a4a6bfd3..4f4c8413357 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_number_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py index db94f6e744d..f2d2107e6c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_number_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py index 2d27c950636..31cb1fec1a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_any_data_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py index 024e2f521c1..cec0027e36c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_second_anyof_valid_complex_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -122,9 +122,9 @@ def test_both_anyof_valid_complex_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -155,9 +155,9 @@ def test_first_anyof_valid_complex_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py index c62ddd2229a..899aafa04a2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_second_anyof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_both_anyof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -139,9 +139,9 @@ def test_first_anyof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py index 430a1d6c359..a5369d7471f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_one_anyof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py index 28bec0c94f8..a9b180943b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_string_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -85,9 +85,9 @@ def test_number_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py index f1b175875fe..1df2749ce55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py @@ -177,9 +177,9 @@ def test_an_array_is_an_array_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py index 5d489bf5914..151772063c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py @@ -200,9 +200,9 @@ def test_false_is_a_boolean_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -254,9 +254,9 @@ def test_true_is_a_boolean_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py index dff50a95b87..1c2eca4ad0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_int_by_int_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_ignores_non_numbers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py index f374111600d..a82d9cdbfe4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_45_is_multiple_of15_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_zero_is_multiple_of_anything_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py index 6609e16fcb3..537c66dae21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_00075_is_multiple_of00001_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py index c4deb3012e4..1f427a52f3b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py index a1d6fafd790..fb74fc7ecee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py index 95b4319ae30..ed65ea6cbbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_integer_zero_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -85,9 +85,9 @@ def test_float_zero_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py index 9b163553252..699ac6f7a2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_integer_one_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_float_one_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py index 3c378a44dca..1bbf16a57b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_member2_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -85,9 +85,9 @@ def test_member1_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py index c1ab1e56f79..a0be659a637 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_false_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py index c89f4ad56c5..ece254eb941 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_true_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py index faa860a4ab1..86398b296b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_missing_optional_property_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -122,9 +122,9 @@ def test_both_properties_are_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py index 183a30de6aa..46c9287fb5c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py @@ -89,9 +89,9 @@ def test_property_absent_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py index 23508a83d45..89263e703a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py index 430774aa4db..1a032861e05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py @@ -128,9 +128,9 @@ def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -206,9 +206,9 @@ def test_an_integer_is_an_integer_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py index eba4e486d2b..cfbf7e9ac83 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_valid_integer_with_multipleof_float_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py index 05ed381d4b2..3b14195eb2b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_valid_when_property_is_specified_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -89,9 +89,9 @@ def test_still_valid_when_the_invalid_default_is_used_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py index 234c247fa46..a9718c27913 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py index 969b83215bb..948f6b1ccdd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py index 5638fff2d63..1835384a8e9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py index bbc38df2529..24aebdf8e0c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_below_the_maximum_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -85,9 +85,9 @@ def test_boundary_point_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -139,9 +139,9 @@ def test_ignores_non_numbers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py index 6ecedef1eed..d1c75b37ae4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_below_the_maximum_is_invalid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_boundary_point_integer_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -139,9 +139,9 @@ def test_boundary_point_float_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py index 019ccba3caf..bbf6beb188e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py @@ -83,9 +83,9 @@ def test_ignores_non_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -115,9 +115,9 @@ def test_shorter_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -148,9 +148,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py index bd68f747a60..4447c6b1d96 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_ignores_non_strings_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_shorter_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -139,9 +139,9 @@ def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -169,9 +169,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py index 27a206ff5a2..22e77cd30a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_no_properties_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py index 2a36c571442..edd49351777 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py @@ -90,9 +90,9 @@ def test_ignores_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -120,9 +120,9 @@ def test_ignores_other_non_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -150,9 +150,9 @@ def test_ignores_strings_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -183,9 +183,9 @@ def test_shorter_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -218,9 +218,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py index 1bdd16c637f..0b643fda6d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_boundary_point_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_above_the_minimum_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -139,9 +139,9 @@ def test_ignores_non_numbers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py index f9eb34610ca..8b6972c6090 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_boundary_point_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -85,9 +85,9 @@ def test_positive_above_the_minimum_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -163,9 +163,9 @@ def test_boundary_point_with_float_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -193,9 +193,9 @@ def test_negative_above_the_minimum_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -223,9 +223,9 @@ def test_ignores_non_numbers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py index 95f6d7c87ca..fdb60bd4b28 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py @@ -80,9 +80,9 @@ def test_ignores_non_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -113,9 +113,9 @@ def test_longer_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -145,9 +145,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py index cca4c80930f..dcf80e6eea8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py @@ -103,9 +103,9 @@ def test_longer_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -133,9 +133,9 @@ def test_ignores_non_strings_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -163,9 +163,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py index 91e62513769..9f07f1ffac6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_ignores_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_ignores_other_non_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -141,9 +141,9 @@ def test_ignores_strings_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -176,9 +176,9 @@ def test_longer_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -209,9 +209,9 @@ def test_exact_length_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py index 53dcc587d22..fbe2c72625e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_null_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py index fd2da48fb03..236d28b0e6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_null_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py index bcc2824fd75..32c5476f86d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py @@ -84,9 +84,9 @@ def test_valid_nested_array_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py index bb40e5af7c4..99fb7a12e4e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_null_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py index 552b499cae5..a347d33b5f5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_other_match_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -115,9 +115,9 @@ def test_match_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py index d4abb87b57c..c825226753d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_allowed_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py index 9bfcf8b0cfb..126fc76eca9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_match_string_with_nul_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py index d65ff667891..b5b495287b9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py @@ -224,9 +224,9 @@ def test_null_is_null_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py index df0756ec73d..b9f3e70e1ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py @@ -153,9 +153,9 @@ def test_a_float_is_a_number_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -231,9 +231,9 @@ def test_an_integer_is_a_number_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -261,9 +261,9 @@ def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(sel assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py index 87f64cc7950..819833532fa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_ignores_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_ignores_other_non_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -151,9 +151,9 @@ def test_both_properties_present_and_valid_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -185,9 +185,9 @@ def test_doesn_t_invalidate_other_properties_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py index 6c318786299..99dba93528a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py @@ -129,9 +129,9 @@ def test_an_object_is_an_object_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py index 05fa5051d2e..f64e4afe54c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_first_oneof_valid_complex_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -149,9 +149,9 @@ def test_second_oneof_valid_complex_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py index 88ad93279cb..8242da229c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_second_oneof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_first_oneof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py index 43c2afa584b..bc095d91fd7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py @@ -103,9 +103,9 @@ def test_one_oneof_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py index c2db5988b42..e3e1225e469 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_one_valid_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py index 4b9c919de05..fe51fda4388 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py @@ -118,9 +118,9 @@ def test_first_valid_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -153,9 +153,9 @@ def test_second_valid_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py index ce6ec5a5bbe..e048f3a6e07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py @@ -55,9 +55,9 @@ def test_matches_a_substring_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py index d34d2ce7768..f12e6cda66b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_ignores_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -87,9 +87,9 @@ def test_ignores_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -117,9 +117,9 @@ def test_ignores_null_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -147,9 +147,9 @@ def test_ignores_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -201,9 +201,9 @@ def test_ignores_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -231,9 +231,9 @@ def test_a_matching_pattern_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -261,9 +261,9 @@ def test_ignores_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py index 15c45d4a412..1cc8ad6ee0b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py @@ -68,9 +68,9 @@ def test_object_with_all_numbers_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py index c886c16d4cd..e7a04da581b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py index 766520ed0d0..6a53f2d55ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py @@ -61,9 +61,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py index c7139267349..df00692dd7c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py index 01bd7297c37..40998960a72 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py index 484d131ef01..1c3ec604a69 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py @@ -60,9 +60,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py index 0c6bc902d75..1fedd1a7574 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py index 5c877f69622..72ddc1930f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py index fec60bf40a9..afac8c12930 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py @@ -61,9 +61,9 @@ def test_property_named_ref_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py index 32999f7f304..4bd5ced0712 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_not_required_by_default_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py index 894a88c11d9..0366479ca91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_ignores_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -89,9 +89,9 @@ def test_present_required_property_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -119,9 +119,9 @@ def test_ignores_other_non_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -149,9 +149,9 @@ def test_ignores_strings_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py index b105d03bcd0..4abddf61cb9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_property_not_required_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py index 7d3a76dc3eb..a5a548b5146 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py @@ -97,9 +97,9 @@ def test_object_with_all_properties_present_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py index 51206ee3cb5..d0488d213b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_one_of_the_enum_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py index a7e6548a686..d2311fe16bb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py @@ -79,9 +79,9 @@ def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -109,9 +109,9 @@ def test_an_empty_string_is_still_a_string_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -261,9 +261,9 @@ def test_a_string_is_a_string_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py index ec32ca0632a..b295d5951b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_missing_properties_are_not_filled_in_with_the_default_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -89,9 +89,9 @@ def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(se assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py index f2c445f51d3..132d78cdc11 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py @@ -58,9 +58,9 @@ def test_non_unique_array_of_integers_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -97,9 +97,9 @@ def test_unique_array_of_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -148,9 +148,9 @@ def test_non_unique_array_of_nested_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -187,9 +187,9 @@ def test_non_unique_array_of_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -220,9 +220,9 @@ def test_1_and_true_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -253,9 +253,9 @@ def test_unique_array_of_integers_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -290,9 +290,9 @@ def test_non_unique_array_of_arrays_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -324,9 +324,9 @@ def test_numbers_are_unique_if_mathematically_unequal_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -357,9 +357,9 @@ def test_false_is_not_equal_to_zero_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -408,9 +408,9 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -441,9 +441,9 @@ def test_0_and_false_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -478,9 +478,9 @@ def test_unique_array_of_arrays_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -511,9 +511,9 @@ def test_true_is_not_equal_to_one_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -552,9 +552,9 @@ def test_non_unique_heterogeneous_types_are_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -591,9 +591,9 @@ def test_unique_heterogeneous_types_are_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py index 8d7a20a6744..58045f15e15 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py @@ -64,9 +64,9 @@ def test_unique_array_of_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -103,9 +103,9 @@ def test_a_true_and_a1_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -181,9 +181,9 @@ def test_nested0_and_false_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -220,9 +220,9 @@ def test_a_false_and_a0_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -281,9 +281,9 @@ def test_false_is_not_equal_to_zero_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -318,9 +318,9 @@ def test_0_and_false_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -355,9 +355,9 @@ def test_unique_array_of_arrays_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -461,9 +461,9 @@ def test_true_is_not_equal_to_one_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -532,9 +532,9 @@ def test_unique_array_of_strings_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -569,9 +569,9 @@ def test_1_and_true_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -612,9 +612,9 @@ def test_different_objects_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -645,9 +645,9 @@ def test_unique_array_of_integers_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -763,9 +763,9 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -865,9 +865,9 @@ def test_nested1_and_true_are_unique_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -905,9 +905,9 @@ def test_unique_heterogeneous_types_are_valid_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py index f580c7f48ae..ba5f4983c54 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py index 78c81d27efd..32f2c55f804 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py index 553a3776b24..3a452288864 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py @@ -56,9 +56,9 @@ def test_all_string_formats_ignore_objects_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -86,9 +86,9 @@ def test_all_string_formats_ignore_booleans_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -116,9 +116,9 @@ def test_all_string_formats_ignore_integers_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -146,9 +146,9 @@ def test_all_string_formats_ignore_floats_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -177,9 +177,9 @@ def test_all_string_formats_ignore_arrays_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body @@ -207,9 +207,9 @@ def test_all_string_formats_ignore_nulls_passes(self): assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, self.response_body_schema) - deserialized_response_body = self.response_body_schema.from_openapi_data_( + deserialized_response_body = self.response_body_schema( payload, - configuration_=self.schema_config + configuration=self.schema_config ) assert api_response.body == deserialized_response_body diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/VERSION b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/VERSION index 4a36342fcab..56fea8a08d2 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0 +3.0.0 \ No newline at end of file diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md index 95b9d458f05..5cdda24ff2c 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md @@ -184,9 +184,9 @@ with this_package.ApiClient(used_configuration) as api_client: # example passing only optional values body = operator.Operator( - a=3.14, - b=3.14, - operator_id="ADD", + "a": 3.14, + "b": 3.14, + "operator_id": "ADD", ) try: api_response = api_instance.post_operators( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md index 16b22e33d04..517d8cf9134 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md @@ -92,9 +92,9 @@ with this_package.ApiClient(used_configuration) as api_client: # example passing only optional values body = operator.Operator( - a=3.14, - b=3.14, - operator_id="ADD", + "a": 3.14, + "b": 3.14, + "operator_id": "ADD", ) try: api_response = api_instance.post_operators( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py index a31aad6b161..62ef16a7352 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py @@ -719,13 +719,13 @@ def deserialize( """ if cls.style: extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.from_openapi_data_(extracted_data) + return cls.schema(extracted_data) assert cls.content is not None for content_type, media_type in cls.content.items(): if cls._content_type_is_json(content_type): cast_in_data = json.loads(in_data) assert media_type.schema is not None - return media_type.schema.from_openapi_data_(cast_in_data) + return media_type.schema(cast_in_data) else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') @@ -940,8 +940,12 @@ def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_confi content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_( - body_data, configuration_=configuration) + body_schema = schemas._get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema(body_data) + else: + deserialized_body = body_schema( + body_data, configuration=configuration) elif streamed: response.release_conn() @@ -1410,8 +1414,6 @@ def serialize( schema = schemas._get_class(media_type.schema) if isinstance(in_data, schema): cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = schema(**in_data) else: cast_in_data = schema(in_data) # TODO check for and use encoding if it exists diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py index 93cc2e9090f..ae9c035dad5 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py @@ -34,6 +34,27 @@ class Schema_(metaclass=schemas.SingletonMeta): "operator_id": typing.Type[OperatorId], } ) +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', + { + "a": typing.Union[ + A[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "b": typing.Union[ + B[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "operator_id": typing.Union[ + OperatorId[str], + str + ], + } +) class AdditionOperator( @@ -91,32 +112,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[ - A[decimal.Decimal], - decimal.Decimal, - int, - float - ], - b: typing.Union[ - B[decimal.Decimal], - decimal.Decimal, - int, - float - ], - operator_id: typing.Union[ - OperatorId[str], - str + arg: typing.Union[ + DictInput3, + AdditionOperator[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> AdditionOperator[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - a=a, - b=b, - operator_id=operator_id, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( AdditionOperator[frozendict.frozendict], diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py index 3a97af0bf1f..bd4cf512168 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py @@ -10,6 +10,7 @@ from __future__ import annotations from this_package.shared_imports.schema_imports import * +DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] class Operator( @@ -40,9 +41,11 @@ class Schema_(metaclass=schemas.SingletonMeta): def __new__( cls, - *args_: schemas.INPUT_TYPES_ALL_INCL_SCHEMA, - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL_INCL_SCHEMA + arg: typing.Union[ + DictInput, + schemas.INPUT_TYPES_ALL_INCL_SCHEMA + ], + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> Operator[ typing.Union[ frozendict.frozendict, @@ -57,9 +60,8 @@ def __new__( ]: inst = super().__new__( cls, - *args_, - configuration_=configuration_, - **kwargs, + arg, + configuration=configuration, ) inst = typing.cast( Operator[ diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py index 3ffa4bf9909..ffa85b8aec6 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py @@ -34,6 +34,27 @@ class Schema_(metaclass=schemas.SingletonMeta): "operator_id": typing.Type[OperatorId], } ) +DictInput3 = typing_extensions.TypedDict( + 'DictInput3', + { + "a": typing.Union[ + A[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "b": typing.Union[ + B[decimal.Decimal], + decimal.Decimal, + int, + float + ], + "operator_id": typing.Union[ + OperatorId[str], + str + ], + } +) class SubtractionOperator( @@ -91,32 +112,16 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[ - A[decimal.Decimal], - decimal.Decimal, - int, - float - ], - b: typing.Union[ - B[decimal.Decimal], - decimal.Decimal, - int, - float - ], - operator_id: typing.Union[ - OperatorId[str], - str + arg: typing.Union[ + DictInput3, + SubtractionOperator[frozendict.frozendict], ], - configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, + configuration: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None ) -> SubtractionOperator[frozendict.frozendict]: inst = super().__new__( cls, - *args_, - a=a, - b=b, - operator_id=operator_id, - configuration_=configuration_, + arg, + configuration=configuration, ) inst = typing.cast( SubtractionOperator[frozendict.frozendict], diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py index 2ff8b5046c0..f24dc612a17 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py @@ -46,18 +46,18 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg_, (io.FileIO, io.BufferedReader)): - if arg_.closed: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg_.close() + arg.close() super_cls: typing.Type = super(FileIO, cls) - inst = super_cls.__new__(cls, arg_.name) - super(FileIO, inst).__init__(arg_.name) + inst = super_cls.__new__(cls, arg.name) + super(FileIO, inst).__init__(arg.name) return inst - raise exceptions.ApiValueError('FileIO must be passed arg_ which contains the open file') + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - def __init__(self, arg_: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): """ if this does not exist, then classes with FileIO as a mixin (AnyType etc) will see the io.FileIO __init__ signature rather than the __new__ one @@ -129,11 +129,11 @@ def __call__(cls, *args, **kwargs): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg_) + The same instance is returned for a given key of (cls, arg) """ _instances = {} - def __new__(cls, arg_: typing.Any, **kwargs): + def __new__(cls, arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -141,16 +141,16 @@ def __new__(cls, arg_: typing.Any, **kwargs): Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg_, str(arg_)) + key = (cls, arg, str(arg)) if key not in cls._instances: - if isinstance(arg_, (none_type_, bool, BoolClass, NoneClass)): + if isinstance(arg, (none_type_, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: super_inst: typing.Type = super() - cls._instances[key] = super_inst.__new__(cls, arg_) + cls._instances[key] = super_inst.__new__(cls, arg) return cls._instances[key] def __repr__(self): @@ -1427,60 +1427,13 @@ def _get_new_instance_without_conversion( used_arg = arg return super_cls.__new__(cls, used_arg) - @classmethod - def from_openapi_data_( - cls, - arg: typing.Union[ - str, - int, - float, - bool, - None, - dict, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - """ - Schema from_openapi_data_ - """ - from_server = True - validated_path_to_schemas = {} - path_to_type = {} - cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - @staticmethod def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ dict, frozendict.frozendict, list, @@ -1499,49 +1452,20 @@ def __new__( io.BufferedReader, 'Schema', ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - Unset, - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - 'Schema', - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ Schema __new__ Args: - args_ (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables are instance properties if they are named normally :( """ - __kwargs = cls.__remove_unsets(kwargs) - if not args_ and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and args_ and not isinstance(args_[0], dict): - __arg = args_[0] - else: - __arg = cls.__get_input_dict(*args_, **__kwargs) + __arg = arg __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -1549,7 +1473,7 @@ def __new__( __arg, __from_server, __validated_path_to_schemas, ('args[0]',), __path_to_type) __validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(__validated_path_to_schemas) ) __path_to_schemas = cls.__get_new_cls(cast_arg, __validation_metadata, __path_to_type) @@ -2208,12 +2132,12 @@ class ListSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Sequence[typing.Any], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ListSchema[tuple]: + return super().__new__(cls, arg, configuration=configuration) class NoneSchema( @@ -2225,12 +2149,12 @@ class NoneSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) - @classmethod - def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, configuration=configuration) class NumberSchema( @@ -2246,12 +2170,12 @@ class NumberSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) - @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, configuration=configuration) class IntBase: @@ -2272,12 +2196,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int' - @classmethod - def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2289,8 +2213,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2302,8 +2230,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2315,12 +2247,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'float' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2332,12 +2264,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'double' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2356,12 +2288,12 @@ class StrSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) - @classmethod - def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StrSchema[str]: + return super().__new__(cls, arg, configuration=configuration) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2370,8 +2302,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg_: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(UUIDSchema[str], inst) @@ -2381,8 +2317,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg_: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateSchema[str], inst) @@ -2392,8 +2332,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg_: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateTimeSchema[str], inst) @@ -2403,7 +2347,11 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2412,7 +2360,7 @@ def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg_, **kwargs) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DecimalSchema[str], inst) @@ -2427,9 +2375,13 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg_: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class FileSchema( @@ -2456,9 +2408,13 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class BinarySchema( @@ -2475,8 +2431,12 @@ class Schema_(metaclass=SingletonMeta): FileSchema, ) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: - return super().__new__(cls, arg_) + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BinarySchema[typing.Union[FileIO, bytes]]: + return super().__new__(cls, arg) class BoolSchema( @@ -2488,12 +2448,12 @@ class BoolSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) - @classmethod - def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BoolSchema[bool]: + return super().__new__(cls, arg, configuration=configuration) class AnyTypeSchema( @@ -2513,7 +2473,7 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2531,26 +2491,7 @@ def __new__( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader, - Unset - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> AnyTypeSchema[typing.Union[ NoneClass, frozendict.frozendict, @@ -2559,30 +2500,11 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *args_, configuration_=configuration_, **kwargs) + return super().__new__(cls, arg, configuration=configuration) def __init__( self, - *args_: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2600,6 +2522,7 @@ def __init__( io.FileIO, io.BufferedReader ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ this exists to override the __init__ method form FileIO in NoneFrozenDictTupleStrDecimalBoolFileBytesMixin @@ -2625,10 +2548,10 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *args_, configuration_=configuration_) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2641,17 +2564,12 @@ class DictSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) - @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], + arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *args_, **kwargs, configuration_=configuration_) + return super().__new__(cls, arg, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/features/security/python/.openapi-generator/VERSION b/samples/openapi3/client/features/security/python/.openapi-generator/VERSION index 4a36342fcab..56fea8a08d2 100644 --- a/samples/openapi3/client/features/security/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/security/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0 +3.0.0 \ No newline at end of file diff --git a/samples/openapi3/client/features/security/python/src/this_package/api_client.py b/samples/openapi3/client/features/security/python/src/this_package/api_client.py index 0d6dec316d3..3783ffc0f1e 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/api_client.py +++ b/samples/openapi3/client/features/security/python/src/this_package/api_client.py @@ -719,13 +719,13 @@ def deserialize( """ if cls.style: extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.from_openapi_data_(extracted_data) + return cls.schema(extracted_data) assert cls.content is not None for content_type, media_type in cls.content.items(): if cls._content_type_is_json(content_type): cast_in_data = json.loads(in_data) assert media_type.schema is not None - return media_type.schema.from_openapi_data_(cast_in_data) + return media_type.schema(cast_in_data) else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') @@ -940,8 +940,12 @@ def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_confi content_type = 'multipart/form-data' else: raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_( - body_data, configuration_=configuration) + body_schema = schemas._get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema(body_data) + else: + deserialized_body = body_schema( + body_data, configuration=configuration) elif streamed: response.release_conn() @@ -1410,8 +1414,6 @@ def serialize( schema = schemas._get_class(media_type.schema) if isinstance(in_data, schema): cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = schema(**in_data) else: cast_in_data = schema(in_data) # TODO check for and use encoding if it exists diff --git a/samples/openapi3/client/features/security/python/src/this_package/schemas.py b/samples/openapi3/client/features/security/python/src/this_package/schemas.py index 835416dd93b..e4cd79c2c49 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/schemas.py +++ b/samples/openapi3/client/features/security/python/src/this_package/schemas.py @@ -46,18 +46,18 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg_, (io.FileIO, io.BufferedReader)): - if arg_.closed: + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg_.close() + arg.close() super_cls: typing.Type = super(FileIO, cls) - inst = super_cls.__new__(cls, arg_.name) - super(FileIO, inst).__init__(arg_.name) + inst = super_cls.__new__(cls, arg.name) + super(FileIO, inst).__init__(arg.name) return inst - raise exceptions.ApiValueError('FileIO must be passed arg_ which contains the open file') + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - def __init__(self, arg_: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): """ if this does not exist, then classes with FileIO as a mixin (AnyType etc) will see the io.FileIO __init__ signature rather than the __new__ one @@ -129,11 +129,11 @@ def __call__(cls, *args, **kwargs): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg_) + The same instance is returned for a given key of (cls, arg) """ _instances = {} - def __new__(cls, arg_: typing.Any, **kwargs): + def __new__(cls, arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -141,16 +141,16 @@ def __new__(cls, arg_: typing.Any, **kwargs): Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg_, str(arg_)) + key = (cls, arg, str(arg)) if key not in cls._instances: - if isinstance(arg_, (none_type_, bool, BoolClass, NoneClass)): + if isinstance(arg, (none_type_, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: super_inst: typing.Type = super() - cls._instances[key] = super_inst.__new__(cls, arg_) + cls._instances[key] = super_inst.__new__(cls, arg) return cls._instances[key] def __repr__(self): @@ -1350,60 +1350,13 @@ def _get_new_instance_without_conversion( used_arg = arg return super_cls.__new__(cls, used_arg) - @classmethod - def from_openapi_data_( - cls, - arg: typing.Union[ - str, - int, - float, - bool, - None, - dict, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - """ - Schema from_openapi_data_ - """ - from_server = True - validated_path_to_schemas = {} - path_to_type = {} - cast_arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=frozendict.frozendict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_new_cls(cast_arg, validation_metadata, path_to_type) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - @staticmethod def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ dict, frozendict.frozendict, list, @@ -1422,49 +1375,20 @@ def __new__( io.BufferedReader, 'Schema', ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - Unset, - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - 'Schema', - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ Schema __new__ Args: - args_ (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - configuration_: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + arg (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords like minItems, minLength etc Note: double underscores are used here because pycharm thinks that these variables are instance properties if they are named normally :( """ - __kwargs = cls.__remove_unsets(kwargs) - if not args_ and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and args_ and not isinstance(args_[0], dict): - __arg = args_[0] - else: - __arg = cls.__get_input_dict(*args_, **__kwargs) + __arg = arg __from_server = False __validated_path_to_schemas = {} __path_to_type = {} @@ -1472,7 +1396,7 @@ def __new__( __arg, __from_server, __validated_path_to_schemas, ('args[0]',), __path_to_type) __validation_metadata = ValidationMetadata( path_to_item=('args[0]',), - configuration=configuration_ or schema_configuration.SchemaConfiguration(), + configuration=configuration or schema_configuration.SchemaConfiguration(), validated_path_to_schemas=frozendict.frozendict(__validated_path_to_schemas) ) __path_to_schemas = cls.__get_new_cls(cast_arg, __validation_metadata, __path_to_type) @@ -2131,12 +2055,12 @@ class ListSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - @classmethod - def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Sequence[typing.Any], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ListSchema[tuple]: + return super().__new__(cls, arg, configuration=configuration) class NoneSchema( @@ -2148,12 +2072,12 @@ class NoneSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({NoneClass}) - @classmethod - def from_openapi_data_(cls, arg: None, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: None, **kwargs: schema_configuration.SchemaConfiguration) -> NoneSchema[NoneClass]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoneSchema[NoneClass]: + return super().__new__(cls, arg, configuration=configuration) class NumberSchema( @@ -2169,12 +2093,12 @@ class NumberSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) - @classmethod - def from_openapi_data_(cls, arg: typing.Union[int, float], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> NumberSchema[decimal.Decimal]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberSchema[decimal.Decimal]: + return super().__new__(cls, arg, configuration=configuration) class IntBase: @@ -2195,12 +2119,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int' - @classmethod - def from_openapi_data_(cls, arg: int, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> IntSchema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> IntSchema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration) return typing.cast(IntSchema[decimal.Decimal], inst) @@ -2212,8 +2136,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int32' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int32Schema[decimal.Decimal], inst) @@ -2225,8 +2153,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'int64' - def __new__(cls, arg_: typing.Union[decimal.Decimal, int], **kwargs: schema_configuration.SchemaConfiguration) -> Int64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Int64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Int64Schema[decimal.Decimal], inst) @@ -2238,12 +2170,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'float' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float32Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float32Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float32Schema[decimal.Decimal], inst) @@ -2255,12 +2187,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({decimal.Decimal}) format: str = 'double' - @classmethod - def from_openapi_data_(cls, arg: float, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[decimal.Decimal, int, float], **kwargs: schema_configuration.SchemaConfiguration) -> Float64Schema[decimal.Decimal]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[decimal.Decimal, int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> Float64Schema[decimal.Decimal]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(Float64Schema[decimal.Decimal], inst) @@ -2279,12 +2211,12 @@ class StrSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) - @classmethod - def from_openapi_data_(cls, arg: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None) -> StrSchema[str]: - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> StrSchema[str]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StrSchema[str]: + return super().__new__(cls, arg, configuration=configuration) class UUIDSchema(UUIDBase, StrSchema[T]): @@ -2293,8 +2225,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'uuid' - def __new__(cls, arg_: typing.Union[str, uuid.UUID], **kwargs: schema_configuration.SchemaConfiguration) -> UUIDSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UUIDSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(UUIDSchema[str], inst) @@ -2304,8 +2240,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date' - def __new__(cls, arg_: typing.Union[str, datetime.date], **kwargs: schema_configuration.SchemaConfiguration) -> DateSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateSchema[str], inst) @@ -2315,8 +2255,12 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'date-time' - def __new__(cls, arg_: typing.Union[str, datetime.datetime], **kwargs: schema_configuration.SchemaConfiguration) -> DateTimeSchema[str]: - inst = super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DateTimeSchema[str]: + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DateTimeSchema[str], inst) @@ -2326,7 +2270,11 @@ class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({str}) format: str = 'number' - def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) -> DecimalSchema[str]: + def __new__( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DecimalSchema[str]: """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2335,7 +2283,7 @@ def __new__(cls, arg_: str, **kwargs: schema_configuration.SchemaConfiguration) if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - inst = super().__new__(cls, arg_, **kwargs) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(DecimalSchema[str], inst) @@ -2350,9 +2298,13 @@ class BytesSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - def __new__(cls, arg_: bytes, **kwargs: schema_configuration.SchemaConfiguration) -> BytesSchema[bytes]: + def __new__( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BytesSchema[bytes]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class FileSchema( @@ -2379,9 +2331,13 @@ class FileSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({FileIO}) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader], **kwargs: schema_configuration.SchemaConfiguration) -> FileSchema[FileIO]: + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchema[FileIO]: super_cls: typing.Type = super(Schema, cls) - return super_cls.__new__(cls, arg_) + return super_cls.__new__(cls, arg) class BinarySchema( @@ -2398,8 +2354,12 @@ class Schema_(metaclass=SingletonMeta): FileSchema, ) - def __new__(cls, arg_: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: schema_configuration.SchemaConfiguration) -> BinarySchema[typing.Union[FileIO, bytes]]: - return super().__new__(cls, arg_) + def __new__( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BinarySchema[typing.Union[FileIO, bytes]]: + return super().__new__(cls, arg) class BoolSchema( @@ -2411,12 +2371,12 @@ class BoolSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({BoolClass}) - @classmethod - def from_openapi_data_(cls, arg: bool, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - - def __new__(cls, arg_: bool, **kwargs: ValidationMetadata) -> BoolSchema[bool]: - return super().__new__(cls, arg_, **kwargs) + def __new__( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BoolSchema[bool]: + return super().__new__(cls, arg, configuration=configuration) class AnyTypeSchema( @@ -2436,7 +2396,7 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2454,26 +2414,7 @@ def __new__( io.FileIO, io.BufferedReader ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader, - Unset - ] + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> AnyTypeSchema[typing.Union[ NoneClass, frozendict.frozendict, @@ -2482,30 +2423,11 @@ def __new__( decimal.Decimal, BoolClass ]]: - return super().__new__(cls, *args_, configuration_=configuration_, **kwargs) + return super().__new__(cls, arg, configuration=configuration) def __init__( self, - *args_: typing.Union[ - str, - uuid.UUID, - datetime.date, - datetime.datetime, - int, - float, - decimal.Decimal, - dict, - frozendict.frozendict, - list, - tuple, - None, - Schema, - bytes, - io.FileIO, - io.BufferedReader - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ + arg: typing.Union[ str, uuid.UUID, datetime.date, @@ -2523,6 +2445,7 @@ def __init__( io.FileIO, io.BufferedReader ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): """ this exists to override the __init__ method form FileIO in NoneFrozenDictTupleStrDecimalBoolFileBytesMixin @@ -2548,10 +2471,10 @@ class Schema_(metaclass=SingletonMeta): def __new__( cls, - *args_, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> NotAnyTypeSchema[T]: - inst = super().__new__(cls, *args_, configuration_=configuration_) + inst = super().__new__(cls, arg, configuration=configuration) return typing.cast(NotAnyTypeSchema[T], inst) @@ -2564,17 +2487,12 @@ class DictSchema( class Schema_(metaclass=SingletonMeta): types: typing.FrozenSet[typing.Type] = frozenset({frozendict.frozendict}) - @classmethod - def from_openapi_data_(cls, arg: typing.Dict[str, typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, Schema, Unset, ValidationMetadata], + arg: typing.Union[dict[str, INPUT_TYPES_ALL_INCL_SCHEMA], frozendict.frozendict[str, INPUT_TYPES_ALL_INCL_SCHEMA]], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, ) -> DictSchema[frozendict.frozendict]: - return super().__new__(cls, *args_, **kwargs, configuration_=configuration_) + return super().__new__(cls, arg, configuration=configuration) schema_type_classes = frozenset({NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}) diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 717311e32e3..56fea8a08d2 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +3.0.0 \ No newline at end of file From 1edcd48869795a6389f1a07295b9e7a3d8e89b94 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 16:27:23 -0700 Subject: [PATCH 34/36] Unit test sample updated --- .../python/.openapi-generator/FILES | 87 ++++++++++++++ .../test/components/schema/test__not.py | 14 +-- ...s_allows_a_schema_which_should_validate.py | 18 ++- ...tionalproperties_are_allowed_by_default.py | 10 +- ...dditionalproperties_can_exist_by_itself.py | 14 +-- ...operties_should_not_look_in_applicators.py | 14 +-- .../test/components/schema/test_allof.py | 22 ++-- .../test_allof_combined_with_anyof_oneof.py | 38 +++---- .../schema/test_allof_simple_types.py | 14 +-- .../schema/test_allof_with_base_schema.py | 26 ++--- .../test_allof_with_one_empty_schema.py | 10 +- .../test_allof_with_the_first_empty_schema.py | 14 +-- .../test_allof_with_the_last_empty_schema.py | 14 +-- .../test_allof_with_two_empty_schemas.py | 10 +- .../test/components/schema/test_anyof.py | 22 ++-- .../schema/test_anyof_complex_types.py | 22 ++-- .../schema/test_anyof_with_base_schema.py | 18 ++- .../test_anyof_with_one_empty_schema.py | 14 +-- .../schema/test_array_type_matches_arrays.py | 34 +++--- .../test_boolean_type_matches_booleans.py | 46 ++++---- .../test/components/schema/test_by_int.py | 18 ++- .../test/components/schema/test_by_number.py | 18 ++- .../components/schema/test_by_small_number.py | 14 +-- .../schema/test_date_time_format.py | 30 +++-- .../components/schema/test_email_format.py | 30 +++-- .../test_enum_with0_does_not_match_false.py | 18 ++- .../test_enum_with1_does_not_match_true.py | 18 ++- .../test_enum_with_escaped_characters.py | 18 ++- .../test_enum_with_false_does_not_match0.py | 18 ++- .../test_enum_with_true_does_not_match1.py | 18 ++- .../schema/test_enums_in_properties.py | 30 +++-- .../schema/test_forbidden_property.py | 14 +-- .../components/schema/test_hostname_format.py | 30 +++-- .../test_integer_type_matches_integers.py | 42 ++++--- ...not_raise_error_when_float_division_inf.py | 14 +-- .../test_invalid_string_value_for_default.py | 14 +-- .../components/schema/test_ipv4_format.py | 30 +++-- .../components/schema/test_ipv6_format.py | 30 +++-- .../schema/test_json_pointer_format.py | 30 +++-- .../schema/test_maximum_validation.py | 22 ++-- ...aximum_validation_with_unsigned_integer.py | 22 ++-- .../schema/test_maxitems_validation.py | 22 ++-- .../schema/test_maxlength_validation.py | 26 ++--- ...axproperties0_means_the_object_is_empty.py | 14 +-- .../schema/test_maxproperties_validation.py | 30 +++-- .../schema/test_minimum_validation.py | 22 ++-- ..._minimum_validation_with_signed_integer.py | 34 +++--- .../schema/test_minitems_validation.py | 22 ++-- .../schema/test_minlength_validation.py | 26 ++--- .../schema/test_minproperties_validation.py | 30 +++-- ...ted_allof_to_check_validation_semantics.py | 14 +-- ...ted_anyof_to_check_validation_semantics.py | 14 +-- .../components/schema/test_nested_items.py | 18 ++- ...ted_oneof_to_check_validation_semantics.py | 14 +-- .../schema/test_not_more_complex_schema.py | 18 ++- .../schema/test_nul_characters_in_strings.py | 14 +-- ..._null_type_matches_only_the_null_object.py | 46 ++++---- .../test_number_type_matches_numbers.py | 42 ++++--- .../test_object_properties_validation.py | 30 +++-- .../test_object_type_matches_objects.py | 34 +++--- .../test/components/schema/test_oneof.py | 22 ++-- .../schema/test_oneof_complex_types.py | 22 ++-- .../schema/test_oneof_with_base_schema.py | 18 ++- .../schema/test_oneof_with_empty_schema.py | 14 +-- .../schema/test_oneof_with_required.py | 22 ++-- .../schema/test_pattern_is_not_anchored.py | 10 +- .../schema/test_pattern_validation.py | 38 +++---- ...test_properties_with_escaped_characters.py | 14 +-- ...perty_named_ref_that_is_not_a_reference.py | 14 +-- .../test_ref_in_additionalproperties.py | 14 +-- .../components/schema/test_ref_in_allof.py | 14 +-- .../components/schema/test_ref_in_anyof.py | 14 +-- .../components/schema/test_ref_in_items.py | 14 +-- .../test/components/schema/test_ref_in_not.py | 14 +-- .../components/schema/test_ref_in_oneof.py | 14 +-- .../components/schema/test_ref_in_property.py | 14 +-- .../test_required_default_validation.py | 10 +- .../schema/test_required_validation.py | 26 ++--- .../schema/test_required_with_empty_array.py | 10 +- .../test_required_with_escaped_characters.py | 14 +-- .../schema/test_simple_enum_validation.py | 14 +-- .../test_string_type_matches_strings.py | 42 ++++--- ..._do_anything_if_the_property_is_missing.py | 18 ++- .../test_uniqueitems_false_validation.py | 66 ++++++----- .../schema/test_uniqueitems_validation.py | 106 +++++++++--------- .../test/components/schema/test_uri_format.py | 30 +++-- .../schema/test_uri_reference_format.py | 30 +++-- .../schema/test_uri_template_format.py | 30 +++-- 88 files changed, 995 insertions(+), 1082 deletions(-) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES index 1f86eda2681..13ff19b8c35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -2097,6 +2097,93 @@ test-requirements.txt test/__init__.py test/components/__init__.py test/components/schema/__init__.py +test/components/schema/test__not.py +test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py +test/components/schema/test_additionalproperties_are_allowed_by_default.py +test/components/schema/test_additionalproperties_can_exist_by_itself.py +test/components/schema/test_additionalproperties_should_not_look_in_applicators.py +test/components/schema/test_allof.py +test/components/schema/test_allof_combined_with_anyof_oneof.py +test/components/schema/test_allof_simple_types.py +test/components/schema/test_allof_with_base_schema.py +test/components/schema/test_allof_with_one_empty_schema.py +test/components/schema/test_allof_with_the_first_empty_schema.py +test/components/schema/test_allof_with_the_last_empty_schema.py +test/components/schema/test_allof_with_two_empty_schemas.py +test/components/schema/test_anyof.py +test/components/schema/test_anyof_complex_types.py +test/components/schema/test_anyof_with_base_schema.py +test/components/schema/test_anyof_with_one_empty_schema.py +test/components/schema/test_array_type_matches_arrays.py +test/components/schema/test_boolean_type_matches_booleans.py +test/components/schema/test_by_int.py +test/components/schema/test_by_number.py +test/components/schema/test_by_small_number.py +test/components/schema/test_date_time_format.py +test/components/schema/test_email_format.py +test/components/schema/test_enum_with0_does_not_match_false.py +test/components/schema/test_enum_with1_does_not_match_true.py +test/components/schema/test_enum_with_escaped_characters.py +test/components/schema/test_enum_with_false_does_not_match0.py +test/components/schema/test_enum_with_true_does_not_match1.py +test/components/schema/test_enums_in_properties.py +test/components/schema/test_forbidden_property.py +test/components/schema/test_hostname_format.py +test/components/schema/test_integer_type_matches_integers.py +test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py +test/components/schema/test_invalid_string_value_for_default.py +test/components/schema/test_ipv4_format.py +test/components/schema/test_ipv6_format.py +test/components/schema/test_json_pointer_format.py +test/components/schema/test_maximum_validation.py +test/components/schema/test_maximum_validation_with_unsigned_integer.py +test/components/schema/test_maxitems_validation.py +test/components/schema/test_maxlength_validation.py +test/components/schema/test_maxproperties0_means_the_object_is_empty.py +test/components/schema/test_maxproperties_validation.py +test/components/schema/test_minimum_validation.py +test/components/schema/test_minimum_validation_with_signed_integer.py +test/components/schema/test_minitems_validation.py +test/components/schema/test_minlength_validation.py +test/components/schema/test_minproperties_validation.py +test/components/schema/test_nested_allof_to_check_validation_semantics.py +test/components/schema/test_nested_anyof_to_check_validation_semantics.py +test/components/schema/test_nested_items.py +test/components/schema/test_nested_oneof_to_check_validation_semantics.py +test/components/schema/test_not_more_complex_schema.py +test/components/schema/test_nul_characters_in_strings.py +test/components/schema/test_null_type_matches_only_the_null_object.py +test/components/schema/test_number_type_matches_numbers.py +test/components/schema/test_object_properties_validation.py +test/components/schema/test_object_type_matches_objects.py +test/components/schema/test_oneof.py +test/components/schema/test_oneof_complex_types.py +test/components/schema/test_oneof_with_base_schema.py +test/components/schema/test_oneof_with_empty_schema.py +test/components/schema/test_oneof_with_required.py +test/components/schema/test_pattern_is_not_anchored.py +test/components/schema/test_pattern_validation.py +test/components/schema/test_properties_with_escaped_characters.py +test/components/schema/test_property_named_ref_that_is_not_a_reference.py +test/components/schema/test_ref_in_additionalproperties.py +test/components/schema/test_ref_in_allof.py +test/components/schema/test_ref_in_anyof.py +test/components/schema/test_ref_in_items.py +test/components/schema/test_ref_in_not.py +test/components/schema/test_ref_in_oneof.py +test/components/schema/test_ref_in_property.py +test/components/schema/test_required_default_validation.py +test/components/schema/test_required_validation.py +test/components/schema/test_required_with_empty_array.py +test/components/schema/test_required_with_escaped_characters.py +test/components/schema/test_simple_enum_validation.py +test/components/schema/test_string_type_matches_strings.py +test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +test/components/schema/test_uniqueitems_false_validation.py +test/components/schema/test_uniqueitems_validation.py +test/components/schema/test_uri_format.py +test/components/schema/test_uri_reference_format.py +test/components/schema/test_uri_template_format.py test/test_paths/__init__.py test/test_paths/__init__.py test/test_paths/__init__.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test__not.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test__not.py index bbb7d32ed78..5c4d7f9a44b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test__not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test__not.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema._not import _Not -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class Test_Not(unittest.TestCase): """_Not unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_allowed_passes(self): # allowed - _Not.from_openapi_data_( + _Not( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_disallowed_fails(self): # disallowed with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - _Not.from_openapi_data_( + _Not( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py index d0ce12be1db..7d194f69114 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,27 +11,27 @@ import unit_test_api from unit_test_api.components.schema.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAdditionalpropertiesAllowsASchemaWhichShouldValidate(unittest.TestCase): """AdditionalpropertiesAllowsASchemaWhichShouldValidate unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_no_additional_properties_is_valid_passes(self): # no additional properties is valid - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_( + AdditionalpropertiesAllowsASchemaWhichShouldValidate( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_additional_invalid_property_is_invalid_fails(self): # an additional invalid property is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_( + AdditionalpropertiesAllowsASchemaWhichShouldValidate( { "foo": 1, @@ -42,12 +40,12 @@ def test_an_additional_invalid_property_is_invalid_fails(self): "quux": 12, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_additional_valid_property_is_valid_passes(self): # an additional valid property is valid - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_( + AdditionalpropertiesAllowsASchemaWhichShouldValidate( { "foo": 1, @@ -56,7 +54,7 @@ def test_an_additional_valid_property_is_valid_passes(self): "quux": True, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_are_allowed_by_default.py index 8709b7d9db1..0b909cd0b1c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_are_allowed_by_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_are_allowed_by_default.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAdditionalpropertiesAreAllowedByDefault(unittest.TestCase): """AdditionalpropertiesAreAllowedByDefault unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_additional_properties_are_allowed_passes(self): # additional properties are allowed - AdditionalpropertiesAreAllowedByDefault.from_openapi_data_( + AdditionalpropertiesAreAllowedByDefault( { "foo": 1, @@ -31,7 +29,7 @@ def test_additional_properties_are_allowed_passes(self): "quux": True, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_can_exist_by_itself.py index eed4d864085..6bfde5e61b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_can_exist_by_itself.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_can_exist_by_itself.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAdditionalpropertiesCanExistByItself(unittest.TestCase): """AdditionalpropertiesCanExistByItself unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_an_additional_invalid_property_is_invalid_fails(self): # an additional invalid property is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesCanExistByItself.from_openapi_data_( + AdditionalpropertiesCanExistByItself( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_additional_valid_property_is_valid_passes(self): # an additional valid property is valid - AdditionalpropertiesCanExistByItself.from_openapi_data_( + AdditionalpropertiesCanExistByItself( { "foo": True, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_should_not_look_in_applicators.py index 27eaf50edd4..9771b705624 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_should_not_look_in_applicators.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,36 +11,36 @@ import unit_test_api from unit_test_api.components.schema.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAdditionalpropertiesShouldNotLookInApplicators(unittest.TestCase): """AdditionalpropertiesShouldNotLookInApplicators unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_properties_defined_in_allof_are_not_examined_fails(self): # properties defined in allOf are not examined with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesShouldNotLookInApplicators.from_openapi_data_( + AdditionalpropertiesShouldNotLookInApplicators( { "foo": 1, "bar": True, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_valid_test_case_passes(self): # valid test case - AdditionalpropertiesShouldNotLookInApplicators.from_openapi_data_( + AdditionalpropertiesShouldNotLookInApplicators( { "foo": False, "bar": True, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof.py index eb16ed0282a..2909e6dd2e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,58 +11,58 @@ import unit_test_api from unit_test_api.components.schema.allof import Allof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllof(unittest.TestCase): """Allof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_allof_passes(self): # allOf - Allof.from_openapi_data_( + Allof( { "foo": "baz", "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_first_fails(self): # mismatch first with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_( + Allof( { "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_second_fails(self): # mismatch second with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_( + Allof( { "foo": "baz", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_wrong_type_fails(self): # wrong type with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_( + Allof( { "foo": "baz", "bar": "quux", }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_combined_with_anyof_oneof.py index bf527f8361a..bd73cae8077 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_combined_with_anyof_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_combined_with_anyof_oneof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,74 +11,74 @@ import unit_test_api from unit_test_api.components.schema.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofCombinedWithAnyofOneof(unittest.TestCase): """AllofCombinedWithAnyofOneof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_allof_true_anyof_false_oneof_false_fails(self): # allOf: true, anyOf: false, oneOf: false with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 2, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_false_anyof_false_oneof_true_fails(self): # allOf: false, anyOf: false, oneOf: true with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_false_anyof_true_oneof_true_fails(self): # allOf: false, anyOf: true, oneOf: true with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 15, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_true_anyof_true_oneof_false_fails(self): # allOf: true, anyOf: true, oneOf: false with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 6, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_true_anyof_true_oneof_true_passes(self): # allOf: true, anyOf: true, oneOf: true - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 30, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_true_anyof_false_oneof_true_fails(self): # allOf: true, anyOf: false, oneOf: true with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 10, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_false_anyof_true_oneof_false_fails(self): # allOf: false, anyOf: true, oneOf: false with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 3, - configuration_=self.configuration_ + configuration=self.configuration ) def test_allof_false_anyof_false_oneof_false_fails(self): # allOf: false, anyOf: false, oneOf: false with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_( + AllofCombinedWithAnyofOneof( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_simple_types.py index 016d4576f0e..5df90b2cce7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_simple_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_simple_types.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.allof_simple_types import AllofSimpleTypes -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofSimpleTypes(unittest.TestCase): """AllofSimpleTypes unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_valid_passes(self): # valid - AllofSimpleTypes.from_openapi_data_( + AllofSimpleTypes( 25, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_one_fails(self): # mismatch one with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofSimpleTypes.from_openapi_data_( + AllofSimpleTypes( 35, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_base_schema.py index 48715e20dcd..c6c3bda036b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_base_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.allof_with_base_schema import AllofWithBaseSchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofWithBaseSchema(unittest.TestCase): """AllofWithBaseSchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_valid_passes(self): # valid - AllofWithBaseSchema.from_openapi_data_( + AllofWithBaseSchema( { "foo": "quux", @@ -31,57 +29,57 @@ def test_valid_passes(self): "baz": None, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_first_allof_fails(self): # mismatch first allOf with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_( + AllofWithBaseSchema( { "bar": 2, "baz": None, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_base_schema_fails(self): # mismatch base schema with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_( + AllofWithBaseSchema( { "foo": "quux", "baz": None, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_both_fails(self): # mismatch both with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_( + AllofWithBaseSchema( { "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_second_allof_fails(self): # mismatch second allOf with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_( + AllofWithBaseSchema( { "foo": "quux", "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_one_empty_schema.py index 5244f65e2ce..4333bdce15f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_one_empty_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,18 +11,18 @@ import unit_test_api from unit_test_api.components.schema.allof_with_one_empty_schema import AllofWithOneEmptySchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofWithOneEmptySchema(unittest.TestCase): """AllofWithOneEmptySchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_any_data_is_valid_passes(self): # any data is valid - AllofWithOneEmptySchema.from_openapi_data_( + AllofWithOneEmptySchema( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_first_empty_schema.py index 0fbeda18acf..3c2de516e5c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_first_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_first_empty_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofWithTheFirstEmptySchema(unittest.TestCase): """AllofWithTheFirstEmptySchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_string_is_invalid_fails(self): # string is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithTheFirstEmptySchema.from_openapi_data_( + AllofWithTheFirstEmptySchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_number_is_valid_passes(self): # number is valid - AllofWithTheFirstEmptySchema.from_openapi_data_( + AllofWithTheFirstEmptySchema( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_last_empty_schema.py index 6269c24cd45..0a5d45effcd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_last_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_the_last_empty_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofWithTheLastEmptySchema(unittest.TestCase): """AllofWithTheLastEmptySchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_string_is_invalid_fails(self): # string is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithTheLastEmptySchema.from_openapi_data_( + AllofWithTheLastEmptySchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_number_is_valid_passes(self): # number is valid - AllofWithTheLastEmptySchema.from_openapi_data_( + AllofWithTheLastEmptySchema( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_two_empty_schemas.py index 804c23dec52..2fda31cc249 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_two_empty_schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_two_empty_schemas.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,18 +11,18 @@ import unit_test_api from unit_test_api.components.schema.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAllofWithTwoEmptySchemas(unittest.TestCase): """AllofWithTwoEmptySchemas unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_any_data_is_valid_passes(self): # any data is valid - AllofWithTwoEmptySchemas.from_openapi_data_( + AllofWithTwoEmptySchemas( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof.py index da1014d45e9..c6f3990113b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,40 +11,40 @@ import unit_test_api from unit_test_api.components.schema.anyof import Anyof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAnyof(unittest.TestCase): """Anyof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_second_anyof_valid_passes(self): # second anyOf valid - Anyof.from_openapi_data_( + Anyof( 2.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_neither_anyof_valid_fails(self): # neither anyOf valid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Anyof.from_openapi_data_( + Anyof( 1.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_anyof_valid_passes(self): # both anyOf valid - Anyof.from_openapi_data_( + Anyof( 3, - configuration_=self.configuration_ + configuration=self.configuration ) def test_first_anyof_valid_passes(self): # first anyOf valid - Anyof.from_openapi_data_( + Anyof( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_complex_types.py index 0c4891de94c..3452c368e98 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_complex_types.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,56 +11,56 @@ import unit_test_api from unit_test_api.components.schema.anyof_complex_types import AnyofComplexTypes -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAnyofComplexTypes(unittest.TestCase): """AnyofComplexTypes unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_second_anyof_valid_complex_passes(self): # second anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_( + AnyofComplexTypes( { "foo": "baz", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_neither_anyof_valid_complex_fails(self): # neither anyOf valid (complex) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofComplexTypes.from_openapi_data_( + AnyofComplexTypes( { "foo": 2, "bar": "quux", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_anyof_valid_complex_passes(self): # both anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_( + AnyofComplexTypes( { "foo": "baz", "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_first_anyof_valid_complex_passes(self): # first anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_( + AnyofComplexTypes( { "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_base_schema.py index 0440a3ce9a0..af11fbbe3c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_base_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,34 +11,34 @@ import unit_test_api from unit_test_api.components.schema.anyof_with_base_schema import AnyofWithBaseSchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAnyofWithBaseSchema(unittest.TestCase): """AnyofWithBaseSchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_one_anyof_valid_passes(self): # one anyOf valid - AnyofWithBaseSchema.from_openapi_data_( + AnyofWithBaseSchema( "foobar", - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_anyof_invalid_fails(self): # both anyOf invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofWithBaseSchema.from_openapi_data_( + AnyofWithBaseSchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_base_schema_fails(self): # mismatch base schema with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofWithBaseSchema.from_openapi_data_( + AnyofWithBaseSchema( 3, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_one_empty_schema.py index c46f62e9c38..a87c3b6ea8f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_anyof_with_one_empty_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,25 +11,25 @@ import unit_test_api from unit_test_api.components.schema.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestAnyofWithOneEmptySchema(unittest.TestCase): """AnyofWithOneEmptySchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_string_is_valid_passes(self): # string is valid - AnyofWithOneEmptySchema.from_openapi_data_( + AnyofWithOneEmptySchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_number_is_valid_passes(self): # number is valid - AnyofWithOneEmptySchema.from_openapi_data_( + AnyofWithOneEmptySchema( 123, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_array_type_matches_arrays.py index a087a7fa3af..f07feeeaa5e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_array_type_matches_arrays.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_array_type_matches_arrays.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,68 +11,68 @@ import unit_test_api from unit_test_api.components.schema.array_type_matches_arrays import ArrayTypeMatchesArrays -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestArrayTypeMatchesArrays(unittest.TestCase): """ArrayTypeMatchesArrays unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_a_float_is_not_an_array_fails(self): # a float is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_boolean_is_not_an_array_fails(self): # a boolean is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_an_array_fails(self): # null is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_not_an_array_fails(self): # an object is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_an_array_fails(self): # a string is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_an_array_passes(self): # an array is an array - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_not_an_array_fails(self): # an integer is not an array with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_( + ArrayTypeMatchesArrays( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_boolean_type_matches_booleans.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_boolean_type_matches_booleans.py index b12796d3b31..e60a9d7c0ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_boolean_type_matches_booleans.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_boolean_type_matches_booleans.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,91 +11,91 @@ import unit_test_api from unit_test_api.components.schema.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestBooleanTypeMatchesBooleans(unittest.TestCase): """BooleanTypeMatchesBooleans unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_an_empty_string_is_not_a_boolean_fails(self): # an empty string is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_is_not_a_boolean_fails(self): # a float is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_a_boolean_fails(self): # null is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_zero_is_not_a_boolean_fails(self): # zero is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( 0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_not_a_boolean_fails(self): # an array is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_a_boolean_fails(self): # a string is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_false_is_a_boolean_passes(self): # false is a boolean - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_not_a_boolean_fails(self): # an integer is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_true_is_a_boolean_passes(self): # true is a boolean - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_not_a_boolean_fails(self): # an object is not a boolean with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_( + BooleanTypeMatchesBooleans( { }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_int.py index 7a8030a869f..3bb0be29ea8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_int.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_int.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,33 +11,33 @@ import unit_test_api from unit_test_api.components.schema.by_int import ByInt -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestByInt(unittest.TestCase): """ByInt unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_int_by_int_fail_fails(self): # int by int fail with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ByInt.from_openapi_data_( + ByInt( 7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_int_by_int_passes(self): # int by int - ByInt.from_openapi_data_( + ByInt( 10, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_numbers_passes(self): # ignores non-numbers - ByInt.from_openapi_data_( + ByInt( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_number.py index db65c18d414..385672f5e5e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_number.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,33 +11,33 @@ import unit_test_api from unit_test_api.components.schema.by_number import ByNumber -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestByNumber(unittest.TestCase): """ByNumber unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_45_is_multiple_of15_passes(self): # 4.5 is multiple of 1.5 - ByNumber.from_openapi_data_( + ByNumber( 4.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_35_is_not_multiple_of15_fails(self): # 35 is not multiple of 1.5 with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ByNumber.from_openapi_data_( + ByNumber( 35, - configuration_=self.configuration_ + configuration=self.configuration ) def test_zero_is_multiple_of_anything_passes(self): # zero is multiple of anything - ByNumber.from_openapi_data_( + ByNumber( 0, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_small_number.py index aa6eb5afa11..7db55b34e1f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_small_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_by_small_number.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.by_small_number import BySmallNumber -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestBySmallNumber(unittest.TestCase): """BySmallNumber unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_000751_is_not_multiple_of00001_fails(self): # 0.00751 is not multiple of 0.0001 with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BySmallNumber.from_openapi_data_( + BySmallNumber( 0.00751, - configuration_=self.configuration_ + configuration=self.configuration ) def test_00075_is_multiple_of00001_passes(self): # 0.0075 is multiple of 0.0001 - BySmallNumber.from_openapi_data_( + BySmallNumber( 0.0075, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_date_time_format.py index a9c14bed53e..a2baa8c5e72 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_date_time_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_date_time_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.date_time_format import DateTimeFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestDateTimeFormat(unittest.TestCase): """DateTimeFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - DateTimeFormat.from_openapi_data_( + DateTimeFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - DateTimeFormat.from_openapi_data_( + DateTimeFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - DateTimeFormat.from_openapi_data_( + DateTimeFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - DateTimeFormat.from_openapi_data_( + DateTimeFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - DateTimeFormat.from_openapi_data_( + DateTimeFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - DateTimeFormat.from_openapi_data_( + DateTimeFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_email_format.py index 1c30f9a17b3..0b0ef44fe4a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_email_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_email_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.email_format import EmailFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEmailFormat(unittest.TestCase): """EmailFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - EmailFormat.from_openapi_data_( + EmailFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - EmailFormat.from_openapi_data_( + EmailFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - EmailFormat.from_openapi_data_( + EmailFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - EmailFormat.from_openapi_data_( + EmailFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - EmailFormat.from_openapi_data_( + EmailFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - EmailFormat.from_openapi_data_( + EmailFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with0_does_not_match_false.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with0_does_not_match_false.py index 3f63ae781b1..4b42d9600ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with0_does_not_match_false.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with0_does_not_match_false.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,33 +11,33 @@ import unit_test_api from unit_test_api.components.schema.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumWith0DoesNotMatchFalse(unittest.TestCase): """EnumWith0DoesNotMatchFalse unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_integer_zero_is_valid_passes(self): # integer zero is valid - EnumWith0DoesNotMatchFalse.from_openapi_data_( + EnumWith0DoesNotMatchFalse( 0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_float_zero_is_valid_passes(self): # float zero is valid - EnumWith0DoesNotMatchFalse.from_openapi_data_( + EnumWith0DoesNotMatchFalse( 0.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_false_is_invalid_fails(self): # false is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWith0DoesNotMatchFalse.from_openapi_data_( + EnumWith0DoesNotMatchFalse( False, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with1_does_not_match_true.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with1_does_not_match_true.py index ca8b10ad53e..d28985e2fc4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with1_does_not_match_true.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with1_does_not_match_true.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,33 +11,33 @@ import unit_test_api from unit_test_api.components.schema.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumWith1DoesNotMatchTrue(unittest.TestCase): """EnumWith1DoesNotMatchTrue unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_true_is_invalid_fails(self): # true is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWith1DoesNotMatchTrue.from_openapi_data_( + EnumWith1DoesNotMatchTrue( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_integer_one_is_valid_passes(self): # integer one is valid - EnumWith1DoesNotMatchTrue.from_openapi_data_( + EnumWith1DoesNotMatchTrue( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_float_one_is_valid_passes(self): # float one is valid - EnumWith1DoesNotMatchTrue.from_openapi_data_( + EnumWith1DoesNotMatchTrue( 1.0, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_escaped_characters.py index aef87626eaf..e4d6e83bc60 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_escaped_characters.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,33 +11,33 @@ import unit_test_api from unit_test_api.components.schema.enum_with_escaped_characters import EnumWithEscapedCharacters -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumWithEscapedCharacters(unittest.TestCase): """EnumWithEscapedCharacters unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_member2_is_valid_passes(self): # member 2 is valid - EnumWithEscapedCharacters.from_openapi_data_( + EnumWithEscapedCharacters( "foo\rbar", - configuration_=self.configuration_ + configuration=self.configuration ) def test_member1_is_valid_passes(self): # member 1 is valid - EnumWithEscapedCharacters.from_openapi_data_( + EnumWithEscapedCharacters( "foo\nbar", - configuration_=self.configuration_ + configuration=self.configuration ) def test_another_string_is_invalid_fails(self): # another string is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithEscapedCharacters.from_openapi_data_( + EnumWithEscapedCharacters( "abc", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_false_does_not_match0.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_false_does_not_match0.py index f220f2dbe40..0a7748bbe52 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_false_does_not_match0.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_false_does_not_match0.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,34 +11,34 @@ import unit_test_api from unit_test_api.components.schema.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumWithFalseDoesNotMatch0(unittest.TestCase): """EnumWithFalseDoesNotMatch0 unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_false_is_valid_passes(self): # false is valid - EnumWithFalseDoesNotMatch0.from_openapi_data_( + EnumWithFalseDoesNotMatch0( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_float_zero_is_invalid_fails(self): # float zero is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithFalseDoesNotMatch0.from_openapi_data_( + EnumWithFalseDoesNotMatch0( 0.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_integer_zero_is_invalid_fails(self): # integer zero is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithFalseDoesNotMatch0.from_openapi_data_( + EnumWithFalseDoesNotMatch0( 0, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_true_does_not_match1.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_true_does_not_match1.py index 1a0d4ebad27..d86f6df2ef4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_true_does_not_match1.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enum_with_true_does_not_match1.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,34 +11,34 @@ import unit_test_api from unit_test_api.components.schema.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumWithTrueDoesNotMatch1(unittest.TestCase): """EnumWithTrueDoesNotMatch1 unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_float_one_is_invalid_fails(self): # float one is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithTrueDoesNotMatch1.from_openapi_data_( + EnumWithTrueDoesNotMatch1( 1.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_true_is_valid_passes(self): # true is valid - EnumWithTrueDoesNotMatch1.from_openapi_data_( + EnumWithTrueDoesNotMatch1( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_integer_one_is_invalid_fails(self): # integer one is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithTrueDoesNotMatch1.from_openapi_data_( + EnumWithTrueDoesNotMatch1( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enums_in_properties.py index 8d5b30a54c1..3ca3692fd27 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enums_in_properties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_enums_in_properties.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,79 +11,79 @@ import unit_test_api from unit_test_api.components.schema.enums_in_properties import EnumsInProperties -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestEnumsInProperties(unittest.TestCase): """EnumsInProperties unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_missing_optional_property_is_valid_passes(self): # missing optional property is valid - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { "bar": "bar", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_wrong_foo_value_fails(self): # wrong foo value with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { "foo": "foot", "bar": "bar", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_properties_are_valid_passes(self): # both properties are valid - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { "foo": "foo", "bar": "bar", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_wrong_bar_value_fails(self): # wrong bar value with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { "foo": "foo", "bar": "bart", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_missing_all_properties_is_invalid_fails(self): # missing all properties is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_missing_required_property_is_invalid_fails(self): # missing required property is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_( + EnumsInProperties( { "foo": "foo", }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_forbidden_property.py index cff830e09dc..ea1ace820f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_forbidden_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_forbidden_property.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,36 +11,36 @@ import unit_test_api from unit_test_api.components.schema.forbidden_property import ForbiddenProperty -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestForbiddenProperty(unittest.TestCase): """ForbiddenProperty unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_present_fails(self): # property present with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ForbiddenProperty.from_openapi_data_( + ForbiddenProperty( { "foo": 1, "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_absent_passes(self): # property absent - ForbiddenProperty.from_openapi_data_( + ForbiddenProperty( { "bar": 1, "baz": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_hostname_format.py index 362faa86f05..00cc8c35d76 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_hostname_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_hostname_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.hostname_format import HostnameFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestHostnameFormat(unittest.TestCase): """HostnameFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - HostnameFormat.from_openapi_data_( + HostnameFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - HostnameFormat.from_openapi_data_( + HostnameFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - HostnameFormat.from_openapi_data_( + HostnameFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - HostnameFormat.from_openapi_data_( + HostnameFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - HostnameFormat.from_openapi_data_( + HostnameFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - HostnameFormat.from_openapi_data_( + HostnameFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_integer_type_matches_integers.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_integer_type_matches_integers.py index ef95b0c43be..6c79363cf6e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_integer_type_matches_integers.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_integer_type_matches_integers.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,83 +11,83 @@ import unit_test_api from unit_test_api.components.schema.integer_type_matches_integers import IntegerTypeMatchesIntegers -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestIntegerTypeMatchesIntegers(unittest.TestCase): """IntegerTypeMatchesIntegers unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_an_object_is_not_an_integer_fails(self): # an object is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_an_integer_fails(self): # a string is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_an_integer_fails(self): # null is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): # a float with zero fractional part is an integer - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( 1.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_is_not_an_integer_fails(self): # a float is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_boolean_is_not_an_integer_fails(self): # a boolean is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_an_integer_passes(self): # an integer is an integer - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): # a string is still not an integer, even if it looks like one with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( "1", - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_not_an_integer_fails(self): # an array is not an integer with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_( + IntegerTypeMatchesIntegers( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py index b64ade95373..208dd277224 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(unittest.TestCase): """InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails(self): # always invalid, but naive implementations may raise an overflow error with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.from_openapi_data_( + InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( 1.0E308, - configuration_=self.configuration_ + configuration=self.configuration ) def test_valid_integer_with_multipleof_float_passes(self): # valid integer with multipleOf float - InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.from_openapi_data_( + InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( 123456789, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_string_value_for_default.py index 4fd17ddd242..d7a862fef82 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_string_value_for_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_invalid_string_value_for_default.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,29 +11,29 @@ import unit_test_api from unit_test_api.components.schema.invalid_string_value_for_default import InvalidStringValueForDefault -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestInvalidStringValueForDefault(unittest.TestCase): """InvalidStringValueForDefault unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_valid_when_property_is_specified_passes(self): # valid when property is specified - InvalidStringValueForDefault.from_openapi_data_( + InvalidStringValueForDefault( { "bar": "good", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_still_valid_when_the_invalid_default_is_used_passes(self): # still valid when the invalid default is used - InvalidStringValueForDefault.from_openapi_data_( + InvalidStringValueForDefault( { }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv4_format.py index e9587042749..fc35328df9f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv4_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv4_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.ipv4_format import Ipv4Format -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestIpv4Format(unittest.TestCase): """Ipv4Format unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - Ipv4Format.from_openapi_data_( + Ipv4Format( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - Ipv4Format.from_openapi_data_( + Ipv4Format( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - Ipv4Format.from_openapi_data_( + Ipv4Format( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - Ipv4Format.from_openapi_data_( + Ipv4Format( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - Ipv4Format.from_openapi_data_( + Ipv4Format( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - Ipv4Format.from_openapi_data_( + Ipv4Format( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv6_format.py index 007df1984f6..06194738181 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv6_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ipv6_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.ipv6_format import Ipv6Format -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestIpv6Format(unittest.TestCase): """Ipv6Format unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - Ipv6Format.from_openapi_data_( + Ipv6Format( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - Ipv6Format.from_openapi_data_( + Ipv6Format( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - Ipv6Format.from_openapi_data_( + Ipv6Format( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - Ipv6Format.from_openapi_data_( + Ipv6Format( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - Ipv6Format.from_openapi_data_( + Ipv6Format( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - Ipv6Format.from_openapi_data_( + Ipv6Format( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_json_pointer_format.py index bfa9ba29028..7a8ed396c26 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_json_pointer_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_json_pointer_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.json_pointer_format import JsonPointerFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestJsonPointerFormat(unittest.TestCase): """JsonPointerFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - JsonPointerFormat.from_openapi_data_( + JsonPointerFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation.py index b845b1cef97..307816539bd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,40 +11,40 @@ import unit_test_api from unit_test_api.components.schema.maximum_validation import MaximumValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaximumValidation(unittest.TestCase): """MaximumValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_below_the_maximum_is_valid_passes(self): # below the maximum is valid - MaximumValidation.from_openapi_data_( + MaximumValidation( 2.6, - configuration_=self.configuration_ + configuration=self.configuration ) def test_boundary_point_is_valid_passes(self): # boundary point is valid - MaximumValidation.from_openapi_data_( + MaximumValidation( 3.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_above_the_maximum_is_invalid_fails(self): # above the maximum is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaximumValidation.from_openapi_data_( + MaximumValidation( 3.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_numbers_passes(self): # ignores non-numbers - MaximumValidation.from_openapi_data_( + MaximumValidation( "x", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation_with_unsigned_integer.py index f4bcfb9bbbc..0da49190b8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation_with_unsigned_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maximum_validation_with_unsigned_integer.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,40 +11,40 @@ import unit_test_api from unit_test_api.components.schema.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaximumValidationWithUnsignedInteger(unittest.TestCase): """MaximumValidationWithUnsignedInteger unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_below_the_maximum_is_invalid_passes(self): # below the maximum is invalid - MaximumValidationWithUnsignedInteger.from_openapi_data_( + MaximumValidationWithUnsignedInteger( 299.97, - configuration_=self.configuration_ + configuration=self.configuration ) def test_above_the_maximum_is_invalid_fails(self): # above the maximum is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaximumValidationWithUnsignedInteger.from_openapi_data_( + MaximumValidationWithUnsignedInteger( 300.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_boundary_point_integer_is_valid_passes(self): # boundary point integer is valid - MaximumValidationWithUnsignedInteger.from_openapi_data_( + MaximumValidationWithUnsignedInteger( 300, - configuration_=self.configuration_ + configuration=self.configuration ) def test_boundary_point_float_is_valid_passes(self): # boundary point float is valid - MaximumValidationWithUnsignedInteger.from_openapi_data_( + MaximumValidationWithUnsignedInteger( 300.0, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxitems_validation.py index 2ca30ca1ae9..00f90826033 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxitems_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,49 +11,49 @@ import unit_test_api from unit_test_api.components.schema.maxitems_validation import MaxitemsValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaxitemsValidation(unittest.TestCase): """MaxitemsValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_too_long_is_invalid_fails(self): # too long is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxitemsValidation.from_openapi_data_( + MaxitemsValidation( [ 1, 2, 3, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_arrays_passes(self): # ignores non-arrays - MaxitemsValidation.from_openapi_data_( + MaxitemsValidation( "foobar", - configuration_=self.configuration_ + configuration=self.configuration ) def test_shorter_is_valid_passes(self): # shorter is valid - MaxitemsValidation.from_openapi_data_( + MaxitemsValidation( [ 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MaxitemsValidation.from_openapi_data_( + MaxitemsValidation( [ 1, 2, ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxlength_validation.py index 37c6c376580..3642b160502 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxlength_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,47 +11,47 @@ import unit_test_api from unit_test_api.components.schema.maxlength_validation import MaxlengthValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaxlengthValidation(unittest.TestCase): """MaxlengthValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_too_long_is_invalid_fails(self): # too long is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxlengthValidation.from_openapi_data_( + MaxlengthValidation( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_strings_passes(self): # ignores non-strings - MaxlengthValidation.from_openapi_data_( + MaxlengthValidation( 100, - configuration_=self.configuration_ + configuration=self.configuration ) def test_shorter_is_valid_passes(self): # shorter is valid - MaxlengthValidation.from_openapi_data_( + MaxlengthValidation( "f", - configuration_=self.configuration_ + configuration=self.configuration ) def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): # two supplementary Unicode code points is long enough - MaxlengthValidation.from_openapi_data_( + MaxlengthValidation( "💩💩", - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MaxlengthValidation.from_openapi_data_( + MaxlengthValidation( "fo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties0_means_the_object_is_empty.py index 7d15b4a8c56..040d6fce4a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties0_means_the_object_is_empty.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties0_means_the_object_is_empty.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,30 +11,30 @@ import unit_test_api from unit_test_api.components.schema.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaxproperties0MeansTheObjectIsEmpty(unittest.TestCase): """Maxproperties0MeansTheObjectIsEmpty unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_no_properties_is_valid_passes(self): # no properties is valid - Maxproperties0MeansTheObjectIsEmpty.from_openapi_data_( + Maxproperties0MeansTheObjectIsEmpty( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_property_is_invalid_fails(self): # one property is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Maxproperties0MeansTheObjectIsEmpty.from_openapi_data_( + Maxproperties0MeansTheObjectIsEmpty( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties_validation.py index 58feb9cda40..6e541c1cfd2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_maxproperties_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,17 +11,17 @@ import unit_test_api from unit_test_api.components.schema.maxproperties_validation import MaxpropertiesValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMaxpropertiesValidation(unittest.TestCase): """MaxpropertiesValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_too_long_is_invalid_fails(self): # too long is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( { "foo": 1, @@ -32,54 +30,54 @@ def test_too_long_is_invalid_fails(self): "baz": 3, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_arrays_passes(self): # ignores arrays - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( [ 1, 2, 3, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_other_non_objects_passes(self): # ignores other non-objects - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_strings_passes(self): # ignores strings - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( "foobar", - configuration_=self.configuration_ + configuration=self.configuration ) def test_shorter_is_valid_passes(self): # shorter is valid - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MaxpropertiesValidation.from_openapi_data_( + MaxpropertiesValidation( { "foo": 1, "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation.py index 67276896b3c..4293444164e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,40 +11,40 @@ import unit_test_api from unit_test_api.components.schema.minimum_validation import MinimumValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMinimumValidation(unittest.TestCase): """MinimumValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_boundary_point_is_valid_passes(self): # boundary point is valid - MinimumValidation.from_openapi_data_( + MinimumValidation( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_below_the_minimum_is_invalid_fails(self): # below the minimum is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidation.from_openapi_data_( + MinimumValidation( 0.6, - configuration_=self.configuration_ + configuration=self.configuration ) def test_above_the_minimum_is_valid_passes(self): # above the minimum is valid - MinimumValidation.from_openapi_data_( + MinimumValidation( 2.6, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_numbers_passes(self): # ignores non-numbers - MinimumValidation.from_openapi_data_( + MinimumValidation( "x", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation_with_signed_integer.py index a8876922664..c1c64a6c177 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation_with_signed_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minimum_validation_with_signed_integer.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,62 +11,62 @@ import unit_test_api from unit_test_api.components.schema.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMinimumValidationWithSignedInteger(unittest.TestCase): """MinimumValidationWithSignedInteger unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_boundary_point_is_valid_passes(self): # boundary point is valid - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( -2, - configuration_=self.configuration_ + configuration=self.configuration ) def test_positive_above_the_minimum_is_valid_passes(self): # positive above the minimum is valid - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( 0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_int_below_the_minimum_is_invalid_fails(self): # int below the minimum is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( -3, - configuration_=self.configuration_ + configuration=self.configuration ) def test_float_below_the_minimum_is_invalid_fails(self): # float below the minimum is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( -2.0001, - configuration_=self.configuration_ + configuration=self.configuration ) def test_boundary_point_with_float_is_valid_passes(self): # boundary point with float is valid - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( -2.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_negative_above_the_minimum_is_valid_passes(self): # negative above the minimum is valid - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( -1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_numbers_passes(self): # ignores non-numbers - MinimumValidationWithSignedInteger.from_openapi_data_( + MinimumValidationWithSignedInteger( "x", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minitems_validation.py index 3c91561e849..dbc288325d1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minitems_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,46 +11,46 @@ import unit_test_api from unit_test_api.components.schema.minitems_validation import MinitemsValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMinitemsValidation(unittest.TestCase): """MinitemsValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_too_short_is_invalid_fails(self): # too short is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinitemsValidation.from_openapi_data_( + MinitemsValidation( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_arrays_passes(self): # ignores non-arrays - MinitemsValidation.from_openapi_data_( + MinitemsValidation( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_longer_is_valid_passes(self): # longer is valid - MinitemsValidation.from_openapi_data_( + MinitemsValidation( [ 1, 2, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MinitemsValidation.from_openapi_data_( + MinitemsValidation( [ 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minlength_validation.py index 80e3b7be614..1aaec9fa53f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minlength_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,48 +11,48 @@ import unit_test_api from unit_test_api.components.schema.minlength_validation import MinlengthValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMinlengthValidation(unittest.TestCase): """MinlengthValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_too_short_is_invalid_fails(self): # too short is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinlengthValidation.from_openapi_data_( + MinlengthValidation( "f", - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): # one supplementary Unicode code point is not long enough with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinlengthValidation.from_openapi_data_( + MinlengthValidation( "💩", - configuration_=self.configuration_ + configuration=self.configuration ) def test_longer_is_valid_passes(self): # longer is valid - MinlengthValidation.from_openapi_data_( + MinlengthValidation( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_non_strings_passes(self): # ignores non-strings - MinlengthValidation.from_openapi_data_( + MinlengthValidation( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MinlengthValidation.from_openapi_data_( + MinlengthValidation( "fo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minproperties_validation.py index b2b1bcb79e9..3ad32392c08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_minproperties_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,64 +11,64 @@ import unit_test_api from unit_test_api.components.schema.minproperties_validation import MinpropertiesValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestMinpropertiesValidation(unittest.TestCase): """MinpropertiesValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_ignores_arrays_passes(self): # ignores arrays - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_other_non_objects_passes(self): # ignores other non-objects - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_too_short_is_invalid_fails(self): # too short is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_strings_passes(self): # ignores strings - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_longer_is_valid_passes(self): # longer is valid - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( { "foo": 1, "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_exact_length_is_valid_passes(self): # exact length is valid - MinpropertiesValidation.from_openapi_data_( + MinpropertiesValidation( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_allof_to_check_validation_semantics.py index 76bb018b0ea..0c521cbc65c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_allof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_allof_to_check_validation_semantics.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNestedAllofToCheckValidationSemantics(unittest.TestCase): """NestedAllofToCheckValidationSemantics unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedAllofToCheckValidationSemantics.from_openapi_data_( + NestedAllofToCheckValidationSemantics( 123, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_valid_passes(self): # null is valid - NestedAllofToCheckValidationSemantics.from_openapi_data_( + NestedAllofToCheckValidationSemantics( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_anyof_to_check_validation_semantics.py index 256ff75148d..3fb3e2a00db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_anyof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_anyof_to_check_validation_semantics.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNestedAnyofToCheckValidationSemantics(unittest.TestCase): """NestedAnyofToCheckValidationSemantics unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedAnyofToCheckValidationSemantics.from_openapi_data_( + NestedAnyofToCheckValidationSemantics( 123, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_valid_passes(self): # null is valid - NestedAnyofToCheckValidationSemantics.from_openapi_data_( + NestedAnyofToCheckValidationSemantics( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_items.py index e9a41474070..d1f75dfa0d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_items.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.nested_items import NestedItems -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNestedItems(unittest.TestCase): """NestedItems unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_valid_nested_array_passes(self): # valid nested array - NestedItems.from_openapi_data_( + NestedItems( [ [ [ @@ -53,13 +51,13 @@ def test_valid_nested_array_passes(self): ], ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_nested_array_with_invalid_type_fails(self): # nested array with invalid type with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedItems.from_openapi_data_( + NestedItems( [ [ [ @@ -90,13 +88,13 @@ def test_nested_array_with_invalid_type_fails(self): ], ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_not_deep_enough_fails(self): # not deep enough with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedItems.from_openapi_data_( + NestedItems( [ [ [ @@ -121,7 +119,7 @@ def test_not_deep_enough_fails(self): ], ], ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_oneof_to_check_validation_semantics.py index 3aa3e36853c..d401dede4a5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_oneof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nested_oneof_to_check_validation_semantics.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNestedOneofToCheckValidationSemantics(unittest.TestCase): """NestedOneofToCheckValidationSemantics unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_anything_non_null_is_invalid_fails(self): # anything non-null is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedOneofToCheckValidationSemantics.from_openapi_data_( + NestedOneofToCheckValidationSemantics( 123, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_valid_passes(self): # null is valid - NestedOneofToCheckValidationSemantics.from_openapi_data_( + NestedOneofToCheckValidationSemantics( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_not_more_complex_schema.py index b97514dfaf1..77e82c3d5e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_not_more_complex_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_not_more_complex_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,39 +11,39 @@ import unit_test_api from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNotMoreComplexSchema(unittest.TestCase): """NotMoreComplexSchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_other_match_passes(self): # other match - NotMoreComplexSchema.from_openapi_data_( + NotMoreComplexSchema( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_fails(self): # mismatch with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NotMoreComplexSchema.from_openapi_data_( + NotMoreComplexSchema( { "foo": "bar", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_match_passes(self): # match - NotMoreComplexSchema.from_openapi_data_( + NotMoreComplexSchema( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nul_characters_in_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nul_characters_in_strings.py index befdb3a1112..96b500d829c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nul_characters_in_strings.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_nul_characters_in_strings.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNulCharactersInStrings(unittest.TestCase): """NulCharactersInStrings unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_match_string_with_nul_passes(self): # match string with nul - NulCharactersInStrings.from_openapi_data_( + NulCharactersInStrings( "hello\x00there", - configuration_=self.configuration_ + configuration=self.configuration ) def test_do_not_match_string_lacking_nul_fails(self): # do not match string lacking nul with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NulCharactersInStrings.from_openapi_data_( + NulCharactersInStrings( "hellothere", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_null_type_matches_only_the_null_object.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_null_type_matches_only_the_null_object.py index e030f14e354..6e7444a4ad7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_null_type_matches_only_the_null_object.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_null_type_matches_only_the_null_object.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,92 +11,92 @@ import unit_test_api from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNullTypeMatchesOnlyTheNullObject(unittest.TestCase): """NullTypeMatchesOnlyTheNullObject unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_a_float_is_not_null_fails(self): # a float is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_not_null_fails(self): # an object is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_false_is_not_null_fails(self): # false is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_not_null_fails(self): # an integer is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_true_is_not_null_fails(self): # true is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_zero_is_not_null_fails(self): # zero is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( 0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_empty_string_is_not_null_fails(self): # an empty string is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_null_passes(self): # null is null - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_not_null_fails(self): # an array is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_null_fails(self): # a string is not null with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_( + NullTypeMatchesOnlyTheNullObject( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_number_type_matches_numbers.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_number_type_matches_numbers.py index 5d988552074..cdd52194961 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_number_type_matches_numbers.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_number_type_matches_numbers.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,82 +11,82 @@ import unit_test_api from unit_test_api.components.schema.number_type_matches_numbers import NumberTypeMatchesNumbers -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestNumberTypeMatchesNumbers(unittest.TestCase): """NumberTypeMatchesNumbers unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_an_array_is_not_a_number_fails(self): # an array is not a number with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_a_number_fails(self): # null is not a number with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_not_a_number_fails(self): # an object is not a number with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_boolean_is_not_a_number_fails(self): # a boolean is not a number with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_is_a_number_passes(self): # a float is a number - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): # a string is still not a number, even if it looks like one with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( "1", - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_a_number_fails(self): # a string is not a number with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_a_number_passes(self): # an integer is a number - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(self): # a float with zero fractional part is a number (and an integer) - NumberTypeMatchesNumbers.from_openapi_data_( + NumberTypeMatchesNumbers( 1.0, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_properties_validation.py index 9ae135d0b43..e29a58f0fc0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_properties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_properties_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.object_properties_validation import ObjectPropertiesValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestObjectPropertiesValidation(unittest.TestCase): """ObjectPropertiesValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_ignores_arrays_passes(self): # ignores arrays - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_other_non_objects_passes(self): # ignores other non-objects - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_property_invalid_is_invalid_fails(self): # one property invalid is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( { "foo": 1, @@ -46,36 +44,36 @@ def test_one_property_invalid_is_invalid_fails(self): { }, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_properties_present_and_valid_is_valid_passes(self): # both properties present and valid is valid - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( { "foo": 1, "bar": "baz", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_doesn_t_invalidate_other_properties_passes(self): # doesn't invalidate other properties - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( { "quux": [ ], }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_properties_invalid_is_invalid_fails(self): # both properties invalid is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectPropertiesValidation.from_openapi_data_( + ObjectPropertiesValidation( { "foo": [ @@ -84,7 +82,7 @@ def test_both_properties_invalid_is_invalid_fails(self): { }, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_type_matches_objects.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_type_matches_objects.py index fd1b8d59be9..8b3e1f04070 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_type_matches_objects.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_object_type_matches_objects.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,68 +11,68 @@ import unit_test_api from unit_test_api.components.schema.object_type_matches_objects import ObjectTypeMatchesObjects -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestObjectTypeMatchesObjects(unittest.TestCase): """ObjectTypeMatchesObjects unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_a_float_is_not_an_object_fails(self): # a float is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_an_object_fails(self): # null is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_not_an_object_fails(self): # an array is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_an_object_passes(self): # an object is an object - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_not_an_object_fails(self): # a string is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_integer_is_not_an_object_fails(self): # an integer is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_boolean_is_not_an_object_fails(self): # a boolean is not an object with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectTypeMatchesObjects.from_openapi_data_( + ObjectTypeMatchesObjects( True, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof.py index ed0cd687433..39e20fe9d54 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,41 +11,41 @@ import unit_test_api from unit_test_api.components.schema.oneof import Oneof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestOneof(unittest.TestCase): """Oneof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_second_oneof_valid_passes(self): # second oneOf valid - Oneof.from_openapi_data_( + Oneof( 2.5, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_oneof_valid_fails(self): # both oneOf valid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Oneof.from_openapi_data_( + Oneof( 3, - configuration_=self.configuration_ + configuration=self.configuration ) def test_first_oneof_valid_passes(self): # first oneOf valid - Oneof.from_openapi_data_( + Oneof( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_neither_oneof_valid_fails(self): # neither oneOf valid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Oneof.from_openapi_data_( + Oneof( 1.5, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_complex_types.py index 991d4249643..0dfa568aee3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_complex_types.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,57 +11,57 @@ import unit_test_api from unit_test_api.components.schema.oneof_complex_types import OneofComplexTypes -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestOneofComplexTypes(unittest.TestCase): """OneofComplexTypes unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_first_oneof_valid_complex_passes(self): # first oneOf valid (complex) - OneofComplexTypes.from_openapi_data_( + OneofComplexTypes( { "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_neither_oneof_valid_complex_fails(self): # neither oneOf valid (complex) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofComplexTypes.from_openapi_data_( + OneofComplexTypes( { "foo": 2, "bar": "quux", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_oneof_valid_complex_fails(self): # both oneOf valid (complex) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofComplexTypes.from_openapi_data_( + OneofComplexTypes( { "foo": "baz", "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_second_oneof_valid_complex_passes(self): # second oneOf valid (complex) - OneofComplexTypes.from_openapi_data_( + OneofComplexTypes( { "foo": "baz", }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_base_schema.py index b96c587cc36..826ca821b33 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_base_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,34 +11,34 @@ import unit_test_api from unit_test_api.components.schema.oneof_with_base_schema import OneofWithBaseSchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestOneofWithBaseSchema(unittest.TestCase): """OneofWithBaseSchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_both_oneof_valid_fails(self): # both oneOf valid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithBaseSchema.from_openapi_data_( + OneofWithBaseSchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) def test_mismatch_base_schema_fails(self): # mismatch base schema with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithBaseSchema.from_openapi_data_( + OneofWithBaseSchema( 3, - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_oneof_valid_passes(self): # one oneOf valid - OneofWithBaseSchema.from_openapi_data_( + OneofWithBaseSchema( "foobar", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_empty_schema.py index 67d55ec667a..b82515c385a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_empty_schema.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.oneof_with_empty_schema import OneofWithEmptySchema -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestOneofWithEmptySchema(unittest.TestCase): """OneofWithEmptySchema unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_both_valid_invalid_fails(self): # both valid - invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithEmptySchema.from_openapi_data_( + OneofWithEmptySchema( 123, - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_valid_valid_passes(self): # one valid - valid - OneofWithEmptySchema.from_openapi_data_( + OneofWithEmptySchema( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_required.py index 966783764c3..77f3fe36f1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_required.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_oneof_with_required.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,17 +11,17 @@ import unit_test_api from unit_test_api.components.schema.oneof_with_required import OneofWithRequired -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestOneofWithRequired(unittest.TestCase): """OneofWithRequired unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_both_valid_invalid_fails(self): # both valid - invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithRequired.from_openapi_data_( + OneofWithRequired( { "foo": 1, @@ -32,42 +30,42 @@ def test_both_valid_invalid_fails(self): "baz": 3, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_both_invalid_invalid_fails(self): # both invalid - invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithRequired.from_openapi_data_( + OneofWithRequired( { "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_first_valid_valid_passes(self): # first valid - valid - OneofWithRequired.from_openapi_data_( + OneofWithRequired( { "foo": 1, "bar": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_second_valid_valid_passes(self): # second valid - valid - OneofWithRequired.from_openapi_data_( + OneofWithRequired( { "foo": 1, "baz": 3, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_is_not_anchored.py index fca5e035ce2..2066f7a3a45 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_is_not_anchored.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_is_not_anchored.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,18 +11,18 @@ import unit_test_api from unit_test_api.components.schema.pattern_is_not_anchored import PatternIsNotAnchored -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestPatternIsNotAnchored(unittest.TestCase): """PatternIsNotAnchored unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_matches_a_substring_passes(self): # matches a substring - PatternIsNotAnchored.from_openapi_data_( + PatternIsNotAnchored( "xxaayy", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_validation.py index e7e8a2f6d6b..cb9c8fa410b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_pattern_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,70 +11,70 @@ import unit_test_api from unit_test_api.components.schema.pattern_validation import PatternValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestPatternValidation(unittest.TestCase): """PatternValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_ignores_arrays_passes(self): # ignores arrays - PatternValidation.from_openapi_data_( + PatternValidation( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_objects_passes(self): # ignores objects - PatternValidation.from_openapi_data_( + PatternValidation( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_null_passes(self): # ignores null - PatternValidation.from_openapi_data_( + PatternValidation( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_floats_passes(self): # ignores floats - PatternValidation.from_openapi_data_( + PatternValidation( 1.0, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_non_matching_pattern_is_invalid_fails(self): # a non-matching pattern is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PatternValidation.from_openapi_data_( + PatternValidation( "abc", - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_booleans_passes(self): # ignores booleans - PatternValidation.from_openapi_data_( + PatternValidation( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_matching_pattern_is_valid_passes(self): # a matching pattern is valid - PatternValidation.from_openapi_data_( + PatternValidation( "aaa", - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_integers_passes(self): # ignores integers - PatternValidation.from_openapi_data_( + PatternValidation( 123, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_properties_with_escaped_characters.py index 64a64536692..80f6a9357cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_properties_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_properties_with_escaped_characters.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestPropertiesWithEscapedCharacters(unittest.TestCase): """PropertiesWithEscapedCharacters unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_object_with_all_numbers_is_valid_passes(self): # object with all numbers is valid - PropertiesWithEscapedCharacters.from_openapi_data_( + PropertiesWithEscapedCharacters( { "foo\nbar": 1, @@ -37,13 +35,13 @@ def test_object_with_all_numbers_is_valid_passes(self): "foo\fbar": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_object_with_strings_is_invalid_fails(self): # object with strings is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PropertiesWithEscapedCharacters.from_openapi_data_( + PropertiesWithEscapedCharacters( { "foo\nbar": "1", @@ -58,7 +56,7 @@ def test_object_with_strings_is_invalid_fails(self): "foo\fbar": "1", }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_property_named_ref_that_is_not_a_reference.py index 458301f7fc2..24ef1725840 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_property_named_ref_that_is_not_a_reference.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_property_named_ref_that_is_not_a_reference.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestPropertyNamedRefThatIsNotAReference(unittest.TestCase): """PropertyNamedRefThatIsNotAReference unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - PropertyNamedRefThatIsNotAReference.from_openapi_data_( + PropertyNamedRefThatIsNotAReference( { "$ref": "a", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PropertyNamedRefThatIsNotAReference.from_openapi_data_( + PropertyNamedRefThatIsNotAReference( { "$ref": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_additionalproperties.py index 16aaea2e96e..2f88b190e9e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_additionalproperties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_additionalproperties.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInAdditionalproperties(unittest.TestCase): """RefInAdditionalproperties unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInAdditionalproperties.from_openapi_data_( + RefInAdditionalproperties( { "someProp": { @@ -30,13 +28,13 @@ def test_property_named_ref_valid_passes(self): "a", }, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAdditionalproperties.from_openapi_data_( + RefInAdditionalproperties( { "someProp": { @@ -44,7 +42,7 @@ def test_property_named_ref_invalid_fails(self): 2, }, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_allof.py index 212046dc0a7..935af006a89 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_allof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.ref_in_allof import RefInAllof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInAllof(unittest.TestCase): """RefInAllof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInAllof.from_openapi_data_( + RefInAllof( { "$ref": "a", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAllof.from_openapi_data_( + RefInAllof( { "$ref": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_anyof.py index 526ecee032c..45505177f1f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_anyof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.ref_in_anyof import RefInAnyof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInAnyof(unittest.TestCase): """RefInAnyof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInAnyof.from_openapi_data_( + RefInAnyof( { "$ref": "a", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAnyof.from_openapi_data_( + RefInAnyof( { "$ref": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_items.py index ff6e8101687..30fbd1be3ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_items.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,36 +11,36 @@ import unit_test_api from unit_test_api.components.schema.ref_in_items import RefInItems -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInItems(unittest.TestCase): """RefInItems unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInItems.from_openapi_data_( + RefInItems( [ { "$ref": "a", }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInItems.from_openapi_data_( + RefInItems( [ { "$ref": 2, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_not.py index 5490bc5f3a7..c65a72f53a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_not.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.ref_in_not import RefInNot -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInNot(unittest.TestCase): """RefInNot unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInNot.from_openapi_data_( + RefInNot( { "$ref": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInNot.from_openapi_data_( + RefInNot( { "$ref": "a", }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_oneof.py index 387ea81e5d4..9b5a6aede10 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_oneof.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,32 +11,32 @@ import unit_test_api from unit_test_api.components.schema.ref_in_oneof import RefInOneof -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInOneof(unittest.TestCase): """RefInOneof unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInOneof.from_openapi_data_( + RefInOneof( { "$ref": "a", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInOneof.from_openapi_data_( + RefInOneof( { "$ref": 2, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_property.py index 4500e851df9..af95d91f971 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_ref_in_property.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.ref_in_property import RefInProperty -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRefInProperty(unittest.TestCase): """RefInProperty unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_named_ref_valid_passes(self): # property named $ref valid - RefInProperty.from_openapi_data_( + RefInProperty( { "a": { @@ -30,13 +28,13 @@ def test_property_named_ref_valid_passes(self): "a", }, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_property_named_ref_invalid_fails(self): # property named $ref invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInProperty.from_openapi_data_( + RefInProperty( { "a": { @@ -44,7 +42,7 @@ def test_property_named_ref_invalid_fails(self): 2, }, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_default_validation.py index 91f63373bf1..71ae458d2da 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_default_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_default_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,19 +11,19 @@ import unit_test_api from unit_test_api.components.schema.required_default_validation import RequiredDefaultValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRequiredDefaultValidation(unittest.TestCase): """RequiredDefaultValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_not_required_by_default_passes(self): # not required by default - RequiredDefaultValidation.from_openapi_data_( + RequiredDefaultValidation( { }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_validation.py index f85e696e18e..38b80facec5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,54 +11,54 @@ import unit_test_api from unit_test_api.components.schema.required_validation import RequiredValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRequiredValidation(unittest.TestCase): """RequiredValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_ignores_arrays_passes(self): # ignores arrays - RequiredValidation.from_openapi_data_( + RequiredValidation( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_present_required_property_is_valid_passes(self): # present required property is valid - RequiredValidation.from_openapi_data_( + RequiredValidation( { "foo": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_other_non_objects_passes(self): # ignores other non-objects - RequiredValidation.from_openapi_data_( + RequiredValidation( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_ignores_strings_passes(self): # ignores strings - RequiredValidation.from_openapi_data_( + RequiredValidation( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_present_required_property_is_invalid_fails(self): # non-present required property is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RequiredValidation.from_openapi_data_( + RequiredValidation( { "bar": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_empty_array.py index 16b7b777b75..dd7f02f9a13 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_empty_array.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_empty_array.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,19 +11,19 @@ import unit_test_api from unit_test_api.components.schema.required_with_empty_array import RequiredWithEmptyArray -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRequiredWithEmptyArray(unittest.TestCase): """RequiredWithEmptyArray unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_property_not_required_passes(self): # property not required - RequiredWithEmptyArray.from_openapi_data_( + RequiredWithEmptyArray( { }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_escaped_characters.py index d77fbec00aa..7a0af77092e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_required_with_escaped_characters.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,29 +11,29 @@ import unit_test_api from unit_test_api.components.schema.required_with_escaped_characters import RequiredWithEscapedCharacters -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestRequiredWithEscapedCharacters(unittest.TestCase): """RequiredWithEscapedCharacters unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_object_with_some_properties_missing_is_invalid_fails(self): # object with some properties missing is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RequiredWithEscapedCharacters.from_openapi_data_( + RequiredWithEscapedCharacters( { "foo\nbar": "1", "foo\"bar": "1", }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_object_with_all_properties_present_is_valid_passes(self): # object with all properties present is valid - RequiredWithEscapedCharacters.from_openapi_data_( + RequiredWithEscapedCharacters( { "foo\nbar": 1, @@ -50,7 +48,7 @@ def test_object_with_all_properties_present_is_valid_passes(self): "foo\fbar": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_simple_enum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_simple_enum_validation.py index fa87914530d..01bb23524a6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_simple_enum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_simple_enum_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.simple_enum_validation import SimpleEnumValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestSimpleEnumValidation(unittest.TestCase): """SimpleEnumValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_something_else_is_invalid_fails(self): # something else is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - SimpleEnumValidation.from_openapi_data_( + SimpleEnumValidation( 4, - configuration_=self.configuration_ + configuration=self.configuration ) def test_one_of_the_enum_is_valid_passes(self): # one of the enum is valid - SimpleEnumValidation.from_openapi_data_( + SimpleEnumValidation( 1, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_string_type_matches_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_string_type_matches_strings.py index e61669a6c17..5735055c338 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_string_type_matches_strings.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_string_type_matches_strings.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,82 +11,82 @@ import unit_test_api from unit_test_api.components.schema.string_type_matches_strings import StringTypeMatchesStrings -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestStringTypeMatchesStrings(unittest.TestCase): """StringTypeMatchesStrings unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_1_is_not_a_string_fails(self): # 1 is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( 1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): # a string is still a string, even if it looks like a number - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( "1", - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_empty_string_is_still_a_string_passes(self): # an empty string is still a string - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( "", - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_float_is_not_a_string_fails(self): # a float is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( 1.1, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_object_is_not_a_string_fails(self): # an object is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_array_is_not_a_string_fails(self): # an array is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_boolean_is_not_a_string_fails(self): # a boolean is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( True, - configuration_=self.configuration_ + configuration=self.configuration ) def test_null_is_not_a_string_fails(self): # null is not a string with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( None, - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_string_is_a_string_passes(self): # a string is a string - StringTypeMatchesStrings.from_openapi_data_( + StringTypeMatchesStrings( "foo", - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py index 43e21da415c..b8d3c37595f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,40 +11,40 @@ import unit_test_api from unit_test_api.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(unittest.TestCase): """TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_missing_properties_are_not_filled_in_with_the_default_passes(self): # missing properties are not filled in with the default - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_( + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(self): # an explicit property value is checked against maximum (passing) - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_( + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( { "alpha": 1, }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(self): # an explicit property value is checked against maximum (failing) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_( + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( { "alpha": 5, }, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_false_validation.py index 20ec05f4b3b..e5dd9063622 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_false_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_false_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,26 +11,26 @@ import unit_test_api from unit_test_api.components.schema.uniqueitems_false_validation import UniqueitemsFalseValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestUniqueitemsFalseValidation(unittest.TestCase): """UniqueitemsFalseValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_non_unique_array_of_integers_is_valid_passes(self): # non-unique array of integers is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 1, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_objects_is_valid_passes(self): # unique array of objects is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { "foo": @@ -43,12 +41,12 @@ def test_unique_array_of_objects_is_valid_passes(self): "baz", }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_nested_objects_is_valid_passes(self): # non-unique array of nested objects is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { "foo": @@ -71,12 +69,12 @@ def test_non_unique_array_of_nested_objects_is_valid_passes(self): }, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_objects_is_valid_passes(self): # non-unique array of objects is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { "foo": @@ -87,32 +85,32 @@ def test_non_unique_array_of_objects_is_valid_passes(self): "bar", }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_1_and_true_are_unique_passes(self): # 1 and true are unique - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 1, True, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_integers_is_valid_passes(self): # unique array of integers is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 1, 2, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_arrays_is_valid_passes(self): # non-unique array of arrays is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ [ "foo", @@ -121,33 +119,33 @@ def test_non_unique_array_of_arrays_is_valid_passes(self): "foo", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_numbers_are_unique_if_mathematically_unequal_passes(self): # numbers are unique if mathematically unequal - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 1.0, 1.0, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_false_is_not_equal_to_zero_passes(self): # false is not equal to zero - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 0, False, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_nested_objects_is_valid_passes(self): # unique array of nested objects is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { "foo": @@ -170,22 +168,22 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_0_and_false_are_unique_passes(self): # 0 and false are unique - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 0, False, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_arrays_is_valid_passes(self): # unique array of arrays is valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ [ "foo", @@ -194,22 +192,22 @@ def test_unique_array_of_arrays_is_valid_passes(self): "bar", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_true_is_not_equal_to_one_passes(self): # true is not equal to one - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ 1, True, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_heterogeneous_types_are_valid_passes(self): # non-unique heterogeneous types are valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { }, @@ -222,12 +220,12 @@ def test_non_unique_heterogeneous_types_are_valid_passes(self): }, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_heterogeneous_types_are_valid_passes(self): # unique heterogeneous types are valid - UniqueitemsFalseValidation.from_openapi_data_( + UniqueitemsFalseValidation( [ { }, @@ -238,7 +236,7 @@ def test_unique_heterogeneous_types_are_valid_passes(self): None, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_validation.py index 97d165d9005..fafe52551cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uniqueitems_validation.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,16 +11,16 @@ import unit_test_api from unit_test_api.components.schema.uniqueitems_validation import UniqueitemsValidation -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestUniqueitemsValidation(unittest.TestCase): """UniqueitemsValidation unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_unique_array_of_objects_is_valid_passes(self): # unique array of objects is valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "foo": @@ -33,12 +31,12 @@ def test_unique_array_of_objects_is_valid_passes(self): "baz", }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_true_and_a1_are_unique_passes(self): # {"a": true} and {"a": 1} are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "a": @@ -49,13 +47,13 @@ def test_a_true_and_a1_are_unique_passes(self): 1, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_heterogeneous_types_are_invalid_fails(self): # non-unique heterogeneous types are invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { }, @@ -68,12 +66,12 @@ def test_non_unique_heterogeneous_types_are_invalid_fails(self): }, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_nested0_and_false_are_unique_passes(self): # nested [0] and [false] are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ [ @@ -88,12 +86,12 @@ def test_nested0_and_false_are_unique_passes(self): "foo", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_a_false_and_a0_are_unique_passes(self): # {"a": false} and {"a": 0} are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "a": @@ -104,34 +102,34 @@ def test_a_false_and_a0_are_unique_passes(self): 0, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_numbers_are_unique_if_mathematically_unequal_fails(self): # numbers are unique if mathematically unequal with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 1.0, 1.0, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_false_is_not_equal_to_zero_passes(self): # false is not equal to zero - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 0, False, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_0_and_false_are_unique_passes(self): # [0] and [false] are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ 0, @@ -140,12 +138,12 @@ def test_0_and_false_are_unique_passes(self): False, ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_arrays_is_valid_passes(self): # unique array of arrays is valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ "foo", @@ -154,13 +152,13 @@ def test_unique_array_of_arrays_is_valid_passes(self): "bar", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_nested_objects_is_invalid_fails(self): # non-unique array of nested objects is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "foo": @@ -183,35 +181,35 @@ def test_non_unique_array_of_nested_objects_is_invalid_fails(self): }, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): # non-unique array of more than two integers is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 1, 2, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_true_is_not_equal_to_one_passes(self): # true is not equal to one - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 1, True, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_objects_are_non_unique_despite_key_order_fails(self): # objects are non-unique despite key order with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "a": @@ -226,23 +224,23 @@ def test_objects_are_non_unique_despite_key_order_fails(self): 1, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_strings_is_valid_passes(self): # unique array of strings is valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ "foo", "bar", "baz", ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_1_and_true_are_unique_passes(self): # [1] and [true] are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ 1, @@ -251,12 +249,12 @@ def test_1_and_true_are_unique_passes(self): True, ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_different_objects_are_unique_passes(self): # different objects are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "a": @@ -271,23 +269,23 @@ def test_different_objects_are_unique_passes(self): 1, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_integers_is_valid_passes(self): # unique array of integers is valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 1, 2, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): # non-unique array of more than two arrays is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ "foo", @@ -299,13 +297,13 @@ def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): "foo", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_objects_is_invalid_fails(self): # non-unique array of objects is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "foo": @@ -316,12 +314,12 @@ def test_non_unique_array_of_objects_is_invalid_fails(self): "bar", }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_array_of_nested_objects_is_valid_passes(self): # unique array of nested objects is valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { "foo": @@ -344,13 +342,13 @@ def test_unique_array_of_nested_objects_is_valid_passes(self): }, }, ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_arrays_is_invalid_fails(self): # non-unique array of arrays is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ "foo", @@ -359,24 +357,24 @@ def test_non_unique_array_of_arrays_is_invalid_fails(self): "foo", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_strings_is_invalid_fails(self): # non-unique array of strings is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ "foo", "bar", "foo", ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_nested1_and_true_are_unique_passes(self): # nested [1] and [true] are unique - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ [ [ @@ -391,12 +389,12 @@ def test_nested1_and_true_are_unique_passes(self): "foo", ], ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_unique_heterogeneous_types_are_valid_passes(self): # unique heterogeneous types are valid - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ { }, @@ -408,18 +406,18 @@ def test_unique_heterogeneous_types_are_valid_passes(self): 1, "{}", ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_non_unique_array_of_integers_is_invalid_fails(self): # non-unique array of integers is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_( + UniqueitemsValidation( [ 1, 1, ], - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_format.py index 87279b23274..5432e117165 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.uri_format import UriFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestUriFormat(unittest.TestCase): """UriFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - UriFormat.from_openapi_data_( + UriFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - UriFormat.from_openapi_data_( + UriFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - UriFormat.from_openapi_data_( + UriFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - UriFormat.from_openapi_data_( + UriFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - UriFormat.from_openapi_data_( + UriFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - UriFormat.from_openapi_data_( + UriFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_reference_format.py index 092ccd38951..02c82da19ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_reference_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_reference_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.uri_reference_format import UriReferenceFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestUriReferenceFormat(unittest.TestCase): """UriReferenceFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - UriReferenceFormat.from_openapi_data_( + UriReferenceFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_template_format.py index 09942297f6d..68467d0094e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_template_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/components/schema/test_uri_template_format.py @@ -2,9 +2,7 @@ """ openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ @@ -13,55 +11,55 @@ import unit_test_api from unit_test_api.components.schema.uri_template_format import UriTemplateFormat -from unit_test_api import configuration +from unit_test_api.configurations import schema_configuration class TestUriTemplateFormat(unittest.TestCase): """UriTemplateFormat unit test stubs""" - configuration_ = configuration.Configuration() + configuration = schema_configuration.SchemaConfiguration() def test_all_string_formats_ignore_objects_passes(self): # all string formats ignore objects - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( { }, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_booleans_passes(self): # all string formats ignore booleans - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( False, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_integers_passes(self): # all string formats ignore integers - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( 12, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_floats_passes(self): # all string formats ignore floats - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( 13.7, - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_arrays_passes(self): # all string formats ignore arrays - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( [ ], - configuration_=self.configuration_ + configuration=self.configuration ) def test_all_string_formats_ignore_nulls_passes(self): # all string formats ignore nulls - UriTemplateFormat.from_openapi_data_( + UriTemplateFormat( None, - configuration_=self.configuration_ + configuration=self.configuration ) From 7ed8a9fdb3d5bb07720f28c1384ff01d2758ca88 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 20:44:56 -0700 Subject: [PATCH 35/36] Fixes bug with allof/anyOf/oneOf type names --- .../codegen/DefaultCodegen.java | 11 +- .../languages/PythonClientCodegen.java | 4 +- .../python/.openapi-generator/FILES | 87 ---- .../unit_test_api/components/schema/allof.py | 4 +- .../unit_test_api/components/schema/anyof.py | 4 +- ...ted_allof_to_check_validation_semantics.py | 4 +- ...ted_anyof_to_check_validation_semantics.py | 4 +- ...ted_oneof_to_check_validation_semantics.py | 4 +- .../unit_test_api/components/schema/oneof.py | 4 +- .../python/src/unit_test_api/configuration.py | 404 ------------------ 10 files changed, 20 insertions(+), 510 deletions(-) delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/configuration.py diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java index fae7b9e8268..4906edb8312 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/DefaultCodegen.java @@ -4310,8 +4310,8 @@ public CodegenRequestBody fromRequestBody(RequestBody requestBody, String source } @Override - public CodegenKey getKey(String key, String expectedComponentType) { - return getKey(key, expectedComponentType, null); + public CodegenKey getKey(String key, String keyType) { + return getKey(key, keyType, null); } public CodegenKey getKey(String key, String keyType, String sourceJsonPath) { @@ -4430,7 +4430,8 @@ protected LinkedHashMapWithContext getRequiredPropert } } else if (additionalProperties != null && additionalProperties.isBooleanSchemaFalse) { // required property is not defined in properties, and additionalProperties is false, value is null - CodegenKey key = getKey(requiredPropertyName, "schemas"); + // no schema definition: error use case? + CodegenKey key = getKey(requiredPropertyName, "schemas", null); requiredProperties.put(key, null); requiredAndOptionalProperties.put(requiredPropertyName, key); } else { @@ -4454,7 +4455,7 @@ protected LinkedHashMapWithContext getRequiredPropert allAreInline = false; } } - CodegenKey key = getKey(requiredPropertyName, "schemas"); + CodegenKey key = getKey(requiredPropertyName, "schemas", sourceJsonPath); requiredProperties.put(key, prop); requiredAndOptionalProperties.put(requiredPropertyName, key); } @@ -4854,7 +4855,7 @@ private ArrayListWithContext getComposedProperties(List x i += 1; } xOf.setAllAreInline(allAreInline); - CodegenKey jsonPathPiece = getKey(collectionName, "schemaProperty"); + CodegenKey jsonPathPiece = getKey(collectionName, "schemaProperty", sourceJsonPath); xOf.setJsonPathPiece(jsonPathPiece); return xOf; } diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java index 8735768a0c9..991790364b0 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java @@ -1365,7 +1365,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o String schemaName = getSchemaName(mm.modelName); Schema modelSchema = getModelNameToSchemaCache().get(schemaName); CodegenSchema cp = new CodegenSchema(); - cp.jsonPathPiece = getKey(disc.propertyName.original, "misc"); + cp.jsonPathPiece = getKey(disc.propertyName.original, "misc", null); cp.example = discPropNameValue; return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); } @@ -1532,7 +1532,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o String schemaName = getSchemaName(mm.modelName); Schema modelSchema = getModelNameToSchemaCache().get(schemaName); CodegenSchema cp = new CodegenSchema(); - cp.jsonPathPiece = getKey(disc.propertyName.original, "misc"); + cp.jsonPathPiece = getKey(disc.propertyName.original, "misc", null); cp.example = discPropNameValue; return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); } diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES index 13ff19b8c35..1f86eda2681 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -2097,93 +2097,6 @@ test-requirements.txt test/__init__.py test/components/__init__.py test/components/schema/__init__.py -test/components/schema/test__not.py -test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py -test/components/schema/test_additionalproperties_are_allowed_by_default.py -test/components/schema/test_additionalproperties_can_exist_by_itself.py -test/components/schema/test_additionalproperties_should_not_look_in_applicators.py -test/components/schema/test_allof.py -test/components/schema/test_allof_combined_with_anyof_oneof.py -test/components/schema/test_allof_simple_types.py -test/components/schema/test_allof_with_base_schema.py -test/components/schema/test_allof_with_one_empty_schema.py -test/components/schema/test_allof_with_the_first_empty_schema.py -test/components/schema/test_allof_with_the_last_empty_schema.py -test/components/schema/test_allof_with_two_empty_schemas.py -test/components/schema/test_anyof.py -test/components/schema/test_anyof_complex_types.py -test/components/schema/test_anyof_with_base_schema.py -test/components/schema/test_anyof_with_one_empty_schema.py -test/components/schema/test_array_type_matches_arrays.py -test/components/schema/test_boolean_type_matches_booleans.py -test/components/schema/test_by_int.py -test/components/schema/test_by_number.py -test/components/schema/test_by_small_number.py -test/components/schema/test_date_time_format.py -test/components/schema/test_email_format.py -test/components/schema/test_enum_with0_does_not_match_false.py -test/components/schema/test_enum_with1_does_not_match_true.py -test/components/schema/test_enum_with_escaped_characters.py -test/components/schema/test_enum_with_false_does_not_match0.py -test/components/schema/test_enum_with_true_does_not_match1.py -test/components/schema/test_enums_in_properties.py -test/components/schema/test_forbidden_property.py -test/components/schema/test_hostname_format.py -test/components/schema/test_integer_type_matches_integers.py -test/components/schema/test_invalid_instance_should_not_raise_error_when_float_division_inf.py -test/components/schema/test_invalid_string_value_for_default.py -test/components/schema/test_ipv4_format.py -test/components/schema/test_ipv6_format.py -test/components/schema/test_json_pointer_format.py -test/components/schema/test_maximum_validation.py -test/components/schema/test_maximum_validation_with_unsigned_integer.py -test/components/schema/test_maxitems_validation.py -test/components/schema/test_maxlength_validation.py -test/components/schema/test_maxproperties0_means_the_object_is_empty.py -test/components/schema/test_maxproperties_validation.py -test/components/schema/test_minimum_validation.py -test/components/schema/test_minimum_validation_with_signed_integer.py -test/components/schema/test_minitems_validation.py -test/components/schema/test_minlength_validation.py -test/components/schema/test_minproperties_validation.py -test/components/schema/test_nested_allof_to_check_validation_semantics.py -test/components/schema/test_nested_anyof_to_check_validation_semantics.py -test/components/schema/test_nested_items.py -test/components/schema/test_nested_oneof_to_check_validation_semantics.py -test/components/schema/test_not_more_complex_schema.py -test/components/schema/test_nul_characters_in_strings.py -test/components/schema/test_null_type_matches_only_the_null_object.py -test/components/schema/test_number_type_matches_numbers.py -test/components/schema/test_object_properties_validation.py -test/components/schema/test_object_type_matches_objects.py -test/components/schema/test_oneof.py -test/components/schema/test_oneof_complex_types.py -test/components/schema/test_oneof_with_base_schema.py -test/components/schema/test_oneof_with_empty_schema.py -test/components/schema/test_oneof_with_required.py -test/components/schema/test_pattern_is_not_anchored.py -test/components/schema/test_pattern_validation.py -test/components/schema/test_properties_with_escaped_characters.py -test/components/schema/test_property_named_ref_that_is_not_a_reference.py -test/components/schema/test_ref_in_additionalproperties.py -test/components/schema/test_ref_in_allof.py -test/components/schema/test_ref_in_anyof.py -test/components/schema/test_ref_in_items.py -test/components/schema/test_ref_in_not.py -test/components/schema/test_ref_in_oneof.py -test/components/schema/test_ref_in_property.py -test/components/schema/test_required_default_validation.py -test/components/schema/test_required_validation.py -test/components/schema/test_required_with_empty_array.py -test/components/schema/test_required_with_escaped_characters.py -test/components/schema/test_simple_enum_validation.py -test/components/schema/test_string_type_matches_strings.py -test/components/schema/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py -test/components/schema/test_uniqueitems_false_validation.py -test/components/schema/test_uniqueitems_validation.py -test/components/schema/test_uri_format.py -test/components/schema/test_uri_reference_format.py -test/components/schema/test_uri_template_format.py test/test_paths/__init__.py test/test_paths/__init__.py test/test_paths/__init__.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py index 026e08b8b46..eb94d29bbf4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py @@ -217,7 +217,7 @@ def __new__( ) return inst -AllOf = typing.Tuple[ +AllOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] @@ -237,7 +237,7 @@ class Allof( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py index 7a581dc82f2..d16da9f7b51 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py @@ -66,7 +66,7 @@ def __new__( ) return inst -AnyOf = typing.Tuple[ +AnyOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] @@ -86,7 +86,7 @@ class Anyof( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py index ba6d56eb199..9e06181e805 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py @@ -69,7 +69,7 @@ def __new__( ) return inst -AllOf = typing.Tuple[ +AllOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], ] DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] @@ -88,7 +88,7 @@ class NestedAllofToCheckValidationSemantics( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py index c9e8ccbf9c3..b308074c44e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py @@ -69,7 +69,7 @@ def __new__( ) return inst -AnyOf = typing.Tuple[ +AnyOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], ] DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] @@ -88,7 +88,7 @@ class NestedAnyofToCheckValidationSemantics( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py index fc96f22648d..d008609ded8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py @@ -69,7 +69,7 @@ def __new__( ) return inst -OneOf = typing.Tuple[ +OneOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], ] DictInput2 = typing.Mapping[str, schemas.INPUT_TYPES_ALL_INCL_SCHEMA] @@ -88,7 +88,7 @@ class NestedOneofToCheckValidationSemantics( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py index 5b72f695bd8..6c9f89f0e83 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py @@ -66,7 +66,7 @@ def __new__( ) return inst -OneOf = typing.Tuple[ +OneOf2 = typing.Tuple[ typing.Type[_0[schemas.U]], typing.Type[_1[schemas.U]], ] @@ -86,7 +86,7 @@ class Oneof( @dataclasses.dataclass(frozen=True) class Schema_(metaclass=schemas.SingletonMeta): # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore def __new__( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/configuration.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/configuration.py deleted file mode 100644 index 17b28cf44aa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/configuration.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing - -import urllib3 - -from unit_test_api import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'types': 'type', - 'enum_value_to_name': 'enum', - 'unique_items': 'uniqueItems', - 'min_items': 'minItems', - 'max_items': 'maxItems', - 'min_properties': 'minProperties', - 'max_properties': 'maxProperties', - 'min_length': 'minLength', - 'max_length': 'maxLength', - 'inclusive_minimum': 'minimum', - 'exclusive_minimum': 'exclusiveMinimum', - 'inclusive_maximum': 'maximum', - 'exclusive_maximum': 'exclusiveMaximum', - 'multiple_of': 'multipleOf', - 'regex': 'pattern', - 'format': 'format', - 'required': 'required', - 'items': 'items', - 'Items': 'items', - 'Properties': 'properties', - 'additional_properties': 'additionalProperties', - 'additionalProperties': 'additionalProperties', - 'OneOf': 'oneOf', - 'AnyOf': 'anyOf', - 'AllOf': 'allOf', - '_not': 'not', - '_Not': 'not', - 'discriminator': 'discriminator' -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param host: Base url - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - """ - - _default = None - - def __init__( - self, - host: typing.Optional[str] = None, - disabled_json_schema_keywords = frozenset(), - server_index: typing.Optional[int] = None, - server_variables = None, - server_operation_index = None, - server_operation_variables = None, - ): - """Constructor - """ - self._base_path = host or "https://someserver.com/v1" - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.auth_info = {} - self.disabled_json_schema_keywords = disabled_json_schema_keywords - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("unit_test_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://someserver.com/v1", - 'description': "No description provided", - } - ] - - def get_host_from_settings( - self, - index: typing.Optional[int], - variables: typing.Optional[typing.Dict[str, dict]] = None, - servers: typing.Optional[typing.List[dict]] = None - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = variables or {} - servers = servers or self.get_host_settings() - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None From 9a585342ad63dcc5ed1c712306ce2f4ef58b87de Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 12 Jun 2023 21:42:15 -0700 Subject: [PATCH 36/36] Fixes python non compliant discriminator test --- .../src/main/resources/python/schemas.hbs | 4 ++-- .../python/src/this_package/schemas.py | 4 ++-- .../python/test_manual/test_operator.py | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index 5123004c430..ef9bec715cf 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -1184,7 +1184,8 @@ def _get_discriminated_class_and_exception( ) -> typing.Tuple[typing.Optional['Schema'], typing.Optional[Exception]]: if not isinstance(arg, frozendict.frozendict): return None, None - discriminator = cls_schema().discriminator() + cls_schema = cls.Schema_() + discriminator = cls_schema.discriminator disc_prop_name = list(discriminator.keys())[0] try: __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) @@ -1314,7 +1315,6 @@ class Schema(typing.Generic[T]): not in validation_metadata.configuration.disabled_json_schema_python_keywords } {{#if nonCompliantUseDiscriminatorIfCompositionFails}} - print(f'json_schema_data {json_schema_data}') kwargs = {} if 'discriminator' in json_schema_data: discriminated_cls, ensure_discriminator_value_present_exc = _get_discriminated_class_and_exception( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py index f24dc612a17..0a3387caef0 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py @@ -1134,7 +1134,8 @@ def _get_discriminated_class_and_exception( ) -> typing.Tuple[typing.Optional['Schema'], typing.Optional[Exception]]: if not isinstance(arg, frozendict.frozendict): return None, None - discriminator = cls_schema().discriminator() + cls_schema = cls.Schema_() + discriminator = cls_schema.discriminator disc_prop_name = list(discriminator.keys())[0] try: __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) @@ -1253,7 +1254,6 @@ def _validate( and k not in validation_metadata.configuration.disabled_json_schema_python_keywords } - print(f'json_schema_data {json_schema_data}') kwargs = {} if 'discriminator' in json_schema_data: discriminated_cls, ensure_discriminator_value_present_exc = _get_discriminated_class_and_exception( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_manual/test_operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_manual/test_operator.py index b6084f2d402..d9d38c18647 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_manual/test_operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_manual/test_operator.py @@ -20,11 +20,11 @@ class TestOperator(unittest.TestCase): """Operator unit test stubs""" def test_discriminator_works(self): - op = Operator( - operator_id='ADD', - a=3.14, - b=3.14 - ) + op = Operator({ + 'operator_id': 'ADD', + 'a': 3.14, + 'b': 3.14 + }) assert op == dict( operator_id='ADD', a=3.14,