langchain_community.tools.openapi.utils.api_models
.APIRequestBody¶
- class langchain_community.tools.openapi.utils.api_models.APIRequestBody[source]¶
Bases:
BaseModel
A model for a request body.
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 description: Optional[str] = None¶
The description of the request body.
- param media_type: str [Required]¶
The media type of the request body.
- param properties: List[APIRequestBodyProperty] [Required]¶
- classmethod from_request_body(request_body: RequestBody, spec: OpenAPISpec) APIRequestBody [source]¶
Instantiate from an OpenAPI RequestBody.
- Parameters
request_body (RequestBody) –
spec (OpenAPISpec) –
- Return type