OpenAPI models
¶
用于生成和验证生成的OpenAPI的OpenAPI Pydantic模型。
fastapi.openapi.models
¶
SecurityScheme
module-attribute
¶
SecurityScheme = Union[
APIKey, HTTPBase, OAuth2, OpenIdConnect, HTTPBearer
]
BaseModelWithConfig
¶
Contact
¶
Bases: BaseModelWithConfig
License
¶
Bases: BaseModelWithConfig
Info
¶
Bases: BaseModelWithConfig
ServerVariable
¶
Bases: BaseModelWithConfig
Server
¶
Bases: BaseModelWithConfig
Discriminator
¶
XML
¶
Bases: BaseModelWithConfig
ExternalDocumentation
¶
Schema
¶
Bases: BaseModelWithConfig
vocabulary
class-attribute
instance-attribute
¶
vocabulary = Field(default=None, alias='$vocabulary')
dynamicAnchor
class-attribute
instance-attribute
¶
dynamicAnchor = Field(default=None, alias='$dynamicAnchor')
dynamicRef
class-attribute
instance-attribute
¶
dynamicRef = Field(default=None, alias='$dynamicRef')
example
class-attribute
instance-attribute
¶
example = None
Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, although still supported. Use examples instead.
Example
¶
ParameterInType
¶
Encoding
¶
Bases: BaseModelWithConfig
MediaType
¶
Bases: BaseModelWithConfig
ParameterBase
¶
Bases: BaseModelWithConfig
Parameter
¶
Bases: ParameterBase
Header
¶
Bases: ParameterBase
RequestBody
¶
Bases: BaseModelWithConfig
Link
¶
Bases: BaseModelWithConfig
Response
¶
Bases: BaseModelWithConfig
Operation
¶
Bases: BaseModelWithConfig
PathItem
¶
Bases: BaseModelWithConfig
SecuritySchemeType
¶
SecurityBase
¶
Bases: BaseModelWithConfig
APIKeyIn
¶
APIKey
¶
Bases: SecurityBase
HTTPBase
¶
Bases: SecurityBase
OAuthFlow
¶
Bases: BaseModelWithConfig
OAuthFlows
¶
Bases: BaseModelWithConfig
OAuth2
¶
Bases: SecurityBase
OpenIdConnect
¶
Bases: SecurityBase
Components
¶
Bases: BaseModelWithConfig
Tag
¶
Bases: BaseModelWithConfig
OpenAPI
¶
Bases: BaseModelWithConfig