APIProperty#
- class langchain_community.tools.openapi.utils.api_models.APIProperty[source]#
Bases:
APIPropertyBase
A model for a property in the query, path, header, or cookie params.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- param default: Any | None = None#
The default value of the property.
- param description: str | None = None#
The description of the property.
- param location: APIPropertyLocation [Required]#
The path/how itβs being passed to the endpoint.
- param name: str [Required]#
The name of the property.
- param required: bool [Required]#
Whether the property is required.
- param type: SCHEMA_TYPE [Required]#
The type of the property.
Either a primitive type, a component/parameter type, or an array or βobjectβ (dict) of the above.
- classmethod from_parameter(parameter: Parameter, spec: OpenAPISpec) APIProperty [source]#
Instantiate from an OpenAPI Parameter.
- Parameters:
parameter (Parameter)
spec (OpenAPISpec)
- Return type: