Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-apigateway

Package Overview
Dependencies
Maintainers
5
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-apigateway - npm Package Compare versions

Comparing version 0.39.0 to 1.0.0

36

package.json
{
"name": "@aws-cdk/aws-apigateway",
"version": "0.39.0",
"version": "1.0.0",
"description": "The CDK Construct Library for AWS::ApiGateway",

@@ -71,23 +71,23 @@ "main": "lib/index.js",

"devDependencies": {
"@aws-cdk/assert": "^0.39.0",
"@aws-cdk/aws-ec2": "^0.39.0",
"cdk-build-tools": "^0.39.0",
"cdk-integ-tools": "^0.39.0",
"cfn2ts": "^0.39.0",
"pkglint": "^0.39.0"
"@aws-cdk/assert": "^1.0.0",
"@aws-cdk/aws-ec2": "^1.0.0",
"cdk-build-tools": "^1.0.0",
"cdk-integ-tools": "^1.0.0",
"cfn2ts": "^1.0.0",
"pkglint": "^1.0.0"
},
"dependencies": {
"@aws-cdk/aws-certificatemanager": "^0.39.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^0.39.0",
"@aws-cdk/aws-iam": "^0.39.0",
"@aws-cdk/aws-lambda": "^0.39.0",
"@aws-cdk/core": "^0.39.0"
"@aws-cdk/aws-certificatemanager": "^1.0.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.0.0",
"@aws-cdk/aws-iam": "^1.0.0",
"@aws-cdk/aws-lambda": "^1.0.0",
"@aws-cdk/core": "^1.0.0"
},
"homepage": "https://github.com/awslabs/aws-cdk",
"peerDependencies": {
"@aws-cdk/aws-certificatemanager": "^0.39.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^0.39.0",
"@aws-cdk/aws-iam": "^0.39.0",
"@aws-cdk/aws-lambda": "^0.39.0",
"@aws-cdk/core": "^0.39.0"
"@aws-cdk/aws-certificatemanager": "^1.0.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.0.0",
"@aws-cdk/aws-iam": "^1.0.0",
"@aws-cdk/aws-lambda": "^1.0.0",
"@aws-cdk/core": "^1.0.0"
},

@@ -116,2 +116,2 @@ "engines": {

"stability": "stable"
}
}

@@ -8,4 +8,2 @@ ## Amazon API Gateway Construct Library

> **This is a _developer preview_ (public beta) module. Releases might lack important features and might have
> future breaking changes.**

@@ -105,3 +103,3 @@ ---

const getBookIntegration = new apigateway.LambdaIntegration(getBookHandler, {
contentHandling: apigateway.ContentHandling.ConvertToText, // convert to base64
contentHandling: apigateway.ContentHandling.CONVERT_TO_TEXT, // convert to base64
credentialsPassthrough: true, // use caller identity to invoke the function

@@ -124,3 +122,3 @@ });

const hello = new lambda.Function(this, 'hello', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'hello.handler',

@@ -164,3 +162,3 @@ code: lambda.Code.asset('lambda')

const hello = new lambda.Function(this, 'hello', {
runtime: lambda.Runtime.Nodejs10x,
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'hello.handler',

@@ -184,3 +182,3 @@ code: lambda.Code.asset('lambda')

// @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/request-response-data-mappings.html
"integration.request.querystring.who": "method.request.querystring.who"
'integration.request.querystring.who': 'method.request.querystring.who'
},

@@ -192,6 +190,6 @@ allowTestInvoke: true,

// Check: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
"application/json": '{ "action": "sayHello", "pollId": "$util.escapeJavaScript($input.params(\'who\'))" }'
'application/json': JSON.stringify({ action: 'sayHello', pollId: "$util.escapeJavaScript($input.params('who'))" })
},
// This parameter defines the behavior of the engine is no suitable response template is found
passthroughBehavior: PassthroughBehavior.Never,
passthroughBehavior: PassthroughBehavior.NEVER,
integrationResponses: [

@@ -206,3 +204,3 @@ {

// Check https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
"application/json": '{ "state": "ok", "greeting": "$util.escapeJavaScript($input.body)" }'
'application/json': JSON.stringify({ state: 'ok', greeting: '$util.escapeJavaScript($input.body)' })
},

@@ -224,3 +222,3 @@ responseParameters: {

responseTemplates: {
"application/json": '{ "state": "error", "message": "$util.escapeJavaScript($input.path(\'$.errorMessage\'))" }'
'application/json': JSON.stringify({ state: 'error', message: "$util.escapeJavaScript($input.path('$.errorMessage'))" })
},

@@ -238,3 +236,3 @@ responseParameters: {

You can define validation models for your responses (and requests)
You can define models for your responses (and requests)

@@ -244,5 +242,5 @@ ```ts

const responseModel = api.addModel('ResponseModel', {
contentType: "application/json",
contentType: 'application/json',
modelName: 'ResponseModel',
schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "pollResponse", "type": "object", "properties": { "state": { "type": "string" }, "greeting": { "type": "string" } } }
schema: { '$schema': 'http://json-schema.org/draft-04/schema#', 'title': 'pollResponse', 'type': 'object', 'properties': { 'state': { 'type': 'string' }, 'greeting': { 'type': 'string' } } }
});

@@ -252,5 +250,5 @@

const errorResponseModel = api.addModel('ErrorResponseModel', {
contentType: "application/json",
contentType: 'application/json',
modelName: 'ErrorResponseModel',
schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "errorResponse", "type": "object", "properties": { "state": { "type": "string" }, "message": { "type": "string" } } }
schema: { '$schema': 'http://json-schema.org/draft-04/schema#', 'title': 'errorResponse', 'type': 'object', 'properties': { 'state': { 'type': 'string' }, 'message': { 'type': 'string' } } }
});

@@ -271,3 +269,3 @@

requestParameters: {
"method.request.querystring.who": true
'method.request.querystring.who': true
},

@@ -279,3 +277,3 @@ // We need to set the validator for ensuring they are passed

// Successful response from the integration
statusCode: "200",
statusCode: '200',
// Define what parameters are allowed or not

@@ -289,3 +287,3 @@ responseParameters: {

responseModels: {
"application/json": responseModel
'application/json': responseModel
}

@@ -295,3 +293,3 @@ },

// Same thing for the error responses
statusCode: "400",
statusCode: '400',
responseParameters: {

@@ -303,3 +301,3 @@ 'method.response.header.Content-Type': true,

responseModels: {
"application/json": errorResponseModel
'application/json': errorResponseModel
}

@@ -388,3 +386,3 @@ }

deployOptions: {
loggingLevel: apigateway.MethodLoggingLevel.Info,
loggingLevel: apigateway.MethodLoggingLevel.INFO,
dataTraceEnabled: true

@@ -432,3 +430,7 @@ }

To route domain traffic to an API Gateway API, use Amazon Route 53 to create an alias record. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com. (You can create CNAME records only for subdomains.)
To route domain traffic to an API Gateway API, use Amazon Route 53 to create an
alias record. An alias record is a Route 53 extension to DNS. It's similar to a
CNAME record, but you can create an alias record both for the root domain, such
as `example.com`, and for subdomains, such as `www.example.com`. (You can create
CNAME records only for subdomains.)

@@ -435,0 +437,0 @@ ```ts

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc