APIRequestBodyProperty#
- class langchain_community.tools.openapi.utils.api_models.APIRequestBodyProperty[source]#
Bases:
APIPropertyBase
A model for a request body property.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param default: Any | None = None#
The default value of the property.
- param description: str | None = None#
The description of the property.
- param name: str [Required]#
The name of the property.
- param properties: List[APIRequestBodyProperty] [Required]#
The sub-properties of the property.
- param references_used: List[str] [Required]#
The references used by the property.
- param required: bool [Required]#
Whether the property is required.
- param type: str | Type | tuple | None | Enum = None#
The type of the property.
Either a primitive type, a component/parameter type, or an array or ‘object’ (dict) of the above.
- classmethod from_schema(schema: Schema, name: str, required: bool, spec: OpenAPISpec, references_used: List[str] | None = None) APIRequestBodyProperty [source]#
Recursively populate from an OpenAPI Schema.
- Parameters:
schema (Schema) –
name (str) –
required (bool) –
spec (OpenAPISpec) –
references_used (Optional[List[str]]) –
- Return type: