I have the following endpoint:
@router.get('/events/{base_id}')
def asd(base_id: common_input_types.event_id) -> None:
do_something()
And this is common_input_types.event_id
:
event_id = Annotated[
int,
fastapi.Depends(dependency_function),
fastapi.Path(
example=123,
description="Lore",
gt=5,
le=100,
),
]
This does not trigger the dependency function. When I remove the fastapi.Path
part, it works. But then I won’t have the example and the min-max in swagger.
How do I specify both?