Skip to content

Commit

Permalink
docs(bedrock-agents): fix type in Bedrock operation example (#3948)
Browse files Browse the repository at this point in the history
Changed Query to Path matching router.
  • Loading branch information
eldritchideen authored Mar 13, 2024
1 parent 152913f commit c3e36de
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit c3e36de

Please sign in to comment.