diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 534c5248293c..d0d3fd79d436 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -566,9 +566,14 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { } } - private void addNullDefaultToOneOfAnyOfReqProps(Schema schema, CodegenModel result) { + private void fixComposedSchemaRequiredVars(Schema schema, CodegenModel result) { // for composed schema models, if the required properties are only from oneOf or anyOf models - // give them a nulltype.Null so the user can omit including them in python + // remove them from the composed schema's required vars + // for composed schemas our code adds oneOf and anyOf required properties to + // the composed schema's required properties + // but they should not be required because if we have ComposedSchema: oneOf -schemaA -schemaB + // and the required props are only in schemaB, we do not need to use them when making an instance of + // ComposedSchema + schemaA ComposedSchema cs = (ComposedSchema) schema; // these are the properties that are from properties in self cs or cs allOf @@ -596,7 +601,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { List allOf = cs.getAllOf(); if ((schema.getProperties() != null && !schema.getProperties().isEmpty()) || allOf != null) { - // NOTE: this function also adds the allOf propesrties inside schema + // NOTE: this function also adds the allOf properties inside schema addProperties(selfProperties, selfRequired, schema); } if (result.discriminator != null) { @@ -605,16 +610,20 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { Set selfRequiredSet = new HashSet(selfRequired); List reqVars = result.getRequiredVars(); + List reqVarsThatMustBeOptional = new ArrayList<>(); if (reqVars != null) { for (CodegenProperty cp : reqVars) { String propName = cp.baseName; if (otherRequiredSet.contains(propName) && !selfRequiredSet.contains(propName)) { - // if var is in otherRequiredSet and is not in selfRequiredSet and is in result.requiredVars - // then set it to nullable because the user doesn't have to give a value for it - cp.setDefaultValue("nulltype.Null"); + cp.required = false; + reqVarsThatMustBeOptional.add(cp); } } } + for (CodegenProperty cp : reqVarsThatMustBeOptional) { + result.getRequiredVars().remove(cp); + result.getOptionalVars().add(cp); + } } /** @@ -643,7 +652,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { public CodegenModel fromModel(String name, Schema sc) { CodegenModel cm = super.fromModel(name, sc); if (cm.requiredVars.size() > 0 && (cm.oneOf.size() > 0 || cm.anyOf.size() > 0)) { - addNullDefaultToOneOfAnyOfReqProps(sc, cm); + fixComposedSchemaRequiredVars(sc, cm); } ArrayList> listOfLists = new ArrayList>(); listOfLists.add(cm.requiredVars); diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index 34fd9e5cde7b..680b60644c0d 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -3,8 +3,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from {{packageName}}.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache index 8b3650b33a2c..9b298379710c 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache @@ -24,11 +24,6 @@ '{{name}}': {{name}}, {{/requiredVars}} } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/modules/openapi-generator/src/main/resources/python/requirements.mustache b/modules/openapi-generator/src/main/resources/python/requirements.mustache index 73a84334c8b6..96947f60408f 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/requirements.mustache @@ -1,4 +1,3 @@ -nulltype python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index 707ff5bb506b..d5154f3fa6f1 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -17,7 +17,6 @@ VERSION = "{{packageVersion}}" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", {{#asyncio}} "aiohttp >= 3.0.0", {{/asyncio}} diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py index 6be540eff396..4531d8f2d862 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py index 0f7d7d0f67fd..4a35500c63f3 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py b/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py index f76309b7675f..ca129b766ec5 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py index a08504d6d7e6..743f3be54d44 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py b/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py index f190aa93565c..87d78bf36005 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_integer.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_number.py b/samples/client/petstore/python/petstore_api/model/additional_properties_number.py index 54d952d01cd8..b10bd036ff3f 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_number.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_number.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py index 7d62ed91ab8e..40e80e16044d 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_string.py b/samples/client/petstore/python/petstore_api/model/additional_properties_string.py index 8f113367997d..7f1f94aa6b6b 100644 --- a/samples/client/petstore/python/petstore_api/model/additional_properties_string.py +++ b/samples/client/petstore/python/petstore_api/model/additional_properties_string.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/animal.py b/samples/client/petstore/python/petstore_api/model/animal.py index 9767120a13ea..a3d48b6ea975 100644 --- a/samples/client/petstore/python/petstore_api/model/animal.py +++ b/samples/client/petstore/python/petstore_api/model/animal.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/animal_farm.py b/samples/client/petstore/python/petstore_api/model/animal_farm.py index 97f342cef81d..a24e4f50d47b 100644 --- a/samples/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/client/petstore/python/petstore_api/model/animal_farm.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/api_response.py b/samples/client/petstore/python/petstore_api/model/api_response.py index 777474274058..01e2175b8004 100644 --- a/samples/client/petstore/python/petstore_api/model/api_response.py +++ b/samples/client/petstore/python/petstore_api/model/api_response.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py index f4d7c4b89011..008b74dd42a3 100644 --- a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py index de65fb7e4970..f2e080bc258e 100644 --- a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/array_test.py b/samples/client/petstore/python/petstore_api/model/array_test.py index b56cf1f70a86..ac42b07b93c9 100644 --- a/samples/client/petstore/python/petstore_api/model/array_test.py +++ b/samples/client/petstore/python/petstore_api/model/array_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/capitalization.py b/samples/client/petstore/python/petstore_api/model/capitalization.py index 420c52730695..710c17e51a56 100644 --- a/samples/client/petstore/python/petstore_api/model/capitalization.py +++ b/samples/client/petstore/python/petstore_api/model/capitalization.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/cat.py b/samples/client/petstore/python/petstore_api/model/cat.py index b0d7c95485d3..8b5c46413b99 100644 --- a/samples/client/petstore/python/petstore_api/model/cat.py +++ b/samples/client/petstore/python/petstore_api/model/cat.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -187,11 +185,6 @@ class Cat(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/client/petstore/python/petstore_api/model/cat_all_of.py index ec0267b9920a..50b046510dfa 100644 --- a/samples/client/petstore/python/petstore_api/model/cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/cat_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/category.py b/samples/client/petstore/python/petstore_api/model/category.py index 6d2c535a01b5..ed167471d356 100644 --- a/samples/client/petstore/python/petstore_api/model/category.py +++ b/samples/client/petstore/python/petstore_api/model/category.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/child.py b/samples/client/petstore/python/petstore_api/model/child.py index fa5786f43131..c8f0a70a1931 100644 --- a/samples/client/petstore/python/petstore_api/model/child.py +++ b/samples/client/petstore/python/petstore_api/model/child.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -181,11 +179,6 @@ class Child(ModelComposed): } required_args = { } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/child_all_of.py b/samples/client/petstore/python/petstore_api/model/child_all_of.py index 4c20c6bf7d02..2339e520bd65 100644 --- a/samples/client/petstore/python/petstore_api/model/child_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/child_cat.py b/samples/client/petstore/python/petstore_api/model/child_cat.py index f81aa9be219b..a7d52b48e8ac 100644 --- a/samples/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/client/petstore/python/petstore_api/model/child_cat.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -184,11 +182,6 @@ class ChildCat(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py index 4dd71659c336..f0f1a1ae6bd4 100644 --- a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/child_dog.py b/samples/client/petstore/python/petstore_api/model/child_dog.py index 5498dbdde817..2bc0882ac2a9 100644 --- a/samples/client/petstore/python/petstore_api/model/child_dog.py +++ b/samples/client/petstore/python/petstore_api/model/child_dog.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -184,11 +182,6 @@ class ChildDog(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py index c46d5bceea29..d460b68b3d3a 100644 --- a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard.py b/samples/client/petstore/python/petstore_api/model/child_lizard.py index cc18799365ed..6142b9c751fe 100644 --- a/samples/client/petstore/python/petstore_api/model/child_lizard.py +++ b/samples/client/petstore/python/petstore_api/model/child_lizard.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -184,11 +182,6 @@ class ChildLizard(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py index 3dcfae6a2b9f..669b9338d796 100644 --- a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/class_model.py b/samples/client/petstore/python/petstore_api/model/class_model.py index cc7c422a4bab..18c16f89f908 100644 --- a/samples/client/petstore/python/petstore_api/model/class_model.py +++ b/samples/client/petstore/python/petstore_api/model/class_model.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/client.py b/samples/client/petstore/python/petstore_api/model/client.py index 99149547dd64..da615c547731 100644 --- a/samples/client/petstore/python/petstore_api/model/client.py +++ b/samples/client/petstore/python/petstore_api/model/client.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/dog.py b/samples/client/petstore/python/petstore_api/model/dog.py index 4cbbfba41ec7..e9c201c983bb 100644 --- a/samples/client/petstore/python/petstore_api/model/dog.py +++ b/samples/client/petstore/python/petstore_api/model/dog.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -187,11 +185,6 @@ class Dog(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/client/petstore/python/petstore_api/model/dog_all_of.py index 3e671f37e72a..b7b2e7db66d9 100644 --- a/samples/client/petstore/python/petstore_api/model/dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/dog_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/client/petstore/python/petstore_api/model/enum_arrays.py index cc00cdd47567..43ebac57de38 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_arrays.py +++ b/samples/client/petstore/python/petstore_api/model/enum_arrays.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/enum_class.py b/samples/client/petstore/python/petstore_api/model/enum_class.py index 8f305f80e506..fc4bf47f340a 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/client/petstore/python/petstore_api/model/enum_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/enum_test.py b/samples/client/petstore/python/petstore_api/model/enum_test.py index 8225b1af62f2..79ba0f6a747c 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_test.py +++ b/samples/client/petstore/python/petstore_api/model/enum_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/file.py b/samples/client/petstore/python/petstore_api/model/file.py index 207b8559fdef..a38cccacc6ab 100644 --- a/samples/client/petstore/python/petstore_api/model/file.py +++ b/samples/client/petstore/python/petstore_api/model/file.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py index a35b625ed24d..b8c519ed9c7c 100644 --- a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/format_test.py b/samples/client/petstore/python/petstore_api/model/format_test.py index 93b1e857e71d..494ce2646da0 100644 --- a/samples/client/petstore/python/petstore_api/model/format_test.py +++ b/samples/client/petstore/python/petstore_api/model/format_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/grandparent.py b/samples/client/petstore/python/petstore_api/model/grandparent.py index 909508952864..a52744cc3e24 100644 --- a/samples/client/petstore/python/petstore_api/model/grandparent.py +++ b/samples/client/petstore/python/petstore_api/model/grandparent.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py index f231210bad56..48d3f6d9f0b3 100644 --- a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py +++ b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py index d2be9ac5add3..c94781ae2c46 100644 --- a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py +++ b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/list.py b/samples/client/petstore/python/petstore_api/model/list.py index d04df031cfa2..09c762d6a794 100644 --- a/samples/client/petstore/python/petstore_api/model/list.py +++ b/samples/client/petstore/python/petstore_api/model/list.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/map_test.py b/samples/client/petstore/python/petstore_api/model/map_test.py index 93e19b2f2440..169fb9d88ee0 100644 --- a/samples/client/petstore/python/petstore_api/model/map_test.py +++ b/samples/client/petstore/python/petstore_api/model/map_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py index 32067148320e..01df80d9d62b 100644 --- a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/model200_response.py b/samples/client/petstore/python/petstore_api/model/model200_response.py index b379c6568557..46b155b65239 100644 --- a/samples/client/petstore/python/petstore_api/model/model200_response.py +++ b/samples/client/petstore/python/petstore_api/model/model200_response.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/model_return.py b/samples/client/petstore/python/petstore_api/model/model_return.py index d0dc8c4f3b03..377b3507a8b3 100644 --- a/samples/client/petstore/python/petstore_api/model/model_return.py +++ b/samples/client/petstore/python/petstore_api/model/model_return.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/name.py b/samples/client/petstore/python/petstore_api/model/name.py index 7a5b04393c22..1432e185ad6b 100644 --- a/samples/client/petstore/python/petstore_api/model/name.py +++ b/samples/client/petstore/python/petstore_api/model/name.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/number_only.py b/samples/client/petstore/python/petstore_api/model/number_only.py index 8dcbdcc5da08..d4892dbede5b 100644 --- a/samples/client/petstore/python/petstore_api/model/number_only.py +++ b/samples/client/petstore/python/petstore_api/model/number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/client/petstore/python/petstore_api/model/number_with_validations.py index 8c0feacf66a1..bcb3b4ebf710 100644 --- a/samples/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/client/petstore/python/petstore_api/model/number_with_validations.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py index 3a3ff40d101a..b1dc4bf82e2c 100644 --- a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/order.py b/samples/client/petstore/python/petstore_api/model/order.py index 8a809f913f15..b42f066848ab 100644 --- a/samples/client/petstore/python/petstore_api/model/order.py +++ b/samples/client/petstore/python/petstore_api/model/order.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/parent.py b/samples/client/petstore/python/petstore_api/model/parent.py index cd3954038776..a5e5d878d844 100644 --- a/samples/client/petstore/python/petstore_api/model/parent.py +++ b/samples/client/petstore/python/petstore_api/model/parent.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -178,11 +176,6 @@ class Parent(ModelComposed): } required_args = { } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/parent_all_of.py b/samples/client/petstore/python/petstore_api/model/parent_all_of.py index 9632eb273532..0d109f25a4c2 100644 --- a/samples/client/petstore/python/petstore_api/model/parent_all_of.py +++ b/samples/client/petstore/python/petstore_api/model/parent_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/parent_pet.py b/samples/client/petstore/python/petstore_api/model/parent_pet.py index 13fa1cca539e..aac0ff12e86b 100644 --- a/samples/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/client/petstore/python/petstore_api/model/parent_pet.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -189,11 +187,6 @@ class ParentPet(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/client/petstore/python/petstore_api/model/pet.py b/samples/client/petstore/python/petstore_api/model/pet.py index 0b2fb39cc330..e9f1e30a3196 100644 --- a/samples/client/petstore/python/petstore_api/model/pet.py +++ b/samples/client/petstore/python/petstore_api/model/pet.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/player.py b/samples/client/petstore/python/petstore_api/model/player.py index 5ab66972781c..6e4485fb6500 100644 --- a/samples/client/petstore/python/petstore_api/model/player.py +++ b/samples/client/petstore/python/petstore_api/model/player.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/read_only_first.py b/samples/client/petstore/python/petstore_api/model/read_only_first.py index a7d0beb82b2a..5c68eab91ea3 100644 --- a/samples/client/petstore/python/petstore_api/model/read_only_first.py +++ b/samples/client/petstore/python/petstore_api/model/read_only_first.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/special_model_name.py b/samples/client/petstore/python/petstore_api/model/special_model_name.py index 7082c993672d..823e77596636 100644 --- a/samples/client/petstore/python/petstore_api/model/special_model_name.py +++ b/samples/client/petstore/python/petstore_api/model/special_model_name.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/client/petstore/python/petstore_api/model/string_boolean_map.py index b3924d08e926..4ac526991839 100644 --- a/samples/client/petstore/python/petstore_api/model/string_boolean_map.py +++ b/samples/client/petstore/python/petstore_api/model/string_boolean_map.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/string_enum.py b/samples/client/petstore/python/petstore_api/model/string_enum.py index 9858680bf156..5a9eebe0a299 100644 --- a/samples/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/client/petstore/python/petstore_api/model/string_enum.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/tag.py b/samples/client/petstore/python/petstore_api/model/tag.py index 96c62d0493a4..d3dcb78b7ea0 100644 --- a/samples/client/petstore/python/petstore_api/model/tag.py +++ b/samples/client/petstore/python/petstore_api/model/tag.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_default.py b/samples/client/petstore/python/petstore_api/model/type_holder_default.py index 22e42abfc905..324b131f3a2d 100644 --- a/samples/client/petstore/python/petstore_api/model/type_holder_default.py +++ b/samples/client/petstore/python/petstore_api/model/type_holder_default.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_example.py b/samples/client/petstore/python/petstore_api/model/type_holder_example.py index 086b5575b55b..30bbba178f4f 100644 --- a/samples/client/petstore/python/petstore_api/model/type_holder_example.py +++ b/samples/client/petstore/python/petstore_api/model/type_holder_example.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/user.py b/samples/client/petstore/python/petstore_api/model/user.py index ce21097b128b..9a3cd0814114 100644 --- a/samples/client/petstore/python/petstore_api/model/user.py +++ b/samples/client/petstore/python/petstore_api/model/user.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/petstore_api/model/xml_item.py b/samples/client/petstore/python/petstore_api/model/xml_item.py index beda11141dd1..8401b3f40076 100644 --- a/samples/client/petstore/python/petstore_api/model/xml_item.py +++ b/samples/client/petstore/python/petstore_api/model/xml_item.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/client/petstore/python/requirements.txt b/samples/client/petstore/python/requirements.txt index 73a84334c8b6..96947f60408f 100644 --- a/samples/client/petstore/python/requirements.txt +++ b/samples/client/petstore/python/requirements.txt @@ -1,4 +1,3 @@ -nulltype python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index cf7f3ed9dc74..c484eec94f36 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -22,7 +22,6 @@ VERSION = "1.0.0" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", ] setup( diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/requirements.txt b/samples/openapi3/client/extensions/x-auth-id-alias/python/requirements.txt index 73a84334c8b6..96947f60408f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/requirements.txt +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/requirements.txt @@ -1,4 +1,3 @@ -nulltype python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/setup.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/setup.py index 767f9b15119d..1e118ab4a55f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/setup.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/setup.py @@ -22,7 +22,6 @@ VERSION = "1.0.0" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", ] setup( diff --git a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt b/samples/openapi3/client/features/dynamic-servers/python/requirements.txt index 73a84334c8b6..96947f60408f 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt +++ b/samples/openapi3/client/features/dynamic-servers/python/requirements.txt @@ -1,4 +1,3 @@ -nulltype python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 diff --git a/samples/openapi3/client/features/dynamic-servers/python/setup.py b/samples/openapi3/client/features/dynamic-servers/python/setup.py index 3fed9485fbe8..16802f144fe4 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/setup.py +++ b/samples/openapi3/client/features/dynamic-servers/python/setup.py @@ -22,7 +22,6 @@ VERSION = "1.0.0" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", ] setup( diff --git a/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md index c17117fe2c74..4fb32a02cf6d 100644 --- a/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md +++ b/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md @@ -4,8 +4,8 @@ this is a model that allows payloads of type object or number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**class_name** | **str** | | defaults to nulltype.Null **color** | **str** | | [optional] if omitted the server will use the default value of "red" +**class_name** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FruitReq.md b/samples/openapi3/client/petstore/python/docs/FruitReq.md index b192b0caeb42..edb522537ddd 100644 --- a/samples/openapi3/client/petstore/python/docs/FruitReq.md +++ b/samples/openapi3/client/petstore/python/docs/FruitReq.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cultivar** | **str** | | defaults to nulltype.Null -**length_cm** | **float** | | defaults to nulltype.Null **mealy** | **bool** | | [optional] **sweet** | **bool** | | [optional] +**cultivar** | **str** | | [optional] +**length_cm** | **float** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/NullableShape.md b/samples/openapi3/client/petstore/python/docs/NullableShape.md index 3ebce34d8f80..12ef6d7f743e 100644 --- a/samples/openapi3/client/petstore/python/docs/NullableShape.md +++ b/samples/openapi3/client/petstore/python/docs/NullableShape.md @@ -5,8 +5,8 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | -**quadrilateral_type** | **str** | | defaults to nulltype.Null -**triangle_type** | **str** | | defaults to nulltype.Null +**quadrilateral_type** | **str** | | [optional] +**triangle_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Quadrilateral.md b/samples/openapi3/client/petstore/python/docs/Quadrilateral.md index 20e5742c1348..58f91c19b66c 100644 --- a/samples/openapi3/client/petstore/python/docs/Quadrilateral.md +++ b/samples/openapi3/client/petstore/python/docs/Quadrilateral.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quadrilateral_type** | **str** | | -**shape_type** | **str** | | defaults to nulltype.Null +**shape_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Shape.md b/samples/openapi3/client/petstore/python/docs/Shape.md index 90138dc6d365..0c056f0d1daf 100644 --- a/samples/openapi3/client/petstore/python/docs/Shape.md +++ b/samples/openapi3/client/petstore/python/docs/Shape.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | -**quadrilateral_type** | **str** | | defaults to nulltype.Null -**triangle_type** | **str** | | defaults to nulltype.Null +**quadrilateral_type** | **str** | | [optional] +**triangle_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ShapeOrNull.md b/samples/openapi3/client/petstore/python/docs/ShapeOrNull.md index a82540d19eae..31510011fb54 100644 --- a/samples/openapi3/client/petstore/python/docs/ShapeOrNull.md +++ b/samples/openapi3/client/petstore/python/docs/ShapeOrNull.md @@ -5,8 +5,8 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema > Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | -**quadrilateral_type** | **str** | | defaults to nulltype.Null -**triangle_type** | **str** | | defaults to nulltype.Null +**quadrilateral_type** | **str** | | [optional] +**triangle_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Triangle.md b/samples/openapi3/client/petstore/python/docs/Triangle.md index 7c96d050bfe5..f86e2ede108c 100644 --- a/samples/openapi3/client/petstore/python/docs/Triangle.md +++ b/samples/openapi3/client/petstore/python/docs/Triangle.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **triangle_type** | **str** | | -**shape_type** | **str** | | defaults to nulltype.Null +**shape_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py index 4a050e5a99a6..3b526cd54e36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py index b91f53f05962..67d43acfe532 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.py b/samples/openapi3/client/petstore/python/petstore_api/model/address.py index c57beecd75db..b1504407903d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/address.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py index 9767120a13ea..a3d48b6ea975 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py index 97f342cef81d..a24e4f50d47b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py index 777474274058..01e2175b8004 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py index 90994daa61ca..29d34a1efe8b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py index d3c7c184548d..fb161cd4c0fc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py index f4d7c4b89011..008b74dd42a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py index 08445851d38e..96aa031a2d55 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py index de65fb7e4970..f2e080bc258e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py index b56cf1f70a86..ac42b07b93c9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py index 07280239a3be..513bd6bf06b1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py index 48b64b581951..472678bd20e0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py index 06f975d784c0..603f7761867c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py index 420c52730695..710c17e51a56 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py index 23263a605b05..1d62177c6c2e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -196,11 +194,6 @@ class Cat(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py index ec0267b9920a..50b046510dfa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.py b/samples/openapi3/client/petstore/python/petstore_api/model/category.py index 6d2c535a01b5..ed167471d356 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/category.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py index 63fa33c24c64..e1869c917cd8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -191,11 +189,6 @@ class ChildCat(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py index 4dd71659c336..f0f1a1ae6bd4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py index cc7c422a4bab..18c16f89f908 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.py b/samples/openapi3/client/petstore/python/petstore_api/model/client.py index 99149547dd64..da615c547731 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/client.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py index 606bc14209e5..56853f5f34f1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -189,11 +187,6 @@ class ComplexQuadrilateral(ModelComposed): 'shape_type': shape_type, 'quadrilateral_type': quadrilateral_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py index 12db5350b514..4a1129432f54 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -88,8 +86,8 @@ class ComposedOneOfNumberWithValidations(ModelComposed): """ lazy_import() return { - 'class_name': (str,), # noqa: E501 'color': (str,), # noqa: E501 + 'class_name': (str,), # noqa: E501 } @cached_property @@ -98,8 +96,8 @@ class ComposedOneOfNumberWithValidations(ModelComposed): attribute_map = { - 'class_name': 'className', # noqa: E501 'color': 'color', # noqa: E501 + 'class_name': 'className', # noqa: E501 } required_properties = set([ @@ -118,10 +116,7 @@ class ComposedOneOfNumberWithValidations(ModelComposed): def __init__(self, *args, **kwargs): # noqa: E501 """ComposedOneOfNumberWithValidations - a model defined in OpenAPI - Args: - Keyword Args: - class_name (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -153,9 +148,9 @@ class ComposedOneOfNumberWithValidations(ModelComposed): through its discriminator because we passed in _visited_composed_classes = (Animal,) color (str): [optional] if omitted the server will use the default value of "red" # noqa: E501 + class_name (str): [optional] # noqa: E501 """ - class_name = kwargs.get('class_name', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -187,13 +182,7 @@ class ComposedOneOfNumberWithValidations(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py index 396fd0abd088..5a6e424a4ec9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py index 871ffeda033e..8bf6d8fd3ade 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -194,11 +192,6 @@ class Dog(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py index 3e671f37e72a..b7b2e7db66d9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py index 6ce9b41ddc65..24d402c3a820 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py index cc00cdd47567..43ebac57de38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py index 8f305f80e506..fc4bf47f340a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py index f6062dd87bd0..c0284b371a93 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py index 77e4b899ffea..a536701d701e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -189,11 +187,6 @@ class EquilateralTriangle(ModelComposed): 'shape_type': shape_type, 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.py b/samples/openapi3/client/petstore/python/petstore_api/model/file.py index 207b8559fdef..a38cccacc6ab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py index a35b625ed24d..b8c519ed9c7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py index ca8fc8929602..ebbb09adf91e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py index c006fe8820af..b232da04b45e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py index 092f06d4d282..15ea987edf5d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -195,11 +193,6 @@ class Fruit(ModelComposed): } required_args = { } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py index 52bffc6136a6..13c4d6424a58 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -81,10 +79,10 @@ class FruitReq(ModelComposed): """ lazy_import() return { - 'cultivar': (str,), # noqa: E501 - 'length_cm': (float,), # noqa: E501 'mealy': (bool,), # noqa: E501 'sweet': (bool,), # noqa: E501 + 'cultivar': (str,), # noqa: E501 + 'length_cm': (float,), # noqa: E501 } @cached_property @@ -93,10 +91,10 @@ class FruitReq(ModelComposed): attribute_map = { - 'cultivar': 'cultivar', # noqa: E501 - 'length_cm': 'lengthCm', # noqa: E501 'mealy': 'mealy', # noqa: E501 'sweet': 'sweet', # noqa: E501 + 'cultivar': 'cultivar', # noqa: E501 + 'length_cm': 'lengthCm', # noqa: E501 } required_properties = set([ @@ -115,11 +113,7 @@ class FruitReq(ModelComposed): def __init__(self, *args, **kwargs): # noqa: E501 """FruitReq - a model defined in OpenAPI - Args: - Keyword Args: - cultivar (str): defaults to nulltype.Null # noqa: E501 - length_cm (float): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -152,10 +146,10 @@ class FruitReq(ModelComposed): _visited_composed_classes = (Animal,) mealy (bool): [optional] # noqa: E501 sweet (bool): [optional] # noqa: E501 + cultivar (str): [optional] # noqa: E501 + length_cm (float): [optional] # noqa: E501 """ - cultivar = kwargs.get('cultivar', nulltype.Null) - length_cm = kwargs.get('length_cm', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -187,14 +181,7 @@ class FruitReq(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'cultivar': cultivar, - 'length_cm': length_cm, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py index 560b6e2e4667..f3ad29beb4c4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -195,11 +193,6 @@ class GmFruit(ModelComposed): } required_args = { } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py index 06a57e645f11..f7c417562ece 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py index d2be9ac5add3..c94781ae2c46 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py index aa52c84a8f72..3c0cd37dfad9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object.py deleted file mode 100644 index f33ab975c17f..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object.py +++ /dev/null @@ -1,171 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'status': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'status': 'status', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """InlineObject - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Updated name of the pet. [optional] # noqa: E501 - status (str): Updated status of the pet. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object1.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object1.py deleted file mode 100644 index f3bb22fef0c8..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object1.py +++ /dev/null @@ -1,171 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject1(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'additional_metadata': (str,), # noqa: E501 - 'file': (file_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'additional_metadata': 'additionalMetadata', # noqa: E501 - 'file': 'file', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """InlineObject1 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - additional_metadata (str): Additional data to pass to server. [optional] # noqa: E501 - file (file_type): file to upload. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object2.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object2.py deleted file mode 100644 index e03938624140..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object2.py +++ /dev/null @@ -1,180 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject2(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('enum_form_string_array',): { - '>': ">", - '$': "$", - }, - ('enum_form_string',): { - '_ABC': "_abc", - '-EFG': "-efg", - '(XYZ)': "(xyz)", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'enum_form_string_array': ([str],), # noqa: E501 - 'enum_form_string': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'enum_form_string_array': 'enum_form_string_array', # noqa: E501 - 'enum_form_string': 'enum_form_string', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """InlineObject2 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - enum_form_string_array ([str]): Form parameter enum test (string array). [optional] # noqa: E501 - enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of "-efg" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object3.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object3.py deleted file mode 100644 index 743e3c41d868..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object3.py +++ /dev/null @@ -1,247 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject3(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('number',): { - 'inclusive_maximum': 543.2, - 'inclusive_minimum': 32.1, - }, - ('double',): { - 'inclusive_maximum': 123.4, - 'inclusive_minimum': 67.8, - }, - ('pattern_without_delimiter',): { - 'regex': { - 'pattern': r'^[A-Z].*', # noqa: E501 - }, - }, - ('integer',): { - 'inclusive_maximum': 100, - 'inclusive_minimum': 10, - }, - ('int32',): { - 'inclusive_maximum': 200, - 'inclusive_minimum': 20, - }, - ('float',): { - 'inclusive_maximum': 987.6, - }, - ('string',): { - 'regex': { - 'pattern': r'[a-z]', # noqa: E501 - 'flags': (re.IGNORECASE) - }, - }, - ('password',): { - 'max_length': 64, - 'min_length': 10, - }, - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (float,), # noqa: E501 - 'double': (float,), # noqa: E501 - 'pattern_without_delimiter': (str,), # noqa: E501 - 'byte': (str,), # noqa: E501 - 'integer': (int,), # noqa: E501 - 'int32': (int,), # noqa: E501 - 'int64': (int,), # noqa: E501 - 'float': (float,), # noqa: E501 - 'string': (str,), # noqa: E501 - 'binary': (file_type,), # noqa: E501 - 'date': (date,), # noqa: E501 - 'date_time': (datetime,), # noqa: E501 - 'password': (str,), # noqa: E501 - 'callback': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'double': 'double', # noqa: E501 - 'pattern_without_delimiter': 'pattern_without_delimiter', # noqa: E501 - 'byte': 'byte', # noqa: E501 - 'integer': 'integer', # noqa: E501 - 'int32': 'int32', # noqa: E501 - 'int64': 'int64', # noqa: E501 - 'float': 'float', # noqa: E501 - 'string': 'string', # noqa: E501 - 'binary': 'binary', # noqa: E501 - 'date': 'date', # noqa: E501 - 'date_time': 'dateTime', # noqa: E501 - 'password': 'password', # noqa: E501 - 'callback': 'callback', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, number, double, pattern_without_delimiter, byte, *args, **kwargs): # noqa: E501 - """InlineObject3 - a model defined in OpenAPI - - Args: - number (float): None - double (float): None - pattern_without_delimiter (str): None - byte (str): None - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - integer (int): None. [optional] # noqa: E501 - int32 (int): None. [optional] # noqa: E501 - int64 (int): None. [optional] # noqa: E501 - float (float): None. [optional] # noqa: E501 - string (str): None. [optional] # noqa: E501 - binary (file_type): None. [optional] # noqa: E501 - date (date): None. [optional] # noqa: E501 - date_time (datetime): None. [optional] if omitted the server will use the default value of dateutil_parser('2010-02-01T10:20:10.11111+01:00') # noqa: E501 - password (str): None. [optional] # noqa: E501 - callback (str): None. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - self.double = double - self.pattern_without_delimiter = pattern_without_delimiter - self.byte = byte - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object4.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object4.py deleted file mode 100644 index 9a1f88d6b60e..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object4.py +++ /dev/null @@ -1,175 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject4(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'param': (str,), # noqa: E501 - 'param2': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'param': 'param', # noqa: E501 - 'param2': 'param2', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, param, param2, *args, **kwargs): # noqa: E501 - """InlineObject4 - a model defined in OpenAPI - - Args: - param (str): field1 - param2 (str): field2 - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.param = param - self.param2 = param2 - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object5.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object5.py deleted file mode 100644 index 33ce7f69ac73..000000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object5.py +++ /dev/null @@ -1,174 +0,0 @@ -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -import nulltype # noqa: F401 - -from petstore_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class InlineObject5(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'required_file': (file_type,), # noqa: E501 - 'additional_metadata': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'required_file': 'requiredFile', # noqa: E501 - 'additional_metadata': 'additionalMetadata', # noqa: E501 - } - - _composed_schemas = {} - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, required_file, *args, **kwargs): # noqa: E501 - """InlineObject5 - a model defined in OpenAPI - - Args: - required_file (file_type): file to upload - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - additional_metadata (str): Additional data to pass to server. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.required_file = required_file - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py index dc5f3e8ede57..8e814cf43838 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py index d1ef6e1cc134..9afeb9c57482 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py index 2f39a2edd957..6c0b56a709a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py index 7799dbb308ad..1c69f9a95b28 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py index d99c4d992adf..27197f5a235b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -182,11 +180,6 @@ class IsoscelesTriangle(ModelComposed): 'shape_type': shape_type, 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/list.py b/samples/openapi3/client/petstore/python/petstore_api/model/list.py index d04df031cfa2..09c762d6a794 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/list.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/list.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py index c52aeb08c527..067adf793505 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -208,11 +206,6 @@ class Mammal(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py index 93e19b2f2440..169fb9d88ee0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py index 32067148320e..01df80d9d62b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py index b379c6568557..46b155b65239 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py index d0dc8c4f3b03..377b3507a8b3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.py b/samples/openapi3/client/petstore/python/petstore_api/model/name.py index 7a5b04393c22..1432e185ad6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/name.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py index 3088bde07ac0..a117dfa69160 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py index b5faceb6cf45..fcd20ddfbc19 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -130,8 +128,6 @@ class NullableShape(ModelComposed): shape_type (str): Keyword Args: - quadrilateral_type (str): defaults to nulltype.Null # noqa: E501 - triangle_type (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -162,10 +158,10 @@ class NullableShape(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + quadrilateral_type (str): [optional] # noqa: E501 + triangle_type (str): [optional] # noqa: E501 """ - quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) - triangle_type = kwargs.get('triangle_type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -198,14 +194,7 @@ class NullableShape(ModelComposed): } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py index 8dcbdcc5da08..d4892dbede5b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py index 1c472771d828..37f250d313b6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py index 0fb822bcecd8..7ba55b76eb24 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py index 3a3ff40d101a..b1dc4bf82e2c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py index cab724bf6383..e03392b1154a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.py b/samples/openapi3/client/petstore/python/petstore_api/model/order.py index 8a809f913f15..b42f066848ab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/order.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py index 8f2eb897af85..16099236da34 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -190,11 +188,6 @@ class ParentPet(ModelComposed): required_args = { 'pet_type': pet_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py index 0b2fb39cc330..e9f1e30a3196 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py index 805e7028120d..4a6f200f6ffc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -191,11 +189,6 @@ class Pig(ModelComposed): required_args = { 'class_name': class_name, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py index 855e913d944c..4e28ac0d2389 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -88,8 +86,8 @@ class Quadrilateral(ModelComposed): """ lazy_import() return { - 'shape_type': (str,), # noqa: E501 'quadrilateral_type': (str,), # noqa: E501 + 'shape_type': (str,), # noqa: E501 } @cached_property @@ -104,8 +102,8 @@ class Quadrilateral(ModelComposed): return {'quadrilateral_type': val} attribute_map = { - 'shape_type': 'shapeType', # noqa: E501 'quadrilateral_type': 'quadrilateralType', # noqa: E501 + 'shape_type': 'shapeType', # noqa: E501 } required_properties = set([ @@ -128,7 +126,6 @@ class Quadrilateral(ModelComposed): quadrilateral_type (str): Keyword Args: - shape_type (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -159,9 +156,9 @@ class Quadrilateral(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + shape_type (str): [optional] # noqa: E501 """ - shape_type = kwargs.get('shape_type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -193,14 +190,8 @@ class Quadrilateral(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'shape_type': shape_type, 'quadrilateral_type': quadrilateral_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py index 609bb010406f..124d9128bc53 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py index a7d0beb82b2a..5c68eab91ea3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py index 51efcef286f6..1e3893627dad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -189,11 +187,6 @@ class ScaleneTriangle(ModelComposed): 'shape_type': shape_type, 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py index 7ced690319f5..f5e3c142b914 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -130,8 +128,6 @@ class Shape(ModelComposed): shape_type (str): Keyword Args: - quadrilateral_type (str): defaults to nulltype.Null # noqa: E501 - triangle_type (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -162,10 +158,10 @@ class Shape(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + quadrilateral_type (str): [optional] # noqa: E501 + triangle_type (str): [optional] # noqa: E501 """ - quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) - triangle_type = kwargs.get('triangle_type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -198,14 +194,7 @@ class Shape(ModelComposed): } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py index 19bb1ffc560a..8a3c52088be3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py index 734de65c8ffa..480fa5bd5d65 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -130,8 +128,6 @@ class ShapeOrNull(ModelComposed): shape_type (str): Keyword Args: - quadrilateral_type (str): defaults to nulltype.Null # noqa: E501 - triangle_type (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -162,10 +158,10 @@ class ShapeOrNull(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + quadrilateral_type (str): [optional] # noqa: E501 + triangle_type (str): [optional] # noqa: E501 """ - quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) - triangle_type = kwargs.get('triangle_type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -198,14 +194,7 @@ class ShapeOrNull(ModelComposed): } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py index 008e9a826ad7..f2f0a61acbd2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -189,11 +187,6 @@ class SimpleQuadrilateral(ModelComposed): 'shape_type': shape_type, 'quadrilateral_type': quadrilateral_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py index c8cefaa4115a..683d1794293c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -177,11 +175,6 @@ class SomeObject(ModelComposed): } required_args = { } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py index 7082c993672d..823e77596636 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py index b3924d08e926..4ac526991839 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py index 03c272795eba..0fc396edc518 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py index 43eca3418d89..fcfba2a61a7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py index b202799b2b8b..e5fc749d5149 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py index 39b4ac9695a6..83d6e52e8867 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, @@ -90,8 +88,8 @@ class Triangle(ModelComposed): """ lazy_import() return { - 'shape_type': (str,), # noqa: E501 'triangle_type': (str,), # noqa: E501 + 'shape_type': (str,), # noqa: E501 } @cached_property @@ -107,8 +105,8 @@ class Triangle(ModelComposed): return {'triangle_type': val} attribute_map = { - 'shape_type': 'shapeType', # noqa: E501 'triangle_type': 'triangleType', # noqa: E501 + 'shape_type': 'shapeType', # noqa: E501 } required_properties = set([ @@ -131,7 +129,6 @@ class Triangle(ModelComposed): triangle_type (str): Keyword Args: - shape_type (str): defaults to nulltype.Null # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -162,9 +159,9 @@ class Triangle(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + shape_type (str): [optional] # noqa: E501 """ - shape_type = kwargs.get('shape_type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -196,14 +193,8 @@ class Triangle(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'shape_type': shape_type, 'triangle_type': triangle_type, } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] model_args = {} model_args.update(required_args) model_args.update(kwargs) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py index 9ae22c8c9ccc..c54bd0811720 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.py b/samples/openapi3/client/petstore/python/petstore_api/model/user.py index 53a89d5b4e39..7613ac7dc263 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/user.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py index a55b04e489f4..e6400ea34fc7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py index f9f1bfc3c7cd..bf5bbbefa9ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py @@ -11,8 +11,6 @@ import re # noqa: F401 import sys # noqa: F401 -import nulltype # noqa: F401 - from petstore_api.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt index 73a84334c8b6..96947f60408f 100644 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ b/samples/openapi3/client/petstore/python/requirements.txt @@ -1,4 +1,3 @@ -nulltype python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py index a769cacd50a1..0fdf98480629 100644 --- a/samples/openapi3/client/petstore/python/setup.py +++ b/samples/openapi3/client/petstore/python/setup.py @@ -22,7 +22,6 @@ VERSION = "1.0.0" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", "pem>=19.3.0", "pycryptodome>=3.9.0", ] diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object.py b/samples/openapi3/client/petstore/python/test/test_inline_object.py deleted file mode 100644 index 3e391022d516..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object import InlineObject - - -class TestInlineObject(unittest.TestCase): - """InlineObject unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject(self): - """Test InlineObject""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object1.py b/samples/openapi3/client/petstore/python/test/test_inline_object1.py deleted file mode 100644 index 982e20e0c6f4..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object1.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object1 import InlineObject1 - - -class TestInlineObject1(unittest.TestCase): - """InlineObject1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject1(self): - """Test InlineObject1""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object2.py b/samples/openapi3/client/petstore/python/test/test_inline_object2.py deleted file mode 100644 index 133e31acb200..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object2.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object2 import InlineObject2 - - -class TestInlineObject2(unittest.TestCase): - """InlineObject2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject2(self): - """Test InlineObject2""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject2() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object3.py b/samples/openapi3/client/petstore/python/test/test_inline_object3.py deleted file mode 100644 index 69bf17c56c2d..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object3 import InlineObject3 - - -class TestInlineObject3(unittest.TestCase): - """InlineObject3 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject3(self): - """Test InlineObject3""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject3() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object4.py b/samples/openapi3/client/petstore/python/test/test_inline_object4.py deleted file mode 100644 index 727596be5e5d..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object4.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object4 import InlineObject4 - - -class TestInlineObject4(unittest.TestCase): - """InlineObject4 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject4(self): - """Test InlineObject4""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject4() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object5.py b/samples/openapi3/client/petstore/python/test/test_inline_object5.py deleted file mode 100644 index 1ef579b8e307..000000000000 --- a/samples/openapi3/client/petstore/python/test/test_inline_object5.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.inline_object5 import InlineObject5 - - -class TestInlineObject5(unittest.TestCase): - """InlineObject5 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineObject5(self): - """Test InlineObject5""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineObject5() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main()