Removes nulltype from python, updates samples (#8555)

* Removes nulltype from python, updates samples

* Removes nulltype from the python requirements

* Removes nulltype import in models, moves requiredVars to optionalVars when approprieate
This commit is contained in:
Justin Black
2021-01-28 09:30:36 -08:00
committed by GitHub
parent e377eabbc5
commit 2553d056dc
180 changed files with 48 additions and 1863 deletions

View File

@@ -566,9 +566,14 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
}
}
private void addNullDefaultToOneOfAnyOfReqProps(Schema schema, CodegenModel result) {
private void fixComposedSchemaRequiredVars(Schema schema, CodegenModel result) {
// for composed schema models, if the required properties are only from oneOf or anyOf models
// give them a nulltype.Null so the user can omit including them in python
// remove them from the composed schema's required vars
// for composed schemas our code adds oneOf and anyOf required properties to
// the composed schema's required properties
// but they should not be required because if we have ComposedSchema: oneOf -schemaA -schemaB
// and the required props are only in schemaB, we do not need to use them when making an instance of
// ComposedSchema + schemaA
ComposedSchema cs = (ComposedSchema) schema;
// these are the properties that are from properties in self cs or cs allOf
@@ -596,7 +601,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
List<Schema> allOf = cs.getAllOf();
if ((schema.getProperties() != null && !schema.getProperties().isEmpty()) || allOf != null) {
// NOTE: this function also adds the allOf propesrties inside schema
// NOTE: this function also adds the allOf properties inside schema
addProperties(selfProperties, selfRequired, schema);
}
if (result.discriminator != null) {
@@ -605,16 +610,20 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
Set<String> selfRequiredSet = new HashSet<String>(selfRequired);
List<CodegenProperty> reqVars = result.getRequiredVars();
List<CodegenProperty> reqVarsThatMustBeOptional = new ArrayList<>();
if (reqVars != null) {
for (CodegenProperty cp : reqVars) {
String propName = cp.baseName;
if (otherRequiredSet.contains(propName) && !selfRequiredSet.contains(propName)) {
// if var is in otherRequiredSet and is not in selfRequiredSet and is in result.requiredVars
// then set it to nullable because the user doesn't have to give a value for it
cp.setDefaultValue("nulltype.Null");
cp.required = false;
reqVarsThatMustBeOptional.add(cp);
}
}
}
for (CodegenProperty cp : reqVarsThatMustBeOptional) {
result.getRequiredVars().remove(cp);
result.getOptionalVars().add(cp);
}
}
/**
@@ -643,7 +652,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
public CodegenModel fromModel(String name, Schema sc) {
CodegenModel cm = super.fromModel(name, sc);
if (cm.requiredVars.size() > 0 && (cm.oneOf.size() > 0 || cm.anyOf.size() > 0)) {
addNullDefaultToOneOfAnyOfReqProps(sc, cm);
fixComposedSchemaRequiredVars(sc, cm);
}
ArrayList<List<CodegenProperty>> listOfLists = new ArrayList<List<CodegenProperty>>();
listOfLists.add(cm.requiredVars);

View File

@@ -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,

View File

@@ -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)

View File

@@ -1,4 +1,3 @@
nulltype
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3

View File

@@ -17,7 +17,6 @@ VERSION = "{{packageVersion}}"
REQUIRES = [
"urllib3 >= 1.25.3",
"python-dateutil",
"nulltype",
{{#asyncio}}
"aiohttp >= 3.0.0",
{{/asyncio}}

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -187,11 +185,6 @@ class Cat(ModelComposed):
required_args = {
'class_name': class_name,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -181,11 +179,6 @@ class Child(ModelComposed):
}
required_args = {
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -184,11 +182,6 @@ class ChildCat(ModelComposed):
required_args = {
'pet_type': pet_type,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -184,11 +182,6 @@ class ChildDog(ModelComposed):
required_args = {
'pet_type': pet_type,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -184,11 +182,6 @@ class ChildLizard(ModelComposed):
required_args = {
'pet_type': pet_type,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -187,11 +185,6 @@ class Dog(ModelComposed):
required_args = {
'class_name': class_name,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -178,11 +176,6 @@ class Parent(ModelComposed):
}
required_args = {
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -189,11 +187,6 @@ class ParentPet(ModelComposed):
required_args = {
'pet_type': pet_type,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -1,4 +1,3 @@
nulltype
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3

View File

@@ -22,7 +22,6 @@ VERSION = "1.0.0"
REQUIRES = [
"urllib3 >= 1.25.3",
"python-dateutil",
"nulltype",
]
setup(

View File

@@ -1,4 +1,3 @@
nulltype
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3

View File

@@ -22,7 +22,6 @@ VERSION = "1.0.0"
REQUIRES = [
"urllib3 >= 1.25.3",
"python-dateutil",
"nulltype",
]
setup(

View File

@@ -1,4 +1,3 @@
nulltype
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3

View File

@@ -22,7 +22,6 @@ VERSION = "1.0.0"
REQUIRES = [
"urllib3 >= 1.25.3",
"python-dateutil",
"nulltype",
]
setup(

View File

@@ -4,8 +4,8 @@ this is a model that allows payloads of type object or number
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | | defaults to nulltype.Null
**color** | **str** | | [optional] if omitted the server will use the default value of "red"
**class_name** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -3,10 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cultivar** | **str** | | defaults to nulltype.Null
**length_cm** | **float** | | defaults to nulltype.Null
**mealy** | **bool** | | [optional]
**sweet** | **bool** | | [optional]
**cultivar** | **str** | | [optional]
**length_cm** | **float** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -5,8 +5,8 @@ The value may be a shape or the 'null' value. The 'nullable' attribute was intro
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shape_type** | **str** | |
**quadrilateral_type** | **str** | | defaults to nulltype.Null
**triangle_type** | **str** | | defaults to nulltype.Null
**quadrilateral_type** | **str** | | [optional]
**triangle_type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**quadrilateral_type** | **str** | |
**shape_type** | **str** | | defaults to nulltype.Null
**shape_type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shape_type** | **str** | |
**quadrilateral_type** | **str** | | defaults to nulltype.Null
**triangle_type** | **str** | | defaults to nulltype.Null
**quadrilateral_type** | **str** | | [optional]
**triangle_type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -5,8 +5,8 @@ The value may be a shape or the 'null' value. This is introduced in OAS schema >
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shape_type** | **str** | |
**quadrilateral_type** | **str** | | defaults to nulltype.Null
**triangle_type** | **str** | | defaults to nulltype.Null
**quadrilateral_type** | **str** | | [optional]
**triangle_type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**triangle_type** | **str** | |
**shape_type** | **str** | | defaults to nulltype.Null
**shape_type** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
@@ -196,11 +194,6 @@ class Cat(ModelComposed):
required_args = {
'class_name': class_name,
}
# remove args whose value is Null because they are unset
required_arg_names = list(required_args.keys())
for required_arg_name in required_arg_names:
if required_args[required_arg_name] is nulltype.Null:
del required_args[required_arg_name]
model_args = {}
model_args.update(required_args)
model_args.update(kwargs)

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

View File

@@ -11,8 +11,6 @@
import re # noqa: F401
import sys # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,

Some files were not shown because too many files have changed in this diff Show More