langchain.tools.openapi.utils.api_models.APIRequestBodyProperty¶
- class langchain.tools.openapi.utils.api_models.APIRequestBodyProperty(*, name: str, required: bool, type: Union[str, Type, tuple, None, Enum] = None, default: Optional[Any] = None, description: Optional[str] = None, properties: List[APIRequestBodyProperty], references_used: List[str])[source]¶
Bases:
APIPropertyBaseA 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: Optional[Any] = None¶
The default value of the property.
- param description: Optional[str] = None¶
The description of the property.
- param name: str [Required]¶
The name of the property.
- param properties: List[langchain.tools.openapi.utils.api_models.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: Union[str, Type, tuple, None, enum.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: Optional[List[str]] = None) APIRequestBodyProperty[source]¶
Recursively populate from an OpenAPI Schema.