@softchef/cdk-apigateways
v2.0.5
Published
This is a AWS CDK construct package. To mix multiple RestApi/HttpApi endpoints to CloudFront distribution(CDN). Also generate documentation page with your Swagger/OpenAPI definitions.
Downloads
8
Maintainers
Readme
AWS CDK with API Gateway(s) & CloudFront(CDN)
cdk-apigateways
is an AWS CDK construct. It's help to mix multiple RestApi
or HttpApi
(API Gateway) or RestApi
(@softchef/cdk-restapi) to the same CloudFront distribution. If you have provide the Swagger 2.0
/ Open API 3.0
/ Open API 3.1
definitions file, it will generate documentation website in the same distribution.
Installation
NPM
npm install @softchef/cdk-apigateways
Yarn
yarn add @softchef/cdk-apigateways
Example
const apis = new ApiGateways(this, 'ApiGateways', {
stageName: 'prod',
originApisConfig: {
books: {
originApi: booksApi,
},
articles: {
originApi: articlesApi,
},
},
distribution: {
comment: 'ApiGateways',
},
documentation: {
s3Bucket: docBucket,
file: './docs/swagger.yaml',
},
});
Todo List
- Add architecture diagram
- Add about Redoc
License
This code is licensed under the Apache License 2.0. See the LICENSE file.