Skip to content

Commit c3e36de

Browse files
docs(bedrock-agents): fix type in Bedrock operation example (#3948)
Changed Query to Path matching router.
1 parent 152913f commit c3e36de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: examples/event_handler_bedrock_agents/src/customizing_bedrock_api_operations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing_extensions import Annotated
33

44
from aws_lambda_powertools.event_handler import BedrockAgentResolver
5-
from aws_lambda_powertools.event_handler.openapi.params import Body, Query
5+
from aws_lambda_powertools.event_handler.openapi.params import Body, Path
66
from aws_lambda_powertools.utilities.typing import LambdaContext
77

88
app = BedrockAgentResolver()
@@ -22,7 +22,7 @@
2222
tags=["todos"],
2323
)
2424
def get_todo_title(
25-
todo_id: Annotated[int, Query(description="The ID of the TODO item to get the title from")],
25+
todo_id: Annotated[int, Path(description="The ID of the TODO item from which to retrieve the title")],
2626
) -> Annotated[str, Body(description="The TODO title")]:
2727
todo = requests.get(f"https://jsonplaceholder.typicode.com/todos/{todo_id}")
2828
todo.raise_for_status()

0 commit comments

Comments
 (0)