We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pydantic import BaseModel import pytest from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response def test_openapi_default_response__no_validation(): app = APIGatewayRestResolver() @app.get("/") def handler(): pass schema = app.get_openapi_schema() responses = schema.paths["/"].get.responses assert 422 not in responses if __name__ == "__main__": pytest.main([__file__])
above fails
provided
Add 422 response in APIGatewayResolver (subject to enable_validation=True), not in Route.
APIGatewayResolver
enable_validation=True
Route
run above
latest
3.12
PyPi
The text was updated successfully, but these errors were encountered:
Hey @amin-farjadi! Thanks a lot for opening this issue! Do you want to send a PR to fix this?
Sorry, something went wrong.
Hi @leandrodamascena, yes happy to. Will do
Hey @amin-farjadi! Thanks a lot for opening this issue! Do you want to send a PR to fix this? Hi @leandrodamascena, yes happy to. Will do
Thanks a lot and sorry for the delay in replying! Things are super busy.
amin-farjadi
No branches or pull requests
Expected Behaviour
Current Behaviour
above fails
Code snippet
provided
Possible Solution
Add 422 response in
APIGatewayResolver
(subject toenable_validation=True
), not inRoute
.Steps to Reproduce
run above
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.12
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: