alma-cdk / openapix

Combine the power of AWS CDK & OpenAPI YAML Schema Definitions
https://constructs.dev/packages/@alma-cdk/openapix/
94 stars 6 forks source link

Method integration validation #20

Open joni3k opened 2 years ago

joni3k commented 2 years ago

If API Gateway is generated from openapi, an integration is required for every method. Currently the error message from AWS is "No integration defined for method (Service: ApiGateway, Status Code: 400, Request ID: xxx), which is not helpful.

For now, at least some kind of validation should happen when generating the integrations. A good-to-have optional feature would be to generate a mock-integration for missing integrations.

aripalo commented 2 years ago

Agreed.

Maybe we could actually extend the mock integration concept and have a defaultIntegration prop where one could assign any kind of supported integration that would be assigned to paths without any integration?

This would tackle 2 different use cases: