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

Files

Latest commit

b540502 · Oct 16, 2023

History

History
155 lines (137 loc) · 5.84 KB

File metadata and controls

155 lines (137 loc) · 5.84 KB

Pet

petstore_api.components.schema.pet

type: schemas.Schema

Description

Pet object that needs to be added to the store

validate method

Input Type Return Type Notes
PetDictInput, PetDict PetDict

PetDictInput

type: typing.Mapping[str, schemas.INPUT_TYPES_ALL]
Key Type Description Notes
name str
photoUrls PhotoUrlsTupleInput, PhotoUrlsTuple
id int [optional] value must be a 64 bit integer
category category.CategoryDictInput, category.CategoryDict [optional]
tags TagsTupleInput, TagsTuple [optional]
status typing.Literal["available", "pending", "sold"] pet status in the store [optional] must be one of ["available", "pending", "sold"]
any_string_name dict, schemas.immutabledict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.FileIO any string name can be used but the value must be the correct type [optional]

PetDict

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

__new__ method

Keyword Argument Type Description Notes
name str
photoUrls PhotoUrlsTupleInput, PhotoUrlsTuple
id int, schemas.Unset [optional] value must be a 64 bit integer
category category.CategoryDictInput, category.CategoryDict, schemas.Unset [optional]
tags TagsTupleInput, TagsTuple, schemas.Unset [optional]
status typing.Literal["available", "pending", "sold"], schemas.Unset pet status in the store [optional] must be one of ["available", "pending", "sold"]
kwargs schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO any string name can be used but the value must be the correct type Pet object that needs to be added to the store [optional] typed value is accessed with the get_additional_property_ method

properties

Property Type Description Notes
name str
photoUrls PhotoUrlsTuple
id int, schemas.Unset [optional] value must be a 64 bit integer
category category.CategoryDict, schemas.Unset [optional]
tags TagsTuple, schemas.Unset [optional]
status typing.Literal["available", "pending", "sold"], schemas.Unset pet status in the store [optional] must be one of ["available", "pending", "sold"]

methods

Method Input Type Return Type Notes
from_dict_ PetDictInput, PetDict PetDict a constructor
get_additional_property_ str schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset provides type safety for additional properties

PhotoUrls

type: schemas.Schema

validate method

Input Type Return Type Notes
PhotoUrlsTupleInput, PhotoUrlsTuple PhotoUrlsTuple

PhotoUrlsTupleInput

type: typing.Union[
    typing.List[
        str,
    ],
    typing.Tuple[
        str,
        ...
    ]
]
List/Tuple Item Type Description Notes
str

PhotoUrlsTuple

base class: typing.Tuple[
    str,
    ...
]

__new__ method

Argument Type
arg PhotoUrlsTupleInput, PhotoUrlsTuple
configuration typing.Optional[schema_configuration.SchemaConfiguration] = None

methods

Method Input Type Return Type Notes
__getitem__ int str This method is used under the hood when instance[0] is called

Tags

type: schemas.Schema

validate method

Input Type Return Type Notes
TagsTupleInput, TagsTuple TagsTuple

TagsTupleInput

type: typing.Union[
    typing.List[
        typing.Union[
            tag.TagDictInput,
            tag.TagDict,
        ],
    ],
    typing.Tuple[
        typing.Union[
            tag.TagDictInput,
            tag.TagDict,
        ],
        ...
    ]
]
List/Tuple Item Type Description Notes
tag.TagDictInput, tag.TagDict

TagsTuple

base class: typing.Tuple[
    tag.TagDict,
    ...
]

__new__ method

Argument Type
arg TagsTupleInput, TagsTuple
configuration typing.Optional[schema_configuration.SchemaConfiguration] = None

methods

Method Input Type Return Type Notes
__getitem__ int tag.TagDict This method is used under the hood when instance[0] is called

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