English / 日本語
An example CDK stack for @codemonger-io/cdk-rest-api-with-spec.
This CDK stack was initialized with the following command,
cdk init --language typescriptThe CDK version is 2.
You have to install Node.js. v18.x should work.
Example,
export AWS_PROFILE=kikuo-jpExample,
TOOLKIT_STACK_NAME=api-with-spec-example-toolkitExample,
TOOLKIT_QUALIFIER=apispc2022pnpm cdk bootstrap --toolkit-stack-name $TOOLKIT_STACK_NAME --qualifier $TOOLKIT_QUALIFIERpnpm cdk synth -c "@aws-cdk/core:bootstrapQualifier=$TOOLKIT_QUALIFIER"You will find the OpenAPI definition created or updated in the file openapi/openapi.json.
pnpm cdk deploy --toolkit-stack-name $TOOLKIT_STACK_NAME -c "@aws-cdk/core:bootstrapQualifier=$TOOLKIT_QUALIFIER"You will find a CloudFormation stack api-with-spec-example created or updated.
You will also find the OpenAPI definition created or updated in the file openapi/openapi.json.