failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(timeout) · 27 tool calls · 0 s · fastapi/fastapi
✨ Add support for `@app.vibe()` ✨ Add support for `@app.vibe()`
| # | Tool | Arguments | Result |
|---|---|---|---|
| 1 | run_command | {
"command": "grep -rn \"vibe\" ."
} | {"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "", "exit_code": 1}}full{"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "", "exit_code": 1}} |
| 2 | run_command | {
"command": "grep -rn \"get\" fastapi/applications.py | head -20"
} | {"status": "ok", "stdout": "17: get_redoc_html,\n18: get_swagger_ui_html,\n19: get_swagger_ui_oauth2_redirect_html,\n21:from fastapi.openapi.utils import get_opfull{"status": "ok", "stdout": "17: get_redoc_html,\n18: get_swagger_ui_html,\n19: get_swagger_ui_oauth2_redirect_html,\n21:from fastapi.openapi.utils import get_openapi\n90: like `app.get()`, `app.post()`, etc.\n228: * `@app.get(\"/users/\", tags=[\"users\"])`\n229: * `@app.get(\"/items/\", tags=[\"items\"])`\n247: * `description`: A short description of the target documentation.\n250: * `url`: The URL for the target documentation. Value MUST be in\n285: A `list` of `dict`s with connectivity information to a target server.\n302: * `url`: A URL to the target host. This URL supports Server Variables\n386: @app.get(\"/items/\")\n1083: self.openapi_schema = get_openapi(\n1105: root_path = req.scope.get(\"root_path\", \"\").rstrip(\"/\")\n1108: server_urls = {s.get(\"url\") for s in schema.get(\"servers\", [])}\n1111: schema[\"servers\"] = [{\"url\": root_path}] + schema.get(\n1120: root_path = req.scope.get(\"root_path\", \"\").rstrip(\"/\")\n1125: return get_swagger_ui_html(\n1138: return get_swagger_ui_oauth2_redirect_html()\n1148: root_path = req.scope.get(\"root_path\", \"\").rstrip(\"/\")\n", "exit_code": 0} |
| 3 | read_file | {
"filepath": "fastapi/applications.py",
"start_line": 1,
"end_line": 100
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": "from collections.abc import Awaitable, Callable, Coroutine, Sequence\nfrom enum import Enum\full{"status": "ok", "filepath": "fastapi/applications.py", "content": "from collections.abc import Awaitable, Callable, Coroutine, Sequence\nfrom enum import Enum\nfrom typing import Annotated, Any, TypeVar\n\nfrom annotated_doc import Doc\nfrom fastapi import routing\nfrom fastapi.datastructures import Default, DefaultPlaceholder\nfrom fastapi.exception_handlers import (\n http_exception_handler,\n request_validation_exception_handler,\n websocket_request_validation_exception_handler,\n)\nfrom fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError\nfrom fastapi.logger import logger\nfrom fastapi.middleware.asyncexitstack import AsyncExitStackMiddleware\nfrom fastapi.openapi.docs import (\n get_redoc_html,\n get_swagger_ui_html,\n get_swagger_ui_oauth2_redirect_html,\n)\nfrom fastapi.openapi.utils import get_openapi\nfrom fastapi.params import Depends\nfrom fastapi.types import DecoratedCallable, IncEx\nfrom fastapi.utils import generate_unique_id\nfrom starlette.applications import Starlette\nfrom starlette.datastructures import State\nfrom starlette.exceptions import HTTPException\nfrom starlette.middleware import Middleware\nfrom starlette.middleware.base import BaseHTTPMiddleware\nfrom starlette.middleware.errors import ServerErrorMiddleware\nfrom starlette.middleware.exceptions import ExceptionMiddleware\nfrom starlette.requests import Request\nfrom starlette.responses import HTMLResponse, JSONResponse, Response\nfrom starlette.routing import BaseRoute\nfrom starlette.types import ASGIApp, ExceptionHandler, Lifespan, Receive, Scope, Send\nfrom typing_extensions import deprecated\n\nAppType = TypeVar(\"AppType\", bound=\"FastAPI\")\n\n\nclass FastAPI(Starlette):\n \"\"\"\n `FastAPI` app class, the main entrypoint to use FastAPI.\n\n Read more in the\n [FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/).\n\n ## Example\n\n ```python\n from fastapi import FastAPI\n\n a |
| 4 | run_command | {
"command": "grep -n \"def get(\" fastapi/applications.py"
} | {"status": "ok", "stdout": "1563: def get(\n", "exit_code": 0}full{"status": "ok", "stdout": "1563: def get(\n", "exit_code": 0} |
| 5 | read_file | {
"end_line": 1600,
"filepath": "fastapi/applications.py",
"start_line": 1550
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " self.router.include_router(\n router,\n prefix=prefix,\n tags=tags,\n dependencies=dependenfull{"status": "ok", "filepath": "fastapi/applications.py", "content": " self.router.include_router(\n router,\n prefix=prefix,\n tags=tags,\n dependencies=dependencies,\n responses=responses,\n deprecated=deprecated,\n include_in_schema=include_in_schema,\n default_response_class=default_response_class,\n callbacks=callbacks,\n generate_unique_id_function=generate_unique_id_function,\n )\n\n def get(\n self,\n path: Annotated[\n str,\n Doc(\n \"\"\"\n The URL path to be used for this *path operation*.\n\n For example, in `http://example.com/items`, the path is `/items`.\n \"\"\"\n ),\n ],\n *,\n response_model: Annotated[\n Any,\n Doc(\n \"\"\"\n The type to use for the response.\n\n It could be any valid Pydantic *field* type. So, it doesn't have to\n be a Pydantic model, it could be other things, like a `list`, `dict`,\n etc.\n\n It will be used for:\n\n * Documentation: the generated OpenAPI (and the UI at `/docs`) will\n show it as the response (JSON Schema).\n * Serialization: you could return an arbitrary object and the\n `response_model` would be used to serialize that object into the\n corresponding JSON.\n * Filtering: the JSON sent to the client will only contain the data\n (fields) defined in the `response_model`. If you returned an object\n that contains an attribute `password` but the `response_model` does\n not include that field, the JSON sent to the client would not have\n that `password`.\n * Validation |
| 6 | read_file | {
"end_line": 1750,
"filepath": "fastapi/applications.py",
"start_line": 1601
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " valid, that would mean a violation of the contract with the client,\n so it's an error fromfull{"status": "ok", "filepath": "fastapi/applications.py", "content": " valid, that would mean a violation of the contract with the client,\n so it's an error from the API developer. So, FastAPI will raise an\n error and return a 500 error code (Internal Server Error).\n\n Read more about it in the\n [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).\n \"\"\"\n ),\n ] = Default(None),\n status_code: Annotated[\n int | None,\n Doc(\n \"\"\"\n The default status code to be used for the response.\n\n You could override the status code by returning a response directly.\n\n Read more about it in the\n [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).\n \"\"\"\n ),\n ] = None,\n tags: Annotated[\n list[str | Enum] | None,\n Doc(\n \"\"\"\n A list of tags to be applied to the *path operation*.\n\n It will be added to the generated OpenAPI (e.g. visible at `/docs`).\n\n Read more about it in the\n [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).\n \"\"\"\n ),\n ] = None,\n dependencies: Annotated[\n Sequence[Depends] | None,\n Doc(\n \"\"\"\n A list of dependencies (using `Depends()`) to be applied to the\n *path operation*.\n\n Read more about it in the\n [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).\n |
| 7 | read_file | {
"end_line": 1850,
"filepath": "fastapi/applications.py",
"start_line": 1751
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " ),\n ] = None,\n response_model_by_alias: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuratiofull{"status": "ok", "filepath": "fastapi/applications.py", "content": " ),\n ] = None,\n response_model_by_alias: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pydantic to define if the response model\n should be serialized by alias when an alias is used.\n\n Read more about it in the\n [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).\n \"\"\"\n ),\n ] = True,\n response_model_exclude_unset: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pydantic to define if the response data\n should have all the fields, including the ones that were not set and\n have their default values. This is different from\n `response_model_exclude_defaults` in that if the fields are set,\n they will be included in the response, even if the value is the same\n as the default.\n\n When `True`, default values are omitted from the response.\n\n Read more about it in the\n [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).\n \"\"\"\n ),\n ] = False,\n response_model_exclude_defaults: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pydantic to define if the response data\n should have all the fields, including the ones that have the same value\n as the default. This is different from `response_model_exclude_unset`\n in that if the fields are set but contain the same default values,\n |
| 8 | read_file | {
"end_line": 1900,
"filepath": "fastapi/applications.py",
"start_line": 1851
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " callbacks: Annotated[\n list[BaseRoute] | None,\n Doc(\n \"\"\"\n List of *path operations*full{"status": "ok", "filepath": "fastapi/applications.py", "content": " callbacks: Annotated[\n list[BaseRoute] | None,\n Doc(\n \"\"\"\n List of *path operations* that will be used as OpenAPI callbacks.\n\n This is only for OpenAPI documentation, the callbacks won't be used\n directly.\n\n It will be added to the generated OpenAPI (e.g. visible at `/docs`).\n\n Read more about it in the\n [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).\n \"\"\"\n ),\n ] = None,\n openapi_extra: Annotated[\n dict[str, Any] | None,\n Doc(\n \"\"\"\n Extra metadata to be included in the OpenAPI schema for this *path\n operation*.\n\n Read more about it in the\n [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).\n \"\"\"\n ),\n ] = None,\n generate_unique_id_function: Annotated[\n Callable[[routing.APIRoute], str],\n Doc(\n \"\"\"\n Customize the function used to generate unique IDs for the *path\n operations* shown in the generated OpenAPI.\n\n This is particularly useful when automatically generating clients or\n SDKs for your API.\n\n Read more about it in the\n [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).\n \"\"\"\n ),\n ] = Default(generate_unique_id),\n ) -> Callable[[DecoratedCallable], DecoratedCallable]:\n \"\"\"\n Add a *path operation* using |
| 9 | read_file | {
"end_line": 1950,
"filepath": "fastapi/applications.py",
"start_line": 1901
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " from fastapi import FastAPI\n\n app = FastAPI()\n\n @app.get(\"/items/\")\n def read_items(full{"status": "ok", "filepath": "fastapi/applications.py", "content": " from fastapi import FastAPI\n\n app = FastAPI()\n\n @app.get(\"/items/\")\n def read_items():\n return [{\"name\": \"Empanada\"}, {\"name\": \"Arepa\"}]\n ```\n \"\"\"\n return self.router.get(\n path,\n response_model=response_model,\n status_code=status_code,\n tags=tags,\n dependencies=dependencies,\n summary=summary,\n description=description,\n response_description=response_description,\n responses=responses,\n deprecated=deprecated,\n operation_id=operation_id,\n response_model_include=response_model_include,\n response_model_exclude=response_model_exclude,\n response_model_by_alias=response_model_by_alias,\n response_model_exclude_unset=response_model_exclude_unset,\n response_model_exclude_defaults=response_model_exclude_defaults,\n response_model_exclude_none=response_model_exclude_none,\n include_in_schema=include_in_schema,\n response_class=response_class,\n name=name,\n callbacks=callbacks,\n openapi_extra=openapi_extra,\n generate_unique_id_function=generate_unique_id_function,\n )\n\n def put(\n self,\n path: Annotated[\n str,\n Doc(\n \"\"\"\n The URL path to be used for this *path operation*.\n\n For example, in `http://example.com/items`, the path is `/items`.\n \"\"\"\n ),\n ],\n *,\n response_model: Annotated[\n Any,\n", "start_line": 1901, "end_line": 1950, "total_lines": 4691, "is_truncated": false} |
| 10 | run_command | {
"command": "grep -n \"def post(\" fastapi/applications.py"
} | {"status": "ok", "stdout": "2314: def post(\n", "exit_code": 0}full{"status": "ok", "stdout": "2314: def post(\n", "exit_code": 0} |
| 11 | run_command | {
"command": "grep -n \"def vibe(\" fastapi/applications.py"
} | {"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "", "exit_code": 1}}full{"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "", "exit_code": 1}} |
| 12 | run_command | {
"command": "python3 -c \"from fastapi import FastAPI; app = FastAPI(); @app.vibe('/test')\\ndef test(): return {'vibe': 'yes'}; print('Success')\""
} | {"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": " File \"<string>\", lfull{"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": " File \"<string>\", line 1\n from fastapi import FastAPI; app = FastAPI(); @app.vibe('/test')\\ndef test(): return {'vibe': 'yes'}; print('Success')\n ^\nSyntaxError: invalid syntax\n", "exit_code": 1}} |
| 13 | run_command | {
"command": "python3 -c \"from fastapi import FastAPI; app = FastAPI(); \ndef test(): return {'vibe': 'yes'}\napp.vibe('/test')(test)\nprint('Success')\""
} | {"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "Traceback (most recenfull{"status": "error", "error_type": "CommandError", "error_message": "Command failed with exit code 1", "details": {"stdout": "", "stderr": "Traceback (most recent call last):\n File \"<string>\", line 3, in <module>\n app.vibe('/test')(test)\n ^^^^^^^^\nAttributeError: 'FastAPI' object has no attribute 'vibe'\n", "exit_code": 1}} |
| 14 | run_command | {
"command": "grep -n \"def get(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "1831: def get(\n", "exit_code": 0}full{"status": "ok", "stdout": "1831: def get(\n", "exit_code": 0} |
| 15 | read_file | {
"end_line": 1900,
"filepath": "fastapi/routing.py",
"start_line": 1800
} | {"status": "ok", "filepath": "fastapi/routing.py", "content": " prefix + route.path,\n route.endpoint,\n methods=methods,\n include_in_schema=route.include_in_sfull{"status": "ok", "filepath": "fastapi/routing.py", "content": " prefix + route.path,\n route.endpoint,\n methods=methods,\n include_in_schema=route.include_in_schema,\n name=route.name,\n )\n elif isinstance(route, APIWebSocketRoute):\n current_dependencies = []\n if dependencies:\n current_dependencies.extend(dependencies)\n if route.dependencies:\n current_dependencies.extend(route.dependencies)\n self.add_api_websocket_route(\n prefix + route.path,\n route.endpoint,\n dependencies=current_dependencies,\n name=route.name,\n )\n elif isinstance(route, routing.WebSocketRoute):\n self.add_websocket_route(\n prefix + route.path, route.endpoint, name=route.name\n )\n for handler in router.on_startup:\n self.add_event_handler(\"startup\", handler)\n for handler in router.on_shutdown:\n self.add_event_handler(\"shutdown\", handler)\n self.lifespan_context = _merge_lifespan_context(\n self.lifespan_context,\n router.lifespan_context,\n )\n\n def get(\n self,\n path: Annotated[\n str,\n Doc(\n \"\"\"\n The URL path to be used for this *path operation*.\n\n For example, in `http://example.com/items`, the path is `/items`.\n \"\"\"\n ),\n ],\n *,\n response_model: Annotated[\n Any,\n Doc(\n \"\"\"\n The type to use for the response.\n\n It could be any valid Pydantic *field* type. So, it doesn't have to\n be a Pydantic model, it cou |
| 16 | run_command | {
"command": "grep -n \"def get(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "1831: def get(\n", "exit_code": 0}full{"status": "ok", "stdout": "1831: def get(\n", "exit_code": 0} |
| 17 | read_file | {
"end_line": 2050,
"filepath": "fastapi/routing.py",
"start_line": 1901
} | {"status": "ok", "filepath": "fastapi/routing.py", "content": " \"\"\"\n ),\n ] = None,\n dependencies: Annotated[\n Sequence[params.Depends] | None,\n Doc(\n \full{"status": "ok", "filepath": "fastapi/routing.py", "content": " \"\"\"\n ),\n ] = None,\n dependencies: Annotated[\n Sequence[params.Depends] | None,\n Doc(\n \"\"\"\n A list of dependencies (using `Depends()`) to be applied to the\n *path operation*.\n\n Read more about it in the\n [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).\n \"\"\"\n ),\n ] = None,\n summary: Annotated[\n str | None,\n Doc(\n \"\"\"\n A summary for the *path operation*.\n\n It will be added to the generated OpenAPI (e.g. visible at `/docs`).\n\n Read more about it in the\n [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).\n \"\"\"\n ),\n ] = None,\n description: Annotated[\n str | None,\n Doc(\n \"\"\"\n A description for the *path operation*.\n\n If not provided, it will be extracted automatically from the docstring\n of the *path operation function*.\n\n It can contain Markdown.\n\n It will be added to the generated OpenAPI (e.g. visible at `/docs`).\n\n Read more about it in the\n [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).\n \"\"\"\n ),\n ] = None,\n response_description: Annotated[\n str,\n Doc(\n \"\"\"\n The description for the default response.\n\n It will be added to the generated Open |
| 18 | read_file | {
"end_line": 2150,
"filepath": "fastapi/routing.py",
"start_line": 2051
} | {"status": "ok", "filepath": "fastapi/routing.py", "content": " response_model_exclude_defaults: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pyfull{"status": "ok", "filepath": "fastapi/routing.py", "content": " response_model_exclude_defaults: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pydantic to define if the response data\n should have all the fields, including the ones that have the same value\n as the default. This is different from `response_model_exclude_unset`\n in that if the fields are set but contain the same default values,\n they will be excluded from the response.\n\n When `True`, default values are omitted from the response.\n\n Read more about it in the\n [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).\n \"\"\"\n ),\n ] = False,\n response_model_exclude_none: Annotated[\n bool,\n Doc(\n \"\"\"\n Configuration passed to Pydantic to define if the response data should\n exclude fields set to `None`.\n\n This is much simpler (less smart) than `response_model_exclude_unset`\n and `response_model_exclude_defaults`. You probably want to use one of\n those two instead of this one, as those allow returning `None` values\n when it makes sense.\n\n Read more about it in the\n [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).\n \"\"\"\n ),\n ] = False,\n include_in_schema: Annotated[\n bool,\n Doc(\n \"\"\"\n Include this *path operation* in the generated OpenAPI schema.\n\n This affects the generated OpenAPI (e.g. visible at `/docs`).\n\n |
| 19 | read_file | {
"end_line": 2200,
"filepath": "fastapi/routing.py",
"start_line": 2151
} | {"status": "ok", "filepath": "fastapi/routing.py", "content": " Customize the function used to generate unique IDs for the *path\n operations* shown in the genefull{"status": "ok", "filepath": "fastapi/routing.py", "content": " Customize the function used to generate unique IDs for the *path\n operations* shown in the generated OpenAPI.\n\n This is particularly useful when automatically generating clients or\n SDKs for your API.\n\n Read more about it in the\n [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).\n \"\"\"\n ),\n ] = Default(generate_unique_id),\n ) -> Callable[[DecoratedCallable], DecoratedCallable]:\n \"\"\"\n Add a *path operation* using an HTTP GET operation.\n\n ## Example\n\n ```python\n from fastapi import APIRouter, FastAPI\n\n app = FastAPI()\n router = APIRouter()\n\n @router.get(\"/items/\")\n def read_items():\n return [{\"name\": \"Empanada\"}, {\"name\": \"Arepa\"}]\n\n app.include_router(router)\n ```\n \"\"\"\n return self.api_route(\n path=path,\n response_model=response_model,\n status_code=status_code,\n tags=tags,\n dependencies=dependencies,\n summary=summary,\n description=description,\n response_description=response_description,\n responses=responses,\n deprecated=deprecated,\n methods=[\"GET\"],\n operation_id=operation_id,\n response_model_include=response_model_include,\n response_model_exclude=response_model_exclude,\n response_model_by_alias=response_model_by_alias,\n response_model_exclude_unset=response_model_exclude_unset,\n response_model_exclude_defaults=response_model_exclude_defaults,\n response_model_exclude_none=response_model_exclude_none,\n include_in_schema=inc |
| 20 | run_command | {
"command": "grep -n \"def post(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "2590: def post(\n", "exit_code": 0}full{"status": "ok", "stdout": "2590: def post(\n", "exit_code": 0} |
| 21 | run_command | {
"command": "grep -n \"def put(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "2208: def put(\n", "exit_code": 0}full{"status": "ok", "stdout": "2208: def put(\n", "exit_code": 0} |
| 22 | run_command | {
"command": "grep -n \"def delete(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "2972: def delete(\n", "exit_code": 0}full{"status": "ok", "stdout": "2972: def delete(\n", "exit_code": 0} |
| 23 | run_command | {
"command": "grep -n \"def patch(\" fastapi/routing.py"
} | {"status": "ok", "stdout": "4108: def patch(\n", "exit_code": 0}full{"status": "ok", "stdout": "4108: def patch(\n", "exit_code": 0} |
| 24-25 ×2 | run_command | {
"command": "grep -n \"class APIRouter\" fastapi/routing.py"
} | {"status": "ok", "stdout": "1005:class APIRouter(routing.Router):\n", "exit_code": 0}full{"status": "ok", "stdout": "1005:class APIRouter(routing.Router):\n", "exit_code": 0} |
| 26 | read_file | {
"end_line": 1850,
"filepath": "fastapi/applications.py",
"start_line": 1830
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " response_class: Annotated[\n type[Response],\n Doc(\n \"\"\"\n Response class to be used fofull{"status": "ok", "filepath": "fastapi/applications.py", "content": " response_class: Annotated[\n type[Response],\n Doc(\n \"\"\"\n Response class to be used for this *path operation*.\n\n This will not be used if you return a response directly.\n\n Read more about it in the\n [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).\n \"\"\"\n ),\n ] = Default(JSONResponse),\n name: Annotated[\n str | None,\n Doc(\n \"\"\"\n Name for this *path operation*. Only used internally.\n \"\"\"\n ),\n ] = None,\n", "start_line": 1830, "end_line": 1850, "total_lines": 4691, "is_truncated": false} |
| 27 | read_file | {
"end_line": 1950,
"filepath": "fastapi/applications.py",
"start_line": 1550
} | {"status": "ok", "filepath": "fastapi/applications.py", "content": " self.router.include_router(\n router,\n prefix=prefix,\n tags=tags,\n dependencies=dependenfull{"status": "ok", "filepath": "fastapi/applications.py", "content": " self.router.include_router(\n router,\n prefix=prefix,\n tags=tags,\n dependencies=dependencies,\n responses=responses,\n deprecated=deprecated,\n include_in_schema=include_in_schema,\n default_response_class=default_response_class,\n callbacks=callbacks,\n generate_unique_id_function=generate_unique_id_function,\n )\n\n def get(\n self,\n path: Annotated[\n str,\n Doc(\n \"\"\"\n The URL path to be used for this *path operation*.\n\n For example, in `http://example.com/items`, the path is `/items`.\n \"\"\"\n ),\n ],\n *,\n response_model: Annotated[\n Any,\n Doc(\n \"\"\"\n The type to use for the response.\n\n It could be any valid Pydantic *field* type. So, it doesn't have to\n be a Pydantic model, it could be other things, like a `list`, `dict`,\n etc.\n\n It will be used for:\n\n * Documentation: the generated OpenAPI (and the UI at `/docs`) will\n show it as the response (JSON Schema).\n * Serialization: you could return an arbitrary object and the\n `response_model` would be used to serialize that object into the\n corresponding JSON.\n * Filtering: the JSON sent to the client will only contain the data\n (fields) defined in the `response_model`. If you returned an object\n that contains an attribute `password` but the `response_model` does\n not include that field, the JSON sent to the client would not have\n that `password`.\n * Validation |