attrs¶
- class litestar.plugins.attrs.AttrsSchemaPlugin¶
基类:
OpenAPISchemaPluginProtocol- static is_plugin_supported_type(value: Any) bool¶
Given a value of indeterminate type, determine if this value is supported by the plugin.
- 参数:
value¶ -- An arbitrary value.
- 返回:
A typeguard dictating whether the value is supported by the plugin.
- to_openapi_schema(field_definition: FieldDefinition, schema_creator: SchemaCreator) Schema¶
给定类型注解,将其转换为 OpenAPI 模式类。 Args: field_definition: FieldDefinition 实例。 schema_creator: 模式创建器类的实例。 Returns: 一个
OpenAPI实例。