[python-experimental] Improves additionalProperties processing when additionalProperties is unset (#13347)

* Adds NotAnyTypeSchema

* Unit test sample regenerated

* Turns parameter tests back on

* Removes unused from_server_types

* Reverts version files

* Samples regerated with fixed type hints

* Further fixed type hints
This commit is contained in:
Justin Black
2022-09-05 13:17:48 -07:00
committed by GitHub
parent f139c090e5
commit 2c5eb54f11
188 changed files with 547 additions and 541 deletions

View File

@@ -41,7 +41,7 @@ def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.proper
{{#unless getIsBooleanSchemaFalse}}
@typing.overload
def __getitem__(self, name: str) -> typing.Union[{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}, schemas.Unset]: ...
def __getitem__(self, name: str) -> {{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}: ...
{{/unless}}
{{/with}}

View File

@@ -14,7 +14,7 @@ def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.proper
{{/each}}
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
# dict_instance[name] accessor
@@ -37,7 +37,7 @@ def get_item_oapg(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless req
{{/each}}
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}], str]):
return super().get_item_oapg(name)

View File

@@ -64,8 +64,6 @@ def update(d: dict, u: dict):
if not u:
return d
for k, v in u.items():
if not v:
continue
if k not in d:
d[k] = v
else:
@@ -278,7 +276,7 @@ class Schema:
return path_to_schemas
@staticmethod
def __process_schema_classes(
def _process_schema_classes_oapg(
schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]
):
"""
@@ -287,6 +285,8 @@ class Schema:
"""
if len(schema_classes) < 2:
return
if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes:
schema_classes.remove(UnsetAnyTypeSchema)
x_schema = schema_type_classes & schema_classes
if not x_schema:
return
@@ -338,7 +338,7 @@ class Schema:
Singleton already added
3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo
"""
cls.__process_schema_classes(schema_classes)
cls._process_schema_classes_oapg(schema_classes)
enum_schema = any(
hasattr(this_cls, '_enum_value_to_name') for this_cls in schema_classes)
inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set)
@@ -1155,7 +1155,7 @@ class ListBase(ValidatorBase):
# if we have definitions for an items schema, use it
# otherwise accept anything
item_cls = getattr(cls.MetaOapg, 'items', AnyTypeSchema)
item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema)
path_to_schemas = {}
for i, value in enumerate(list_items):
item_validation_metadata = ValidationMetadata(
@@ -1255,22 +1255,11 @@ class ListBase(ValidatorBase):
'''
ListBase _get_items_oapg
'''
list_items = arg
cast_items = []
# if we have definitions for an items schema, use it
# otherwise accept anything
cls_item_cls = getattr(cls.MetaOapg, 'items', AnyTypeSchema)
for i, value in enumerate(list_items):
for i, value in enumerate(arg):
item_path_to_item = path_to_item + (i,)
item_cls = path_to_schemas.get(item_path_to_item)
if item_cls is None:
item_cls = cls_item_cls
if isinstance(value, item_cls):
cast_items.append(value)
continue
item_cls = path_to_schemas[item_path_to_item]
new_value = item_cls._get_new_instance_without_conversion_oapg(
value,
item_path_to_item,
@@ -1345,7 +1334,8 @@ class DictBase(Discriminable, ValidatorBase):
- accepted because additionalProperties exists
Exceptions will be raised if:
- invalid arguments were passed in
- a var_name is invalid if additionProperties == None and var_name not in _properties
- a var_name is invalid if additional_properties == NotAnyTypeSchema
and var_name not in properties.__annotations__
- required properties were not passed in
Args:
@@ -1357,7 +1347,7 @@ class DictBase(Discriminable, ValidatorBase):
seen_required_properties = set()
invalid_arguments = []
required_property_names = getattr(cls.MetaOapg, 'required', set())
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema)
properties = getattr(cls.MetaOapg, 'properties', {})
property_annotations = getattr(properties, '__annotations__', {})
for property_name in arg:
@@ -1365,7 +1355,7 @@ class DictBase(Discriminable, ValidatorBase):
seen_required_properties.add(property_name)
elif property_name in property_annotations:
continue
elif additional_properties:
elif additional_properties is not NotAnyTypeSchema:
continue
else:
invalid_arguments.append(property_name)
@@ -1406,13 +1396,22 @@ class DictBase(Discriminable, ValidatorBase):
ApiTypeError - for missing required arguments, or for invalid properties
"""
path_to_schemas = {}
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema)
properties = getattr(cls.MetaOapg, 'properties', {})
property_annotations = getattr(properties, '__annotations__', {})
for property_name, value in arg.items():
path_to_item = validation_metadata.path_to_item+(property_name,)
if property_name in property_annotations:
schema = property_annotations[property_name]
elif additional_properties:
elif additional_properties is not NotAnyTypeSchema:
if additional_properties is UnsetAnyTypeSchema:
"""
If additionalProperties is unset and this path_to_item does not yet have
any validations on it, validate it.
If it already has validations on it, skip this validation.
"""
if path_to_item in path_to_schemas:
continue
schema = additional_properties
else:
raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format(
@@ -1424,7 +1423,7 @@ class DictBase(Discriminable, ValidatorBase):
arg_validation_metadata = ValidationMetadata(
from_server=validation_metadata.from_server,
configuration=validation_metadata.configuration,
path_to_item=validation_metadata.path_to_item+(property_name,),
path_to_item=path_to_item,
validated_path_to_schemas=validation_metadata.validated_path_to_schemas
)
if arg_validation_metadata.validation_ran_earlier(schema):
@@ -1533,30 +1532,17 @@ class DictBase(Discriminable, ValidatorBase):
These values already passed validation
"""
dict_items = {}
# if we have definitions for property schemas convert values using it
# otherwise accept anything
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
for property_name_js, value in arg.items():
if hasattr(cls.MetaOapg, 'properties'):
property_cls = getattr(cls.MetaOapg.properties, property_name_js, additional_properties)
else:
property_cls = additional_properties
property_path_to_item = path_to_item + (property_name_js,)
stored_property_cls = path_to_schemas.get(property_path_to_item)
if stored_property_cls:
property_cls = stored_property_cls
if isinstance(value, property_cls):
dict_items[property_name_js] = value
continue
property_cls = path_to_schemas[property_path_to_item]
new_value = property_cls._get_new_instance_without_conversion_oapg(
value,
property_path_to_item,
path_to_schemas
)
dict_items[property_name_js] = new_value
return dict_items
def __setattr__(self, name: str, value: typing.Any):
@@ -1627,12 +1613,21 @@ def cast_to_allowed_types(
if isinstance(arg, Schema):
# store the already run validations
schema_classes = set()
for cls in arg.__class__.__bases__:
if cls is Singleton:
continue
schema_classes.add(cls)
source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__
if not source_schema_was_unset:
"""
Do not include UnsetAnyTypeSchema and its base class because
it did not exist in the original spec schema definition
It was added to ensure that all instances are of type Schema and the allowed base types
"""
for cls in arg.__class__.__bases__:
if cls is Singleton:
# Skip Singleton
continue
schema_classes.add(cls)
validated_path_to_schemas[path_to_item] = schema_classes
type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}")
if isinstance(arg, str):
return str(arg)
elif isinstance(arg, (dict, frozendict.frozendict)):
@@ -1661,13 +1656,11 @@ def cast_to_allowed_types(
elif isinstance(arg, (date, datetime)):
if not from_server:
return arg.isoformat()
# ApiTypeError will be thrown later by _validate_type
return arg
raise type_error
elif isinstance(arg, uuid.UUID):
if not from_server:
return str(arg)
# ApiTypeError will be thrown later by _validate_type
return arg
raise type_error
elif isinstance(arg, decimal.Decimal):
return decimal.Decimal(arg)
elif isinstance(arg, bytes):
@@ -2166,6 +2159,12 @@ class AnyTypeSchema(
Schema,
NoneFrozenDictTupleStrDecimalBoolMixin
):
# Python representation of a schema defined as true or {}
pass
class UnsetAnyTypeSchema(AnyTypeSchema):
# Used when additionalProperties/items was not explicitly defined and a defining schema is needed
pass
@@ -2173,6 +2172,7 @@ class NotAnyTypeSchema(
ComposedSchema,
):
"""
Python representation of a schema defined as false or {'not': {}}
Does not allow inputs in of AnyType
Note: validations on this class are never run because the code knows that no inputs will ever validate
"""
@@ -2206,7 +2206,7 @@ class DictSchema(
return super().__new__(cls, *args, **kwargs)
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema}
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}
@functools.cache

View File

@@ -49,7 +49,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
# dict_instance[name] accessor

View File

@@ -49,7 +49,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo"], typing.Literal["bar"], str, ]):
# dict_instance[name] accessor

View File

@@ -49,7 +49,7 @@ class AdditionalpropertiesAreAllowedByDefault(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class AdditionalpropertiesAreAllowedByDefault(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -49,7 +49,7 @@ class AdditionalpropertiesAreAllowedByDefault(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class AdditionalpropertiesAreAllowedByDefault(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -64,7 +64,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -64,7 +64,7 @@ class AdditionalpropertiesShouldNotLookInApplicators(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class Allof(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class Allof(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class Allof(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class Allof(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class Allof(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class Allof(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class Allof(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class Allof(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)
@@ -120,7 +120,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["baz", ], str]):
# dict_instance[name] accessor
@@ -131,7 +131,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["baz", ], str]):
return super().get_item_oapg(name)
@@ -175,7 +175,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -186,7 +186,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)
@@ -120,7 +120,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["baz", ], str]):
# dict_instance[name] accessor
@@ -131,7 +131,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["baz", ], str]):
return super().get_item_oapg(name)
@@ -175,7 +175,7 @@ class AllofWithBaseSchema(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -186,7 +186,7 @@ class AllofWithBaseSchema(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class AnyofComplexTypes(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class AnyofComplexTypes(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class AnyofComplexTypes(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class AnyofComplexTypes(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class AnyofComplexTypes(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class AnyofComplexTypes(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class AnyofComplexTypes(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class AnyofComplexTypes(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -81,7 +81,7 @@ class EnumsInProperties(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
# dict_instance[name] accessor
@@ -95,7 +95,7 @@ class EnumsInProperties(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -81,7 +81,7 @@ class EnumsInProperties(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
# dict_instance[name] accessor
@@ -95,7 +95,7 @@ class EnumsInProperties(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", "foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class ForbiddenProperty(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class ForbiddenProperty(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class ForbiddenProperty(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class ForbiddenProperty(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -52,7 +52,7 @@ class InvalidStringValueForDefault(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class InvalidStringValueForDefault(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -49,7 +49,7 @@ class InvalidStringValueForDefault(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -60,7 +60,7 @@ class InvalidStringValueForDefault(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class NotMoreComplexSchema(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class NotMoreComplexSchema(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class NotMoreComplexSchema(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class NotMoreComplexSchema(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -49,7 +49,7 @@ class ObjectPropertiesValidation(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class ObjectPropertiesValidation(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -49,7 +49,7 @@ class ObjectPropertiesValidation(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class ObjectPropertiesValidation(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class OneofComplexTypes(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class OneofComplexTypes(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class OneofComplexTypes(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class OneofComplexTypes(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -57,7 +57,7 @@ class OneofComplexTypes(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class OneofComplexTypes(
def get_item_oapg(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)
@@ -112,7 +112,7 @@ class OneofComplexTypes(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -123,7 +123,7 @@ class OneofComplexTypes(
def get_item_oapg(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -69,7 +69,7 @@ class PropertiesWithEscapedCharacters(
def __getitem__(self, name: typing.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]):
# dict_instance[name] accessor
@@ -95,7 +95,7 @@ class PropertiesWithEscapedCharacters(
def get_item_oapg(self, name: typing.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]):
return super().get_item_oapg(name)

View File

@@ -69,7 +69,7 @@ class PropertiesWithEscapedCharacters(
def __getitem__(self, name: typing.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]):
# dict_instance[name] accessor
@@ -95,7 +95,7 @@ class PropertiesWithEscapedCharacters(
def get_item_oapg(self, name: typing.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class PropertyNamedRefThatIsNotAReference(
def __getitem__(self, name: typing.Literal["$ref"]) -> MetaOapg.properties.ref: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["$ref", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class PropertyNamedRefThatIsNotAReference(
def get_item_oapg(self, name: typing.Literal["$ref"]) -> typing.Union[MetaOapg.properties.ref, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["$ref", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class PropertyNamedRefThatIsNotAReference(
def __getitem__(self, name: typing.Literal["$ref"]) -> MetaOapg.properties.ref: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["$ref", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class PropertyNamedRefThatIsNotAReference(
def get_item_oapg(self, name: typing.Literal["$ref"]) -> typing.Union[MetaOapg.properties.ref, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["$ref", ], str]):
return super().get_item_oapg(name)

View File

@@ -48,7 +48,7 @@ class RefInProperty(
def __getitem__(self, name: typing.Literal["a"]) -> 'PropertyNamedRefThatIsNotAReference': ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["a", ], str]):
# dict_instance[name] accessor
@@ -59,7 +59,7 @@ class RefInProperty(
def get_item_oapg(self, name: typing.Literal["a"]) -> typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["a", ], str]):
return super().get_item_oapg(name)

View File

@@ -48,7 +48,7 @@ class RefInProperty(
def __getitem__(self, name: typing.Literal["a"]) -> 'PropertyNamedRefThatIsNotAReference': ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["a", ], str]):
# dict_instance[name] accessor
@@ -59,7 +59,7 @@ class RefInProperty(
def get_item_oapg(self, name: typing.Literal["a"]) -> typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["a", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class RequiredDefaultValidation(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class RequiredDefaultValidation(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class RequiredDefaultValidation(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class RequiredDefaultValidation(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -54,7 +54,7 @@ class RequiredValidation(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class RequiredValidation(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -54,7 +54,7 @@ class RequiredValidation(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
# dict_instance[name] accessor
@@ -68,7 +68,7 @@ class RequiredValidation(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", "bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class RequiredWithEmptyArray(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class RequiredWithEmptyArray(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -44,7 +44,7 @@ class RequiredWithEmptyArray(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -55,7 +55,7 @@ class RequiredWithEmptyArray(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(
def __getitem__(self, name: typing.Literal["alpha"]) -> MetaOapg.properties.alpha: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["alpha", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(
def get_item_oapg(self, name: typing.Literal["alpha"]) -> typing.Union[MetaOapg.properties.alpha, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["alpha", ], str]):
return super().get_item_oapg(name)

View File

@@ -48,7 +48,7 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(
def __getitem__(self, name: typing.Literal["alpha"]) -> MetaOapg.properties.alpha: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["alpha", ], str]):
# dict_instance[name] accessor
@@ -59,7 +59,7 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(
def get_item_oapg(self, name: typing.Literal["alpha"]) -> typing.Union[MetaOapg.properties.alpha, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["alpha", ], str]):
return super().get_item_oapg(name)

View File

@@ -52,7 +52,7 @@ class SchemaForRequestBodyApplicationJson(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -63,7 +63,7 @@ class SchemaForRequestBodyApplicationJson(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -50,7 +50,7 @@ class SchemaForRequestBodyApplicationJson(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -61,7 +61,7 @@ class SchemaForRequestBodyApplicationJson(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class SchemaFor200ResponseBodyApplicationJson(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class SchemaFor200ResponseBodyApplicationJson(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -49,7 +49,7 @@ class SchemaFor200ResponseBodyApplicationJson(
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["foo", ], str]):
# dict_instance[name] accessor
@@ -60,7 +60,7 @@ class SchemaFor200ResponseBodyApplicationJson(
def get_item_oapg(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["foo", ], str]):
return super().get_item_oapg(name)

View File

@@ -71,8 +71,6 @@ def update(d: dict, u: dict):
if not u:
return d
for k, v in u.items():
if not v:
continue
if k not in d:
d[k] = v
else:
@@ -285,7 +283,7 @@ class Schema:
return path_to_schemas
@staticmethod
def __process_schema_classes(
def _process_schema_classes_oapg(
schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]
):
"""
@@ -294,6 +292,8 @@ class Schema:
"""
if len(schema_classes) < 2:
return
if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes:
schema_classes.remove(UnsetAnyTypeSchema)
x_schema = schema_type_classes & schema_classes
if not x_schema:
return
@@ -345,7 +345,7 @@ class Schema:
Singleton already added
3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo
"""
cls.__process_schema_classes(schema_classes)
cls._process_schema_classes_oapg(schema_classes)
enum_schema = any(
hasattr(this_cls, '_enum_value_to_name') for this_cls in schema_classes)
inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set)
@@ -1162,7 +1162,7 @@ class ListBase(ValidatorBase):
# if we have definitions for an items schema, use it
# otherwise accept anything
item_cls = getattr(cls.MetaOapg, 'items', AnyTypeSchema)
item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema)
path_to_schemas = {}
for i, value in enumerate(list_items):
item_validation_metadata = ValidationMetadata(
@@ -1262,22 +1262,11 @@ class ListBase(ValidatorBase):
'''
ListBase _get_items_oapg
'''
list_items = arg
cast_items = []
# if we have definitions for an items schema, use it
# otherwise accept anything
cls_item_cls = getattr(cls.MetaOapg, 'items', AnyTypeSchema)
for i, value in enumerate(list_items):
for i, value in enumerate(arg):
item_path_to_item = path_to_item + (i,)
item_cls = path_to_schemas.get(item_path_to_item)
if item_cls is None:
item_cls = cls_item_cls
if isinstance(value, item_cls):
cast_items.append(value)
continue
item_cls = path_to_schemas[item_path_to_item]
new_value = item_cls._get_new_instance_without_conversion_oapg(
value,
item_path_to_item,
@@ -1352,7 +1341,8 @@ class DictBase(Discriminable, ValidatorBase):
- accepted because additionalProperties exists
Exceptions will be raised if:
- invalid arguments were passed in
- a var_name is invalid if additionProperties == None and var_name not in _properties
- a var_name is invalid if additional_properties == NotAnyTypeSchema
and var_name not in properties.__annotations__
- required properties were not passed in
Args:
@@ -1364,7 +1354,7 @@ class DictBase(Discriminable, ValidatorBase):
seen_required_properties = set()
invalid_arguments = []
required_property_names = getattr(cls.MetaOapg, 'required', set())
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema)
properties = getattr(cls.MetaOapg, 'properties', {})
property_annotations = getattr(properties, '__annotations__', {})
for property_name in arg:
@@ -1372,7 +1362,7 @@ class DictBase(Discriminable, ValidatorBase):
seen_required_properties.add(property_name)
elif property_name in property_annotations:
continue
elif additional_properties:
elif additional_properties is not NotAnyTypeSchema:
continue
else:
invalid_arguments.append(property_name)
@@ -1413,13 +1403,22 @@ class DictBase(Discriminable, ValidatorBase):
ApiTypeError - for missing required arguments, or for invalid properties
"""
path_to_schemas = {}
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema)
properties = getattr(cls.MetaOapg, 'properties', {})
property_annotations = getattr(properties, '__annotations__', {})
for property_name, value in arg.items():
path_to_item = validation_metadata.path_to_item+(property_name,)
if property_name in property_annotations:
schema = property_annotations[property_name]
elif additional_properties:
elif additional_properties is not NotAnyTypeSchema:
if additional_properties is UnsetAnyTypeSchema:
"""
If additionalProperties is unset and this path_to_item does not yet have
any validations on it, validate it.
If it already has validations on it, skip this validation.
"""
if path_to_item in path_to_schemas:
continue
schema = additional_properties
else:
raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format(
@@ -1431,7 +1430,7 @@ class DictBase(Discriminable, ValidatorBase):
arg_validation_metadata = ValidationMetadata(
from_server=validation_metadata.from_server,
configuration=validation_metadata.configuration,
path_to_item=validation_metadata.path_to_item+(property_name,),
path_to_item=path_to_item,
validated_path_to_schemas=validation_metadata.validated_path_to_schemas
)
if arg_validation_metadata.validation_ran_earlier(schema):
@@ -1540,30 +1539,17 @@ class DictBase(Discriminable, ValidatorBase):
These values already passed validation
"""
dict_items = {}
# if we have definitions for property schemas convert values using it
# otherwise accept anything
additional_properties = getattr(cls.MetaOapg, 'additional_properties', AnyTypeSchema)
for property_name_js, value in arg.items():
if hasattr(cls.MetaOapg, 'properties'):
property_cls = getattr(cls.MetaOapg.properties, property_name_js, additional_properties)
else:
property_cls = additional_properties
property_path_to_item = path_to_item + (property_name_js,)
stored_property_cls = path_to_schemas.get(property_path_to_item)
if stored_property_cls:
property_cls = stored_property_cls
if isinstance(value, property_cls):
dict_items[property_name_js] = value
continue
property_cls = path_to_schemas[property_path_to_item]
new_value = property_cls._get_new_instance_without_conversion_oapg(
value,
property_path_to_item,
path_to_schemas
)
dict_items[property_name_js] = new_value
return dict_items
def __setattr__(self, name: str, value: typing.Any):
@@ -1634,12 +1620,21 @@ def cast_to_allowed_types(
if isinstance(arg, Schema):
# store the already run validations
schema_classes = set()
for cls in arg.__class__.__bases__:
if cls is Singleton:
continue
schema_classes.add(cls)
source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__
if not source_schema_was_unset:
"""
Do not include UnsetAnyTypeSchema and its base class because
it did not exist in the original spec schema definition
It was added to ensure that all instances are of type Schema and the allowed base types
"""
for cls in arg.__class__.__bases__:
if cls is Singleton:
# Skip Singleton
continue
schema_classes.add(cls)
validated_path_to_schemas[path_to_item] = schema_classes
type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}")
if isinstance(arg, str):
return str(arg)
elif isinstance(arg, (dict, frozendict.frozendict)):
@@ -1668,13 +1663,11 @@ def cast_to_allowed_types(
elif isinstance(arg, (date, datetime)):
if not from_server:
return arg.isoformat()
# ApiTypeError will be thrown later by _validate_type
return arg
raise type_error
elif isinstance(arg, uuid.UUID):
if not from_server:
return str(arg)
# ApiTypeError will be thrown later by _validate_type
return arg
raise type_error
elif isinstance(arg, decimal.Decimal):
return decimal.Decimal(arg)
elif isinstance(arg, bytes):
@@ -2173,6 +2166,12 @@ class AnyTypeSchema(
Schema,
NoneFrozenDictTupleStrDecimalBoolMixin
):
# Python representation of a schema defined as true or {}
pass
class UnsetAnyTypeSchema(AnyTypeSchema):
# Used when additionalProperties/items was not explicitly defined and a defining schema is needed
pass
@@ -2180,6 +2179,7 @@ class NotAnyTypeSchema(
ComposedSchema,
):
"""
Python representation of a schema defined as false or {'not': {}}
Does not allow inputs in of AnyType
Note: validations on this class are never run because the code knows that no inputs will ever validate
"""
@@ -2213,7 +2213,7 @@ class DictSchema(
return super().__new__(cls, *args, **kwargs)
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema}
schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema}
@functools.cache

View File

@@ -237,7 +237,7 @@ class AdditionalPropertiesClass(
def __getitem__(self, name: typing.Literal["map_with_undeclared_properties_string"]) -> MetaOapg.properties.map_with_undeclared_properties_string: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]):
# dict_instance[name] accessor
@@ -269,7 +269,7 @@ class AdditionalPropertiesClass(
def get_item_oapg(self, name: typing.Literal["map_with_undeclared_properties_string"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]):
return super().get_item_oapg(name)

View File

@@ -237,7 +237,7 @@ class AdditionalPropertiesClass(
def __getitem__(self, name: typing.Literal["map_with_undeclared_properties_string"]) -> MetaOapg.properties.map_with_undeclared_properties_string: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]):
# dict_instance[name] accessor
@@ -269,7 +269,7 @@ class AdditionalPropertiesClass(
def get_item_oapg(self, name: typing.Literal["map_with_undeclared_properties_string"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]):
return super().get_item_oapg(name)

View File

@@ -63,7 +63,7 @@ class Animal(
def __getitem__(self, name: typing.Literal["color"]) -> MetaOapg.properties.color: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", "color", ], str]):
# dict_instance[name] accessor
@@ -77,7 +77,7 @@ class Animal(
def get_item_oapg(self, name: typing.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", "color", ], str]):
return super().get_item_oapg(name)

View File

@@ -63,7 +63,7 @@ class Animal(
def __getitem__(self, name: typing.Literal["color"]) -> MetaOapg.properties.color: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", "color", ], str]):
# dict_instance[name] accessor
@@ -77,7 +77,7 @@ class Animal(
def get_item_oapg(self, name: typing.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", "color", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class ApiResponse(
def __getitem__(self, name: typing.Literal["message"]) -> MetaOapg.properties.message: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["code", "type", "message", ], str]):
# dict_instance[name] accessor
@@ -70,7 +70,7 @@ class ApiResponse(
def get_item_oapg(self, name: typing.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["code", "type", "message", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class ApiResponse(
def __getitem__(self, name: typing.Literal["message"]) -> MetaOapg.properties.message: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["code", "type", "message", ], str]):
# dict_instance[name] accessor
@@ -70,7 +70,7 @@ class ApiResponse(
def get_item_oapg(self, name: typing.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["code", "type", "message", ], str]):
return super().get_item_oapg(name)

View File

@@ -81,7 +81,7 @@ class Apple(
def __getitem__(self, name: typing.Literal["origin"]) -> MetaOapg.properties.origin: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["cultivar", "origin", ], str]):
# dict_instance[name] accessor
@@ -95,7 +95,7 @@ class Apple(
def get_item_oapg(self, name: typing.Literal["origin"]) -> typing.Union[MetaOapg.properties.origin, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["cultivar", "origin", ], str]):
return super().get_item_oapg(name)

View File

@@ -68,7 +68,7 @@ class Apple(
def __getitem__(self, name: typing.Literal["origin"]) -> MetaOapg.properties.origin: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["cultivar", "origin", ], str]):
# dict_instance[name] accessor
@@ -82,7 +82,7 @@ class Apple(
def get_item_oapg(self, name: typing.Literal["origin"]) -> typing.Union[MetaOapg.properties.origin, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["cultivar", "origin", ], str]):
return super().get_item_oapg(name)

View File

@@ -87,7 +87,7 @@ class ArrayOfArrayOfNumberOnly(
def __getitem__(self, name: typing.Literal["ArrayArrayNumber"]) -> MetaOapg.properties.ArrayArrayNumber: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["ArrayArrayNumber", ], str]):
# dict_instance[name] accessor
@@ -98,7 +98,7 @@ class ArrayOfArrayOfNumberOnly(
def get_item_oapg(self, name: typing.Literal["ArrayArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayArrayNumber, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["ArrayArrayNumber", ], str]):
return super().get_item_oapg(name)

View File

@@ -87,7 +87,7 @@ class ArrayOfArrayOfNumberOnly(
def __getitem__(self, name: typing.Literal["ArrayArrayNumber"]) -> MetaOapg.properties.ArrayArrayNumber: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["ArrayArrayNumber", ], str]):
# dict_instance[name] accessor
@@ -98,7 +98,7 @@ class ArrayOfArrayOfNumberOnly(
def get_item_oapg(self, name: typing.Literal["ArrayArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayArrayNumber, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["ArrayArrayNumber", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class ArrayOfNumberOnly(
def __getitem__(self, name: typing.Literal["ArrayNumber"]) -> MetaOapg.properties.ArrayNumber: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["ArrayNumber", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class ArrayOfNumberOnly(
def get_item_oapg(self, name: typing.Literal["ArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayNumber, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["ArrayNumber", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class ArrayOfNumberOnly(
def __getitem__(self, name: typing.Literal["ArrayNumber"]) -> MetaOapg.properties.ArrayNumber: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["ArrayNumber", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class ArrayOfNumberOnly(
def get_item_oapg(self, name: typing.Literal["ArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayNumber, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["ArrayNumber", ], str]):
return super().get_item_oapg(name)

View File

@@ -167,7 +167,7 @@ class ArrayTest(
def __getitem__(self, name: typing.Literal["array_array_of_model"]) -> MetaOapg.properties.array_array_of_model: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]):
# dict_instance[name] accessor
@@ -184,7 +184,7 @@ class ArrayTest(
def get_item_oapg(self, name: typing.Literal["array_array_of_model"]) -> typing.Union[MetaOapg.properties.array_array_of_model, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]):
return super().get_item_oapg(name)

View File

@@ -167,7 +167,7 @@ class ArrayTest(
def __getitem__(self, name: typing.Literal["array_array_of_model"]) -> MetaOapg.properties.array_array_of_model: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]):
# dict_instance[name] accessor
@@ -184,7 +184,7 @@ class ArrayTest(
def get_item_oapg(self, name: typing.Literal["array_array_of_model"]) -> typing.Union[MetaOapg.properties.array_array_of_model, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]):
return super().get_item_oapg(name)

View File

@@ -48,7 +48,7 @@ class Banana(
def __getitem__(self, name: typing.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["lengthCm", ], str]):
# dict_instance[name] accessor
@@ -59,7 +59,7 @@ class Banana(
def get_item_oapg(self, name: typing.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["lengthCm", ], str]):
return super().get_item_oapg(name)

View File

@@ -48,7 +48,7 @@ class Banana(
def __getitem__(self, name: typing.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["lengthCm", ], str]):
# dict_instance[name] accessor
@@ -59,7 +59,7 @@ class Banana(
def get_item_oapg(self, name: typing.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["lengthCm", ], str]):
return super().get_item_oapg(name)

View File

@@ -62,7 +62,7 @@ class BasquePig(
def __getitem__(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", ], str]):
# dict_instance[name] accessor
@@ -73,7 +73,7 @@ class BasquePig(
def get_item_oapg(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", ], str]):
return super().get_item_oapg(name)

View File

@@ -62,7 +62,7 @@ class BasquePig(
def __getitem__(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", ], str]):
# dict_instance[name] accessor
@@ -73,7 +73,7 @@ class BasquePig(
def get_item_oapg(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", ], str]):
return super().get_item_oapg(name)

View File

@@ -68,7 +68,7 @@ class Capitalization(
def __getitem__(self, name: typing.Literal["ATT_NAME"]) -> MetaOapg.properties.ATT_NAME: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]):
# dict_instance[name] accessor
@@ -94,7 +94,7 @@ class Capitalization(
def get_item_oapg(self, name: typing.Literal["ATT_NAME"]) -> typing.Union[MetaOapg.properties.ATT_NAME, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]):
return super().get_item_oapg(name)

View File

@@ -68,7 +68,7 @@ class Capitalization(
def __getitem__(self, name: typing.Literal["ATT_NAME"]) -> MetaOapg.properties.ATT_NAME: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]):
# dict_instance[name] accessor
@@ -94,7 +94,7 @@ class Capitalization(
def get_item_oapg(self, name: typing.Literal["ATT_NAME"]) -> typing.Union[MetaOapg.properties.ATT_NAME, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class Cat(
def __getitem__(self, name: typing.Literal["declawed"]) -> MetaOapg.properties.declawed: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["declawed", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class Cat(
def get_item_oapg(self, name: typing.Literal["declawed"]) -> typing.Union[MetaOapg.properties.declawed, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["declawed", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class Cat(
def __getitem__(self, name: typing.Literal["declawed"]) -> MetaOapg.properties.declawed: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["declawed", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class Cat(
def get_item_oapg(self, name: typing.Literal["declawed"]) -> typing.Union[MetaOapg.properties.declawed, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["declawed", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class Category(
def __getitem__(self, name: typing.Literal["id"]) -> MetaOapg.properties.id: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["name", "id", ], str]):
# dict_instance[name] accessor
@@ -67,7 +67,7 @@ class Category(
def get_item_oapg(self, name: typing.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["name", "id", ], str]):
return super().get_item_oapg(name)

View File

@@ -53,7 +53,7 @@ class Category(
def __getitem__(self, name: typing.Literal["id"]) -> MetaOapg.properties.id: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["name", "id", ], str]):
# dict_instance[name] accessor
@@ -67,7 +67,7 @@ class Category(
def get_item_oapg(self, name: typing.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["name", "id", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class ChildCat(
def __getitem__(self, name: typing.Literal["name"]) -> MetaOapg.properties.name: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["name", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class ChildCat(
def get_item_oapg(self, name: typing.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["name", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class ChildCat(
def __getitem__(self, name: typing.Literal["name"]) -> MetaOapg.properties.name: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["name", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class ChildCat(
def get_item_oapg(self, name: typing.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["name", ], str]):
return super().get_item_oapg(name)

View File

@@ -46,7 +46,7 @@ class ClassModel(
def __getitem__(self, name: typing.Literal["_class"]) -> MetaOapg.properties._class: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["_class", ], str]):
# dict_instance[name] accessor
@@ -57,7 +57,7 @@ class ClassModel(
def get_item_oapg(self, name: typing.Literal["_class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["_class", ], str]):
return super().get_item_oapg(name)

View File

@@ -46,7 +46,7 @@ class ClassModel(
def __getitem__(self, name: typing.Literal["_class"]) -> MetaOapg.properties._class: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["_class", ], str]):
# dict_instance[name] accessor
@@ -57,7 +57,7 @@ class ClassModel(
def get_item_oapg(self, name: typing.Literal["_class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["_class", ], str]):
return super().get_item_oapg(name)

View File

@@ -43,7 +43,7 @@ class Client(
def __getitem__(self, name: typing.Literal["client"]) -> MetaOapg.properties.client: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["client", ], str]):
# dict_instance[name] accessor
@@ -54,7 +54,7 @@ class Client(
def get_item_oapg(self, name: typing.Literal["client"]) -> typing.Union[MetaOapg.properties.client, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["client", ], str]):
return super().get_item_oapg(name)

View File

@@ -43,7 +43,7 @@ class Client(
def __getitem__(self, name: typing.Literal["client"]) -> MetaOapg.properties.client: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["client", ], str]):
# dict_instance[name] accessor
@@ -54,7 +54,7 @@ class Client(
def get_item_oapg(self, name: typing.Literal["client"]) -> typing.Union[MetaOapg.properties.client, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["client", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class ComplexQuadrilateral(
def __getitem__(self, name: typing.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["quadrilateralType", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class ComplexQuadrilateral(
def get_item_oapg(self, name: typing.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["quadrilateralType", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class ComplexQuadrilateral(
def __getitem__(self, name: typing.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["quadrilateralType", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class ComplexQuadrilateral(
def get_item_oapg(self, name: typing.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["quadrilateralType", ], str]):
return super().get_item_oapg(name)

View File

@@ -62,7 +62,7 @@ class DanishPig(
def __getitem__(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", ], str]):
# dict_instance[name] accessor
@@ -73,7 +73,7 @@ class DanishPig(
def get_item_oapg(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", ], str]):
return super().get_item_oapg(name)

View File

@@ -62,7 +62,7 @@ class DanishPig(
def __getitem__(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["className", ], str]):
# dict_instance[name] accessor
@@ -73,7 +73,7 @@ class DanishPig(
def get_item_oapg(self, name: typing.Literal["className"]) -> MetaOapg.properties.className: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["className", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class Dog(
def __getitem__(self, name: typing.Literal["breed"]) -> MetaOapg.properties.breed: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["breed", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class Dog(
def get_item_oapg(self, name: typing.Literal["breed"]) -> typing.Union[MetaOapg.properties.breed, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["breed", ], str]):
return super().get_item_oapg(name)

View File

@@ -51,7 +51,7 @@ class Dog(
def __getitem__(self, name: typing.Literal["breed"]) -> MetaOapg.properties.breed: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["breed", ], str]):
# dict_instance[name] accessor
@@ -62,7 +62,7 @@ class Dog(
def get_item_oapg(self, name: typing.Literal["breed"]) -> typing.Union[MetaOapg.properties.breed, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["breed", ], str]):
return super().get_item_oapg(name)

View File

@@ -101,7 +101,7 @@ class Drawing(
def __getitem__(self, name: typing.Literal["shapes"]) -> MetaOapg.properties.shapes: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union['Fruit', schemas.Unset]: ...
def __getitem__(self, name: str) -> 'Fruit': ...
def __getitem__(self, name: typing.Union[typing.Literal["mainShape"], typing.Literal["shapeOrNull"], typing.Literal["nullableShape"], typing.Literal["shapes"], str, ]):
# dict_instance[name] accessor

View File

@@ -101,7 +101,7 @@ class Drawing(
def __getitem__(self, name: typing.Literal["shapes"]) -> MetaOapg.properties.shapes: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union['Fruit', schemas.Unset]: ...
def __getitem__(self, name: str) -> 'Fruit': ...
def __getitem__(self, name: typing.Union[typing.Literal["mainShape"], typing.Literal["shapeOrNull"], typing.Literal["nullableShape"], typing.Literal["shapes"], str, ]):
# dict_instance[name] accessor

View File

@@ -110,7 +110,7 @@ class EnumArrays(
def __getitem__(self, name: typing.Literal["array_enum"]) -> MetaOapg.properties.array_enum: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["just_symbol", "array_enum", ], str]):
# dict_instance[name] accessor
@@ -124,7 +124,7 @@ class EnumArrays(
def get_item_oapg(self, name: typing.Literal["array_enum"]) -> typing.Union[MetaOapg.properties.array_enum, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["just_symbol", "array_enum", ], str]):
return super().get_item_oapg(name)

View File

@@ -110,7 +110,7 @@ class EnumArrays(
def __getitem__(self, name: typing.Literal["array_enum"]) -> MetaOapg.properties.array_enum: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["just_symbol", "array_enum", ], str]):
# dict_instance[name] accessor
@@ -124,7 +124,7 @@ class EnumArrays(
def get_item_oapg(self, name: typing.Literal["array_enum"]) -> typing.Union[MetaOapg.properties.array_enum, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["just_symbol", "array_enum", ], str]):
return super().get_item_oapg(name)

View File

@@ -200,7 +200,7 @@ class EnumTest(
def __getitem__(self, name: typing.Literal["IntegerEnumOneValue"]) -> 'IntegerEnumOneValue': ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]):
# dict_instance[name] accessor
@@ -235,7 +235,7 @@ class EnumTest(
def get_item_oapg(self, name: typing.Literal["IntegerEnumOneValue"]) -> typing.Union['IntegerEnumOneValue', schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]):
return super().get_item_oapg(name)

View File

@@ -200,7 +200,7 @@ class EnumTest(
def __getitem__(self, name: typing.Literal["IntegerEnumOneValue"]) -> 'IntegerEnumOneValue': ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]):
# dict_instance[name] accessor
@@ -235,7 +235,7 @@ class EnumTest(
def get_item_oapg(self, name: typing.Literal["IntegerEnumOneValue"]) -> typing.Union['IntegerEnumOneValue', schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class EquilateralTriangle(
def __getitem__(self, name: typing.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["triangleType", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class EquilateralTriangle(
def get_item_oapg(self, name: typing.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["triangleType", ], str]):
return super().get_item_oapg(name)

View File

@@ -65,7 +65,7 @@ class EquilateralTriangle(
def __getitem__(self, name: typing.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["triangleType", ], str]):
# dict_instance[name] accessor
@@ -76,7 +76,7 @@ class EquilateralTriangle(
def get_item_oapg(self, name: typing.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["triangleType", ], str]):
return super().get_item_oapg(name)

View File

@@ -45,7 +45,7 @@ class File(
def __getitem__(self, name: typing.Literal["sourceURI"]) -> MetaOapg.properties.sourceURI: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["sourceURI", ], str]):
# dict_instance[name] accessor
@@ -56,7 +56,7 @@ class File(
def get_item_oapg(self, name: typing.Literal["sourceURI"]) -> typing.Union[MetaOapg.properties.sourceURI, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["sourceURI", ], str]):
return super().get_item_oapg(name)

View File

@@ -45,7 +45,7 @@ class File(
def __getitem__(self, name: typing.Literal["sourceURI"]) -> MetaOapg.properties.sourceURI: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["sourceURI", ], str]):
# dict_instance[name] accessor
@@ -56,7 +56,7 @@ class File(
def get_item_oapg(self, name: typing.Literal["sourceURI"]) -> typing.Union[MetaOapg.properties.sourceURI, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["sourceURI", ], str]):
return super().get_item_oapg(name)

View File

@@ -78,7 +78,7 @@ class FileSchemaTestClass(
def __getitem__(self, name: typing.Literal["files"]) -> MetaOapg.properties.files: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["file", "files", ], str]):
# dict_instance[name] accessor
@@ -92,7 +92,7 @@ class FileSchemaTestClass(
def get_item_oapg(self, name: typing.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["file", "files", ], str]):
return super().get_item_oapg(name)

View File

@@ -78,7 +78,7 @@ class FileSchemaTestClass(
def __getitem__(self, name: typing.Literal["files"]) -> MetaOapg.properties.files: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["file", "files", ], str]):
# dict_instance[name] accessor
@@ -92,7 +92,7 @@ class FileSchemaTestClass(
def get_item_oapg(self, name: typing.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["file", "files", ], str]):
return super().get_item_oapg(name)

View File

@@ -43,7 +43,7 @@ class Foo(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -54,7 +54,7 @@ class Foo(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -43,7 +43,7 @@ class Foo(
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["bar", ], str]):
# dict_instance[name] accessor
@@ -54,7 +54,7 @@ class Foo(
def get_item_oapg(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["bar", ], str]):
return super().get_item_oapg(name)

View File

@@ -269,7 +269,7 @@ class FormatTest(
def __getitem__(self, name: typing.Literal["noneProp"]) -> MetaOapg.properties.noneProp: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]):
# dict_instance[name] accessor
@@ -340,7 +340,7 @@ class FormatTest(
def get_item_oapg(self, name: typing.Literal["noneProp"]) -> typing.Union[MetaOapg.properties.noneProp, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]):
return super().get_item_oapg(name)

View File

@@ -221,7 +221,7 @@ class FormatTest(
def __getitem__(self, name: typing.Literal["noneProp"]) -> MetaOapg.properties.noneProp: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]):
# dict_instance[name] accessor
@@ -292,7 +292,7 @@ class FormatTest(
def get_item_oapg(self, name: typing.Literal["noneProp"]) -> typing.Union[MetaOapg.properties.noneProp, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]):
return super().get_item_oapg(name)

View File

@@ -60,7 +60,7 @@ class Fruit(
def __getitem__(self, name: typing.Literal["color"]) -> MetaOapg.properties.color: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["color", ], str]):
# dict_instance[name] accessor
@@ -71,7 +71,7 @@ class Fruit(
def get_item_oapg(self, name: typing.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["color", ], str]):
return super().get_item_oapg(name)

View File

@@ -60,7 +60,7 @@ class Fruit(
def __getitem__(self, name: typing.Literal["color"]) -> MetaOapg.properties.color: ...
@typing.overload
def __getitem__(self, name: str) -> typing.Union[schemas.AnyTypeSchema]: ...
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(self, name: typing.Union[typing.Literal["color", ], str]):
# dict_instance[name] accessor
@@ -71,7 +71,7 @@ class Fruit(
def get_item_oapg(self, name: typing.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.AnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(self, name: typing.Union[typing.Literal["color", ], str]):
return super().get_item_oapg(name)

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