From c3e36de310208d678d11951410b00d7511cc7158 Mon Sep 17 00:00:00 2001 From: Steven Cook Date: Wed, 13 Mar 2024 22:22:55 +1000 Subject: [PATCH] docs(bedrock-agents): fix type in Bedrock operation example (#3948) Changed Query to Path matching router. --- .../src/customizing_bedrock_api_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/event_handler_bedrock_agents/src/customizing_bedrock_api_operations.py b/examples/event_handler_bedrock_agents/src/customizing_bedrock_api_operations.py index 6eb2393b263..5cd4c9d95c4 100644 --- a/examples/event_handler_bedrock_agents/src/customizing_bedrock_api_operations.py +++ b/examples/event_handler_bedrock_agents/src/customizing_bedrock_api_operations.py @@ -2,7 +2,7 @@ from typing_extensions import Annotated from aws_lambda_powertools.event_handler import BedrockAgentResolver -from aws_lambda_powertools.event_handler.openapi.params import Body, Query +from aws_lambda_powertools.event_handler.openapi.params import Body, Path from aws_lambda_powertools.utilities.typing import LambdaContext app = BedrockAgentResolver() @@ -22,7 +22,7 @@ tags=["todos"], ) def get_todo_title( - todo_id: Annotated[int, Query(description="The ID of the TODO item to get the title from")], + todo_id: Annotated[int, Path(description="The ID of the TODO item from which to retrieve the title")], ) -> Annotated[str, Body(description="The TODO title")]: todo = requests.get(f"https://jsonplaceholder.typicode.com/todos/{todo_id}") todo.raise_for_status()