Spaces:
Running
Running
Jeremiah Lowin Copilot commited on
Update src/fastmcp/utilities/openapi.py
Browse filesCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/fastmcp/utilities/openapi.py
CHANGED
|
@@ -1004,7 +1004,22 @@ def format_description_with_responses(
|
|
| 1004 |
parameters: list[openapi.ParameterInfo] | None = None, # Add parameters parameter
|
| 1005 |
request_body: openapi.RequestBodyInfo | None = None, # Add request_body parameter
|
| 1006 |
) -> str:
|
| 1007 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1008 |
desc_parts = [base_description]
|
| 1009 |
|
| 1010 |
# Add parameter information
|
|
|
|
| 1004 |
parameters: list[openapi.ParameterInfo] | None = None, # Add parameters parameter
|
| 1005 |
request_body: openapi.RequestBodyInfo | None = None, # Add request_body parameter
|
| 1006 |
) -> str:
|
| 1007 |
+
"""
|
| 1008 |
+
Formats the base description string with response, parameter, and request body information.
|
| 1009 |
+
|
| 1010 |
+
Args:
|
| 1011 |
+
base_description (str): The initial description to be formatted.
|
| 1012 |
+
responses (dict[str, Any]): A dictionary of response information, keyed by status code.
|
| 1013 |
+
parameters (list[openapi.ParameterInfo] | None, optional): A list of parameter information,
|
| 1014 |
+
including path and query parameters. Each parameter includes details such as name,
|
| 1015 |
+
location, whether it is required, and a description.
|
| 1016 |
+
request_body (openapi.RequestBodyInfo | None, optional): Information about the request body,
|
| 1017 |
+
including its description, whether it is required, and its content schema.
|
| 1018 |
+
|
| 1019 |
+
Returns:
|
| 1020 |
+
str: The formatted description string with additional details about responses, parameters,
|
| 1021 |
+
and the request body.
|
| 1022 |
+
"""
|
| 1023 |
desc_parts = [base_description]
|
| 1024 |
|
| 1025 |
# Add parameter information
|