Skip to content

Docs: Syntax for routing rules doesn't seem to be documented anywhere #2962

@johnmreynolds

Description

@johnmreynolds

What were you searching in the docs?

I've been trying to find any documentation on how the routing rules work, but even in the API reference it's just documented as being a 'str'.

https://docs.powertools.aws.dev/lambda/python/latest/api/event_handler/index.html#aws_lambda_powertools.event_handler.ApiGatewayResolver.route

From the tutorials and source code, it looks like this should be a regex, but there is no indication of what regex syntax this follows, or how variable capture works with decorated functions.

For example, the tutorials include things like @app.get("/subscriptions/") which seems to be a curious syntax, and I can't find any documentation on this. Also, it doesn't seem to work for subfolders which is weird.

Is this related to an existing documentation section?

https://docs.powertools.aws.dev/lambda/python/latest/api/event_handler/index.html#aws_lambda_powertools.event_handler.ApiGatewayResolver.route

How can we improve?

Document how the routing rules work somewhere.

Got a suggestion in mind?

No response

Acknowledgment

  • I understand the final update might be different from my proposed suggestion, or refused.

Metadata

Metadata

Assignees

Labels

Projects

Status

Coming soon

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions