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

Latest commit

 

History

History
51 lines (43 loc) · 2.88 KB

File metadata and controls

51 lines (43 loc) · 2.88 KB

Name

petstore_api.components.schema.name

type: schemas.Schema

Description

Model for testing model name same as property name

validate method

Input Type Return Type Notes
NameDictInput, NameDict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader NameDict, str, float, int, bool, None, tuple, bytes, io.FileIO

NameDictInput

type: typing.Mapping[str, schemas.INPUT_TYPES_ALL]
Key Type Description Notes
name int value must be a 32 bit integer
snake_case int [optional] value must be a 32 bit integer
property str this is a reserved python keyword [optional]
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]

NameDict

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

__new__ method

Keyword Argument Type Description Notes
name int value must be a 32 bit integer
snake_case int, schemas.Unset [optional] value must be a 32 bit integer
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 Model for testing model name same as property name [optional] typed value is accessed with the get_additional_property_ method

properties

Property Type Description Notes
name int value must be a 32 bit integer
snake_case int, schemas.Unset [optional] value must be a 32 bit integer

methods

Method Input Type Return Type Notes
from_dict_ NameDictInput, NameDict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader NameDict, str, float, int, bool, None, tuple, bytes, io.FileIO a constructor
__getitem__ str schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO This model has invalid python names so this method is used under the hood when you access instance["property"],
get_additional_property_ str schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset provides type safety for additional properties

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