Skip to content
New issue

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

Method integration validation #20

Open
joni3k opened this issue May 31, 2022 · 1 comment
Open

Method integration validation #20

joni3k opened this issue May 31, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@joni3k
Copy link
Contributor

joni3k commented May 31, 2022

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.

@joni3k joni3k added the enhancement New feature or request label May 31, 2022
@aripalo
Copy link
Contributor

aripalo commented Jun 2, 2022

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:

  • During development one could setup a mock integration for non-implemented methods while building the API setup
  • If all API methods is handled by let's say external HTTP(S) endpoint or a Lambda proxy, then defining only one defaultIntegration would handle everything without having to explicitly define all paths and methods in CDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants