openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

Add AWS Api Gateway integration

Open jgroom33 opened this issue 5 years ago • 5 comments

Add an integration similar to django/flask

+---------+    event   +---------+
| API_GW  +----------->+  lambda |
+---------+            +---------+

The event object is structured as here: https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html

Example implementation:

def handler(event, context):

  from openapi_core.validation.request.validators import RequestValidator
  from openapi_core.contrib.aws import ApiGatewayEventOpenAPIRequest

  openapi_request = ApiGatewayEventOpenAPIRequest(event)
  validator = RequestValidator(spec)
  result = validator.validate(openapi_request)

jgroom33 avatar Feb 26 '20 15:02 jgroom33

Hi @jgroom33 , is this, finally, implemented?

jjmmolina avatar Mar 21 '22 17:03 jjmmolina

Yes, I too would like to know if this is completed and if show how to implement. Because I don't see it in the docs or in the code base

paulcruse3 avatar Mar 21 '23 20:03 paulcruse3

I don't use apig+lambda much but I can try to implement this if it's a need for this.

p1c2u avatar Mar 22 '23 06:03 p1c2u

@p1c2u that would be awesome! 🙏🏽

paulcruse3 avatar Mar 22 '23 17:03 paulcruse3

This would be a great addition, but are there any clean workarounds for doing this right now?

alex-cook-finres avatar Feb 23 '24 14:02 alex-cook-finres