Expected Behaviour
OpenAPI merge should find resolvers that are type annotated.
Current Behaviour
When you have the following type annotated resolver (code snippet), OpenAPI merge doesn't find it because it only looks for ast.Assign, and not ast.AnnAssign.
Code snippet
app: APIGatewayRestResolver = APIGatewayRestResolver(enable_validation=True)
Possible Solution
See PR I've created shortly after this.
Steps to Reproduce
Try to run test_file_has_resolver_found with an annotated resolver.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.14
Packaging format used
PyPi
Debugging logs
Expected Behaviour
OpenAPI merge should find resolvers that are type annotated.
Current Behaviour
When you have the following type annotated resolver (code snippet), OpenAPI merge doesn't find it because it only looks for ast.Assign, and not ast.AnnAssign.
Code snippet
Possible Solution
See PR I've created shortly after this.
Steps to Reproduce
Try to run
test_file_has_resolver_foundwith an annotated resolver.Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.14
Packaging format used
PyPi
Debugging logs