From 9b7fa456c9d81a97b0fa79ce3e787d20c3b31a1a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 27 Jan 2021 09:30:05 -0800 Subject: [PATCH 1/3] Removes nulltype from python, updates samples --- .../languages/PythonClientCodegen.java | 54 ------------------- .../method_init_composed.mustache | 5 -- .../petstore/python/petstore_api/model/cat.py | 5 -- .../python/petstore_api/model/child.py | 5 -- .../python/petstore_api/model/child_cat.py | 5 -- .../python/petstore_api/model/child_dog.py | 5 -- .../python/petstore_api/model/child_lizard.py | 5 -- .../petstore/python/petstore_api/model/dog.py | 5 -- .../python/petstore_api/model/parent.py | 5 -- .../python/petstore_api/model/parent_pet.py | 5 -- .../ComposedOneOfNumberWithValidations.md | 2 +- .../client/petstore/python/docs/FruitReq.md | 4 +- .../petstore/python/docs/NullableShape.md | 4 +- .../petstore/python/docs/Quadrilateral.md | 2 +- .../client/petstore/python/docs/Shape.md | 4 +- .../petstore/python/docs/ShapeOrNull.md | 4 +- .../client/petstore/python/docs/Triangle.md | 2 +- .../petstore/python/petstore_api/model/cat.py | 5 -- .../python/petstore_api/model/child_cat.py | 5 -- .../model/complex_quadrilateral.py | 5 -- ...composed_one_of_number_with_validations.py | 10 +--- .../petstore/python/petstore_api/model/dog.py | 5 -- .../model/equilateral_triangle.py | 5 -- .../python/petstore_api/model/fruit.py | 5 -- .../python/petstore_api/model/fruit_req.py | 13 ++--- .../python/petstore_api/model/gm_fruit.py | 5 -- .../petstore_api/model/isosceles_triangle.py | 5 -- .../python/petstore_api/model/mammal.py | 5 -- .../petstore_api/model/nullable_shape.py | 13 ++--- .../python/petstore_api/model/parent_pet.py | 5 -- .../petstore/python/petstore_api/model/pig.py | 5 -- .../petstore_api/model/quadrilateral.py | 10 +--- .../petstore_api/model/scalene_triangle.py | 5 -- .../python/petstore_api/model/shape.py | 13 ++--- .../petstore_api/model/shape_or_null.py | 13 ++--- .../model/simple_quadrilateral.py | 5 -- .../python/petstore_api/model/some_object.py | 5 -- .../python/petstore_api/model/triangle.py | 10 +--- 38 files changed, 29 insertions(+), 244 deletions(-) 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..3b63cf31238e 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,57 +566,6 @@ public void postProcessParameter(CodegenParameter p) { } } - private void addNullDefaultToOneOfAnyOfReqProps(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 - ComposedSchema cs = (ComposedSchema) schema; - - // these are the properties that are from properties in self cs or cs allOf - Map selfProperties = new LinkedHashMap(); - List selfRequired = new ArrayList(); - - // these are the properties that are from properties in cs oneOf or cs anyOf - Map otherProperties = new LinkedHashMap(); - List otherRequired = new ArrayList(); - - List oneOfanyOfSchemas = new ArrayList<>(); - List oneOf = cs.getOneOf(); - if (oneOf != null) { - oneOfanyOfSchemas.addAll(oneOf); - } - List anyOf = cs.getAnyOf(); - if (anyOf != null) { - oneOfanyOfSchemas.addAll(anyOf); - } - for (Schema sc : oneOfanyOfSchemas) { - Schema refSchema = ModelUtils.getReferencedSchema(this.openAPI, sc); - addProperties(otherProperties, otherRequired, refSchema); - } - Set otherRequiredSet = new HashSet(otherRequired); - - List allOf = cs.getAllOf(); - if ((schema.getProperties() != null && !schema.getProperties().isEmpty()) || allOf != null) { - // NOTE: this function also adds the allOf propesrties inside schema - addProperties(selfProperties, selfRequired, schema); - } - if (result.discriminator != null) { - selfRequired.add(result.discriminator.getPropertyBaseName()); - } - Set selfRequiredSet = new HashSet(selfRequired); - - List reqVars = result.getRequiredVars(); - 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"); - } - } - } - } - /** * Sets the value of the 'model.parent' property in CodegenModel * We have a custom version of this function so we can add the dataType on the ArrayModel @@ -642,9 +591,6 @@ protected void addParentContainer(CodegenModel model, String name, Schema schema @Override 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); - } ArrayList> listOfLists = new ArrayList>(); listOfLists.add(cm.requiredVars); listOfLists.add(cm.optionalVars); 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/samples/client/petstore/python/petstore_api/model/cat.py b/samples/client/petstore/python/petstore_api/model/cat.py index b0d7c95485d3..36431be460b5 100644 --- a/samples/client/petstore/python/petstore_api/model/cat.py +++ b/samples/client/petstore/python/petstore_api/model/cat.py @@ -187,11 +187,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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/child.py b/samples/client/petstore/python/petstore_api/model/child.py index fa5786f43131..3fe0048d0d7c 100644 --- a/samples/client/petstore/python/petstore_api/model/child.py +++ b/samples/client/petstore/python/petstore_api/model/child.py @@ -181,11 +181,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 } 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_cat.py b/samples/client/petstore/python/petstore_api/model/child_cat.py index f81aa9be219b..76ba7d56aab5 100644 --- a/samples/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/client/petstore/python/petstore_api/model/child_cat.py @@ -184,11 +184,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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.py b/samples/client/petstore/python/petstore_api/model/child_dog.py index 5498dbdde817..150d1cf1b96d 100644 --- a/samples/client/petstore/python/petstore_api/model/child_dog.py +++ b/samples/client/petstore/python/petstore_api/model/child_dog.py @@ -184,11 +184,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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.py b/samples/client/petstore/python/petstore_api/model/child_lizard.py index cc18799365ed..3bc0002f1be8 100644 --- a/samples/client/petstore/python/petstore_api/model/child_lizard.py +++ b/samples/client/petstore/python/petstore_api/model/child_lizard.py @@ -184,11 +184,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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/dog.py b/samples/client/petstore/python/petstore_api/model/dog.py index 4cbbfba41ec7..6f342172544e 100644 --- a/samples/client/petstore/python/petstore_api/model/dog.py +++ b/samples/client/petstore/python/petstore_api/model/dog.py @@ -187,11 +187,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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/parent.py b/samples/client/petstore/python/petstore_api/model/parent.py index cd3954038776..efd7a2ff75ed 100644 --- a/samples/client/petstore/python/petstore_api/model/parent.py +++ b/samples/client/petstore/python/petstore_api/model/parent.py @@ -178,11 +178,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 } 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_pet.py b/samples/client/petstore/python/petstore_api/model/parent_pet.py index 13fa1cca539e..b884c204abd4 100644 --- a/samples/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/client/petstore/python/petstore_api/model/parent_pet.py @@ -189,11 +189,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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/docs/ComposedOneOfNumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md index c17117fe2c74..e10799f4bb79 100644 --- a/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md +++ b/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md @@ -4,7 +4,7 @@ this is a model that allows payloads of type object or number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**class_name** | **str** | | defaults to nulltype.Null +**class_name** | **str** | | **color** | **str** | | [optional] if omitted the server will use the default value of "red" **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/samples/openapi3/client/petstore/python/docs/FruitReq.md b/samples/openapi3/client/petstore/python/docs/FruitReq.md index b192b0caeb42..1e36ae66077b 100644 --- a/samples/openapi3/client/petstore/python/docs/FruitReq.md +++ b/samples/openapi3/client/petstore/python/docs/FruitReq.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cultivar** | **str** | | defaults to nulltype.Null -**length_cm** | **float** | | defaults to nulltype.Null +**cultivar** | **str** | | +**length_cm** | **float** | | **mealy** | **bool** | | [optional] **sweet** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/python/docs/NullableShape.md b/samples/openapi3/client/petstore/python/docs/NullableShape.md index 3ebce34d8f80..6412fa900666 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** | | +**triangle_type** | **str** | | **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..d5d38f607e85 100644 --- a/samples/openapi3/client/petstore/python/docs/Quadrilateral.md +++ b/samples/openapi3/client/petstore/python/docs/Quadrilateral.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**shape_type** | **str** | | **quadrilateral_type** | **str** | | -**shape_type** | **str** | | defaults to nulltype.Null **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..a3592a1272ac 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** | | +**triangle_type** | **str** | | **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..ac0ae87068cd 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** | | +**triangle_type** | **str** | | **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..84bd75599bda 100644 --- a/samples/openapi3/client/petstore/python/docs/Triangle.md +++ b/samples/openapi3/client/petstore/python/docs/Triangle.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**shape_type** | **str** | | **triangle_type** | **str** | | -**shape_type** | **str** | | defaults to nulltype.Null **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/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py index 23263a605b05..e78a00b91e7e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py @@ -196,11 +196,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py index 63fa33c24c64..28ff0dc2170b 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 @@ -191,11 +191,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py index 606bc14209e5..a629bba2ed7f 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 @@ -189,11 +189,6 @@ def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E5 '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..5e8bb76f04a5 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 @@ -115,13 +115,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """ComposedOneOfNumberWithValidations - a model defined in OpenAPI Args: + class_name (str): 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. @@ -155,7 +155,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 color (str): [optional] if omitted the server will use the default value of "red" # 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', ()) @@ -189,11 +188,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 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.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py index 871ffeda033e..4dc2325e3a21 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py @@ -194,11 +194,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py index 77e4b899ffea..1baefdfe85b8 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 @@ -189,11 +189,6 @@ def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 '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/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py index 092f06d4d282..5010f6598634 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py @@ -195,11 +195,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 } 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..a96e07de5630 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 @@ -112,14 +112,14 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, cultivar, length_cm, *args, **kwargs): # noqa: E501 """FruitReq - a model defined in OpenAPI Args: + cultivar (str): + length_cm (float): 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. @@ -154,8 +154,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 sweet (bool): [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', ()) @@ -190,11 +188,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 '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..ec75c28b4ad5 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 @@ -195,11 +195,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 } 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/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py index d99c4d992adf..da9c1bb5d969 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 @@ -182,11 +182,6 @@ def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 '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/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py index c52aeb08c527..4f81c103e734 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py @@ -208,11 +208,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py index b5faceb6cf45..7235af203267 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 @@ -123,15 +123,15 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 """NullableShape - a model defined in OpenAPI Args: shape_type (str): + quadrilateral_type (str): + triangle_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. @@ -164,8 +164,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - 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', ()) @@ -201,11 +199,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 '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/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py index 8f2eb897af85..514d0ad86404 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 @@ -190,11 +190,6 @@ def __init__(self, pet_type, *args, **kwargs): # noqa: E501 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/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py index 805e7028120d..bcdccecfcaf0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py @@ -191,11 +191,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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..2d31acfb6534 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py @@ -121,14 +121,14 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 """Quadrilateral - a model defined in OpenAPI Args: + shape_type (str): 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. @@ -161,7 +161,6 @@ def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - 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,11 +195,6 @@ def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 '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/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py index 51efcef286f6..f2d382877cfb 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 @@ -189,11 +189,6 @@ def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 '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..f6b16a934824 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py @@ -123,15 +123,15 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 """Shape - a model defined in OpenAPI Args: shape_type (str): + quadrilateral_type (str): + triangle_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. @@ -164,8 +164,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - 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', ()) @@ -201,11 +199,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 '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_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py index 734de65c8ffa..48ecd4f1a158 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 @@ -123,15 +123,15 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 """ShapeOrNull - a model defined in OpenAPI Args: shape_type (str): + quadrilateral_type (str): + triangle_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. @@ -164,8 +164,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - 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', ()) @@ -201,11 +199,6 @@ def __init__(self, shape_type, *args, **kwargs): # noqa: E501 '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..172699f7db98 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 @@ -189,11 +189,6 @@ def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E5 '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..c78c0db7d91d 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 @@ -177,11 +177,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 } 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/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py index 39b4ac9695a6..683dc3b7fe81 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py @@ -124,14 +124,14 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """Triangle - a model defined in OpenAPI Args: + shape_type (str): 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. @@ -164,7 +164,6 @@ def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - 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', ()) @@ -199,11 +198,6 @@ def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 '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) From 3a92f640c722e92b32d9fa5400f524128c0a442e Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 27 Jan 2021 09:34:38 -0800 Subject: [PATCH 2/3] Removes nulltype from the python requirements --- .../src/main/resources/python/requirements.mustache | 1 - .../openapi-generator/src/main/resources/python/setup.mustache | 1 - samples/client/petstore/python/requirements.txt | 1 - samples/client/petstore/python/setup.py | 1 - .../client/extensions/x-auth-id-alias/python/requirements.txt | 1 - .../openapi3/client/extensions/x-auth-id-alias/python/setup.py | 1 - .../client/features/dynamic-servers/python/requirements.txt | 1 - samples/openapi3/client/features/dynamic-servers/python/setup.py | 1 - samples/openapi3/client/petstore/python/requirements.txt | 1 - samples/openapi3/client/petstore/python/setup.py | 1 - 10 files changed, 10 deletions(-) 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/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 @@ 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 @@ 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 @@ REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", ] setup( 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 @@ REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "nulltype", "pem>=19.3.0", "pycryptodome>=3.9.0", ] From bca18be553c4e56ce6ae1f002a6adce1722874e4 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 27 Jan 2021 10:29:03 -0800 Subject: [PATCH 3/3] Removes nulltype import in models, moves requiredVars to optionalVars when approprieate --- .../languages/PythonClientCodegen.java | 63 +++++ .../src/main/resources/python/model.mustache | 2 - .../model/additional_properties_any_type.py | 2 - .../model/additional_properties_array.py | 2 - .../model/additional_properties_boolean.py | 2 - .../model/additional_properties_class.py | 2 - .../model/additional_properties_integer.py | 2 - .../model/additional_properties_number.py | 2 - .../model/additional_properties_object.py | 2 - .../model/additional_properties_string.py | 2 - .../python/petstore_api/model/animal.py | 2 - .../python/petstore_api/model/animal_farm.py | 2 - .../python/petstore_api/model/api_response.py | 2 - .../model/array_of_array_of_number_only.py | 2 - .../model/array_of_number_only.py | 2 - .../python/petstore_api/model/array_test.py | 2 - .../petstore_api/model/capitalization.py | 2 - .../petstore/python/petstore_api/model/cat.py | 2 - .../python/petstore_api/model/cat_all_of.py | 2 - .../python/petstore_api/model/category.py | 2 - .../python/petstore_api/model/child.py | 2 - .../python/petstore_api/model/child_all_of.py | 2 - .../python/petstore_api/model/child_cat.py | 2 - .../petstore_api/model/child_cat_all_of.py | 2 - .../python/petstore_api/model/child_dog.py | 2 - .../petstore_api/model/child_dog_all_of.py | 2 - .../python/petstore_api/model/child_lizard.py | 2 - .../petstore_api/model/child_lizard_all_of.py | 2 - .../python/petstore_api/model/class_model.py | 2 - .../python/petstore_api/model/client.py | 2 - .../petstore/python/petstore_api/model/dog.py | 2 - .../python/petstore_api/model/dog_all_of.py | 2 - .../python/petstore_api/model/enum_arrays.py | 2 - .../python/petstore_api/model/enum_class.py | 2 - .../python/petstore_api/model/enum_test.py | 2 - .../python/petstore_api/model/file.py | 2 - .../model/file_schema_test_class.py | 2 - .../python/petstore_api/model/format_test.py | 2 - .../python/petstore_api/model/grandparent.py | 2 - .../petstore_api/model/grandparent_animal.py | 2 - .../petstore_api/model/has_only_read_only.py | 2 - .../python/petstore_api/model/list.py | 2 - .../python/petstore_api/model/map_test.py | 2 - ...perties_and_additional_properties_class.py | 2 - .../petstore_api/model/model200_response.py | 2 - .../python/petstore_api/model/model_return.py | 2 - .../python/petstore_api/model/name.py | 2 - .../python/petstore_api/model/number_only.py | 2 - .../model/number_with_validations.py | 2 - .../model/object_model_with_ref_props.py | 2 - .../python/petstore_api/model/order.py | 2 - .../python/petstore_api/model/parent.py | 2 - .../petstore_api/model/parent_all_of.py | 2 - .../python/petstore_api/model/parent_pet.py | 2 - .../petstore/python/petstore_api/model/pet.py | 2 - .../python/petstore_api/model/player.py | 2 - .../petstore_api/model/read_only_first.py | 2 - .../petstore_api/model/special_model_name.py | 2 - .../petstore_api/model/string_boolean_map.py | 2 - .../python/petstore_api/model/string_enum.py | 2 - .../petstore/python/petstore_api/model/tag.py | 2 - .../petstore_api/model/type_holder_default.py | 2 - .../petstore_api/model/type_holder_example.py | 2 - .../python/petstore_api/model/user.py | 2 - .../python/petstore_api/model/xml_item.py | 2 - .../ComposedOneOfNumberWithValidations.md | 2 +- .../client/petstore/python/docs/FruitReq.md | 4 +- .../petstore/python/docs/NullableShape.md | 4 +- .../petstore/python/docs/Quadrilateral.md | 2 +- .../client/petstore/python/docs/Shape.md | 4 +- .../petstore/python/docs/ShapeOrNull.md | 4 +- .../client/petstore/python/docs/Triangle.md | 2 +- .../model/additional_properties_class.py | 2 - ...ditional_properties_with_array_of_enums.py | 2 - .../python/petstore_api/model/address.py | 2 - .../python/petstore_api/model/animal.py | 2 - .../python/petstore_api/model/animal_farm.py | 2 - .../python/petstore_api/model/api_response.py | 2 - .../python/petstore_api/model/apple.py | 2 - .../python/petstore_api/model/apple_req.py | 2 - .../model/array_of_array_of_number_only.py | 2 - .../petstore_api/model/array_of_enums.py | 2 - .../model/array_of_number_only.py | 2 - .../python/petstore_api/model/array_test.py | 2 - .../python/petstore_api/model/banana.py | 2 - .../python/petstore_api/model/banana_req.py | 2 - .../python/petstore_api/model/basque_pig.py | 2 - .../petstore_api/model/capitalization.py | 2 - .../petstore/python/petstore_api/model/cat.py | 2 - .../python/petstore_api/model/cat_all_of.py | 2 - .../python/petstore_api/model/category.py | 2 - .../python/petstore_api/model/child_cat.py | 2 - .../petstore_api/model/child_cat_all_of.py | 2 - .../python/petstore_api/model/class_model.py | 2 - .../python/petstore_api/model/client.py | 2 - .../model/complex_quadrilateral.py | 2 - ...composed_one_of_number_with_validations.py | 13 +- .../python/petstore_api/model/danish_pig.py | 2 - .../petstore/python/petstore_api/model/dog.py | 2 - .../python/petstore_api/model/dog_all_of.py | 2 - .../python/petstore_api/model/drawing.py | 2 - .../python/petstore_api/model/enum_arrays.py | 2 - .../python/petstore_api/model/enum_class.py | 2 - .../python/petstore_api/model/enum_test.py | 2 - .../model/equilateral_triangle.py | 2 - .../python/petstore_api/model/file.py | 2 - .../model/file_schema_test_class.py | 2 - .../petstore/python/petstore_api/model/foo.py | 2 - .../python/petstore_api/model/format_test.py | 2 - .../python/petstore_api/model/fruit.py | 2 - .../python/petstore_api/model/fruit_req.py | 20 +- .../python/petstore_api/model/gm_fruit.py | 2 - .../petstore_api/model/grandparent_animal.py | 2 - .../petstore_api/model/has_only_read_only.py | 2 - .../petstore_api/model/health_check_result.py | 2 - .../petstore_api/model/inline_object.py | 171 ------------ .../petstore_api/model/inline_object1.py | 171 ------------ .../petstore_api/model/inline_object2.py | 180 ------------- .../petstore_api/model/inline_object3.py | 247 ------------------ .../petstore_api/model/inline_object4.py | 175 ------------- .../petstore_api/model/inline_object5.py | 174 ------------ .../model/inline_response_default.py | 2 - .../python/petstore_api/model/integer_enum.py | 2 - .../model/integer_enum_one_value.py | 2 - .../model/integer_enum_with_default_value.py | 2 - .../petstore_api/model/isosceles_triangle.py | 2 - .../python/petstore_api/model/list.py | 2 - .../python/petstore_api/model/mammal.py | 2 - .../python/petstore_api/model/map_test.py | 2 - ...perties_and_additional_properties_class.py | 2 - .../petstore_api/model/model200_response.py | 2 - .../python/petstore_api/model/model_return.py | 2 - .../python/petstore_api/model/name.py | 2 - .../petstore_api/model/nullable_class.py | 2 - .../petstore_api/model/nullable_shape.py | 10 +- .../python/petstore_api/model/number_only.py | 2 - .../model/number_with_validations.py | 2 - .../petstore_api/model/object_interface.py | 2 - .../model/object_model_with_ref_props.py | 2 - .../model/object_with_validations.py | 2 - .../python/petstore_api/model/order.py | 2 - .../python/petstore_api/model/parent_pet.py | 2 - .../petstore/python/petstore_api/model/pet.py | 2 - .../petstore/python/petstore_api/model/pig.py | 2 - .../petstore_api/model/quadrilateral.py | 11 +- .../model/quadrilateral_interface.py | 2 - .../petstore_api/model/read_only_first.py | 2 - .../petstore_api/model/scalene_triangle.py | 2 - .../python/petstore_api/model/shape.py | 10 +- .../petstore_api/model/shape_interface.py | 2 - .../petstore_api/model/shape_or_null.py | 10 +- .../model/simple_quadrilateral.py | 2 - .../python/petstore_api/model/some_object.py | 2 - .../petstore_api/model/special_model_name.py | 2 - .../petstore_api/model/string_boolean_map.py | 2 - .../python/petstore_api/model/string_enum.py | 2 - .../model/string_enum_with_default_value.py | 2 - .../petstore/python/petstore_api/model/tag.py | 2 - .../python/petstore_api/model/triangle.py | 11 +- .../petstore_api/model/triangle_interface.py | 2 - .../python/petstore_api/model/user.py | 2 - .../python/petstore_api/model/whale.py | 2 - .../python/petstore_api/model/zebra.py | 2 - .../python/test/test_inline_object.py | 37 --- .../python/test/test_inline_object1.py | 37 --- .../python/test/test_inline_object2.py | 37 --- .../python/test/test_inline_object3.py | 37 --- .../python/test/test_inline_object4.py | 37 --- .../python/test/test_inline_object5.py | 37 --- 169 files changed, 102 insertions(+), 1692 deletions(-) delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object1.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object2.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object3.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object4.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/inline_object5.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object1.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object2.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object3.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object4.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_inline_object5.py 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 3b63cf31238e..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,6 +566,66 @@ public void postProcessParameter(CodegenParameter p) { } } + private void fixComposedSchemaRequiredVars(Schema schema, CodegenModel result) { + // for composed schema models, if the required properties are only from oneOf or anyOf models + // 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 + Map selfProperties = new LinkedHashMap(); + List selfRequired = new ArrayList(); + + // these are the properties that are from properties in cs oneOf or cs anyOf + Map otherProperties = new LinkedHashMap(); + List otherRequired = new ArrayList(); + + List oneOfanyOfSchemas = new ArrayList<>(); + List oneOf = cs.getOneOf(); + if (oneOf != null) { + oneOfanyOfSchemas.addAll(oneOf); + } + List anyOf = cs.getAnyOf(); + if (anyOf != null) { + oneOfanyOfSchemas.addAll(anyOf); + } + for (Schema sc : oneOfanyOfSchemas) { + Schema refSchema = ModelUtils.getReferencedSchema(this.openAPI, sc); + addProperties(otherProperties, otherRequired, refSchema); + } + Set otherRequiredSet = new HashSet(otherRequired); + + List allOf = cs.getAllOf(); + if ((schema.getProperties() != null && !schema.getProperties().isEmpty()) || allOf != null) { + // NOTE: this function also adds the allOf properties inside schema + addProperties(selfProperties, selfRequired, schema); + } + if (result.discriminator != null) { + selfRequired.add(result.discriminator.getPropertyBaseName()); + } + 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)) { + cp.required = false; + reqVarsThatMustBeOptional.add(cp); + } + } + } + for (CodegenProperty cp : reqVarsThatMustBeOptional) { + result.getRequiredVars().remove(cp); + result.getOptionalVars().add(cp); + } + } + /** * Sets the value of the 'model.parent' property in CodegenModel * We have a custom version of this function so we can add the dataType on the ArrayModel @@ -591,6 +651,9 @@ protected void addParentContainer(CodegenModel model, String name, Schema schema @Override 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)) { + fixComposedSchemaRequiredVars(sc, cm); + } ArrayList> listOfLists = new ArrayList>(); listOfLists.add(cm.requiredVars); listOfLists.add(cm.optionalVars); 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/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 36431be460b5..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, 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 3fe0048d0d7c..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, 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 76ba7d56aab5..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, 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 150d1cf1b96d..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, 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 3bc0002f1be8..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, 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 6f342172544e..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, 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 efd7a2ff75ed..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, 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 b884c204abd4..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, 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/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/ComposedOneOfNumberWithValidations.md index e10799f4bb79..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** | | **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 1e36ae66077b..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** | | -**length_cm** | **float** | | **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 6412fa900666..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** | | -**triangle_type** | **str** | | +**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 d5d38f607e85..58f91c19b66c 100644 --- a/samples/openapi3/client/petstore/python/docs/Quadrilateral.md +++ b/samples/openapi3/client/petstore/python/docs/Quadrilateral.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**shape_type** | **str** | | **quadrilateral_type** | **str** | | +**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 a3592a1272ac..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** | | -**triangle_type** | **str** | | +**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 ac0ae87068cd..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** | | -**triangle_type** | **str** | | +**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 84bd75599bda..f86e2ede108c 100644 --- a/samples/openapi3/client/petstore/python/docs/Triangle.md +++ b/samples/openapi3/client/petstore/python/docs/Triangle.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**shape_type** | **str** | | **triangle_type** | **str** | | +**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 e78a00b91e7e..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, 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 28ff0dc2170b..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, 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 a629bba2ed7f..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, 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 5e8bb76f04a5..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 @@ def openapi_types(): """ lazy_import() return { - 'class_name': (str,), # noqa: E501 'color': (str,), # noqa: E501 + 'class_name': (str,), # noqa: E501 } @cached_property @@ -98,8 +96,8 @@ def discriminator(): attribute_map = { - 'class_name': 'className', # noqa: E501 'color': 'color', # noqa: E501 + 'class_name': 'className', # noqa: E501 } required_properties = set([ @@ -115,12 +113,9 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """ComposedOneOfNumberWithValidations - a model defined in OpenAPI - Args: - class_name (str): - Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -153,6 +148,7 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 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 """ _check_type = kwargs.pop('_check_type', True) @@ -186,7 +182,6 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'class_name': class_name, } model_args = {} model_args.update(required_args) 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 4dc2325e3a21..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, 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 1baefdfe85b8..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, 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 5010f6598634..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, 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 a96e07de5630..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 @@ def openapi_types(): """ 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 @@ def discriminator(): 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([ @@ -112,13 +110,9 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, cultivar, length_cm, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """FruitReq - a model defined in OpenAPI - Args: - cultivar (str): - length_cm (float): - Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -152,6 +146,8 @@ def __init__(self, cultivar, length_cm, *args, **kwargs): # noqa: E501 _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 """ _check_type = kwargs.pop('_check_type', True) @@ -185,8 +181,6 @@ def __init__(self, cultivar, length_cm, *args, **kwargs): # noqa: E501 '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'cultivar': cultivar, - 'length_cm': length_cm, } model_args = {} model_args.update(required_args) 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 ec75c28b4ad5..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, 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 da9c1bb5d969..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, 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 4f81c103e734..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, 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 7235af203267..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, @@ -123,13 +121,11 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """NullableShape - a model defined in OpenAPI Args: shape_type (str): - quadrilateral_type (str): - triangle_type (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -162,6 +158,8 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg 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 """ _check_type = kwargs.pop('_check_type', True) @@ -196,8 +194,6 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } model_args = {} model_args.update(required_args) 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 514d0ad86404..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, 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 bcdccecfcaf0..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, 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 2d31acfb6534..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 @@ def openapi_types(): """ lazy_import() return { - 'shape_type': (str,), # noqa: E501 'quadrilateral_type': (str,), # noqa: E501 + 'shape_type': (str,), # noqa: E501 } @cached_property @@ -104,8 +102,8 @@ def discriminator(): return {'quadrilateral_type': val} attribute_map = { - 'shape_type': 'shapeType', # noqa: E501 'quadrilateral_type': 'quadrilateralType', # noqa: E501 + 'shape_type': 'shapeType', # noqa: E501 } required_properties = set([ @@ -121,11 +119,10 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 + def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 """Quadrilateral - a model defined in OpenAPI Args: - shape_type (str): quadrilateral_type (str): Keyword Args: @@ -159,6 +156,7 @@ def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E5 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 """ _check_type = kwargs.pop('_check_type', True) @@ -192,7 +190,6 @@ def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E5 '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'shape_type': shape_type, 'quadrilateral_type': quadrilateral_type, } model_args = {} 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 f2d382877cfb..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, 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 f6b16a934824..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, @@ -123,13 +121,11 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """Shape - a model defined in OpenAPI Args: shape_type (str): - quadrilateral_type (str): - triangle_type (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -162,6 +158,8 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg 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 """ _check_type = kwargs.pop('_check_type', True) @@ -196,8 +194,6 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } model_args = {} model_args.update(required_args) 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 48ecd4f1a158..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, @@ -123,13 +121,11 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """ShapeOrNull - a model defined in OpenAPI Args: shape_type (str): - quadrilateral_type (str): - triangle_type (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -162,6 +158,8 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg 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 """ _check_type = kwargs.pop('_check_type', True) @@ -196,8 +194,6 @@ def __init__(self, shape_type, quadrilateral_type, triangle_type, *args, **kwarg } required_args = { 'shape_type': shape_type, - 'quadrilateral_type': quadrilateral_type, - 'triangle_type': triangle_type, } model_args = {} model_args.update(required_args) 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 172699f7db98..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, 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 c78c0db7d91d..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, 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 683dc3b7fe81..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 @@ def openapi_types(): """ lazy_import() return { - 'shape_type': (str,), # noqa: E501 'triangle_type': (str,), # noqa: E501 + 'shape_type': (str,), # noqa: E501 } @cached_property @@ -107,8 +105,8 @@ def discriminator(): return {'triangle_type': val} attribute_map = { - 'shape_type': 'shapeType', # noqa: E501 'triangle_type': 'triangleType', # noqa: E501 + 'shape_type': 'shapeType', # noqa: E501 } required_properties = set([ @@ -124,11 +122,10 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 + def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 """Triangle - a model defined in OpenAPI Args: - shape_type (str): triangle_type (str): Keyword Args: @@ -162,6 +159,7 @@ def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 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 """ _check_type = kwargs.pop('_check_type', True) @@ -195,7 +193,6 @@ def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'shape_type': shape_type, 'triangle_type': triangle_type, } model_args = {} 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/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()