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][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 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: 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_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:

APIRequestBodyProperty