Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Latest commit

 

History

History
126 lines (114 loc) · 5.76 KB

File metadata and controls

126 lines (114 loc) · 5.76 KB

Drawing

petstore_api.components.schema.drawing

type: schemas.Schema

validate method

Input Type Return Type Notes
DrawingDictInput, DrawingDict DrawingDict

DrawingDictInput

type: typing.Mapping[
    str,
    typing.Union[
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
        typing.Union[
            ShapesTupleInput,
            ShapesTuple
        ],
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
    ]
]
Key Type Description Notes
mainShape dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader [optional]
shapeOrNull dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader [optional]
nullableShape dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader [optional]
shapes ShapesTupleInput, ShapesTuple [optional]
any_string_name fruit.FruitDictInput, fruit.FruitDict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader any string name can be used but the value must be the correct type [optional]

DrawingDict

base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]

__new__ method

Keyword Argument Type Description Notes
mainShape dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset [optional]
shapeOrNull dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset [optional]
nullableShape dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset [optional]
shapes ShapesTupleInput, ShapesTuple, schemas.Unset [optional]
kwargs fruit.FruitDictInput, fruit.FruitDict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader any string name can be used but the value must be the correct type [optional] typed value is accessed with the get_additional_property_ method

properties

Property Type Description Notes
mainShape schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset [optional]
shapeOrNull schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset [optional]
nullableShape schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset [optional]
shapes ShapesTuple, schemas.Unset [optional]

methods

Method Input Type Return Type Notes
from_dict_ DrawingDictInput, DrawingDict DrawingDict a constructor
get_additional_property_ str fruit.FruitDict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset provides type safety for additional properties

Shapes

type: schemas.Schema

validate method

Input Type Return Type Notes
ShapesTupleInput, ShapesTuple ShapesTuple

ShapesTupleInput

type: typing.Union[
    typing.List[
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
    ],
    typing.Tuple[
        typing.Union[
            schemas.INPUT_TYPES_ALL,
            schemas.OUTPUT_BASE_TYPES
        ],
        ...
    ]
]
List/Tuple Item Type Description Notes
dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader

ShapesTuple

base class: typing.Tuple[
    schemas.OUTPUT_BASE_TYPES,
    ...
]

__new__ method

Argument Type
arg ShapesTupleInput, ShapesTuple
configuration typing.Optional[schema_configuration.SchemaConfiguration] = None

methods

Method Input Type Return Type Notes
__getitem__ int schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO This method is used under the hood when instance[0] is called

[Back to top] [Back to Component Schemas] [Back to README]