Skip to content

Feature: Event handler Swagger doesnt add 422 response to openapi when adding custom responses #3600

Closed
@ran-isenberg

Description

@ran-isenberg

Expected Behaviour

422 is a built in schema that i as a user don't control, i expect it to be there even though I'm adding other responses (501 , 404 etc.).

Current Behaviour

422 is omitted from schema when adding a custom response.
In addition, the 422 schema says there's a msg: string in the schema but in my tests i didnt get that fields, maybe it's optional?

Code snippet

See:
https://github.com/ran-isenberg/aws-lambda-handler-cookbook/pull/784/files#diff-03a550a2c5158da1b1459e42e5799bdfe3809d2563dfb16014d3ea3bcd7cd043R20

Possible Solution

No response

Steps to Reproduce

add the snippet, go to /swagger

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.12

Packaging format used

PyPi

Debugging logs

No response

Metadata

Metadata

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions