From fc0d1869d3019653660242f8b54238822aa060ea Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Mon, 30 Oct 2023 17:47:43 -0400 Subject: [PATCH 1/2] chore(apigatewayv2): turn on awslint --- .../@aws-cdk/aws-apigatewayv2-alpha/awslint.json | 10 +++++++++- .../@aws-cdk/aws-apigatewayv2-alpha/lib/http/api.ts | 12 ++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json b/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json index 3dab73aef9027..cfd94f99dbfc6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json +++ b/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json @@ -1,5 +1,13 @@ { "exclude": [ - "*:*" + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.ApiMappingProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegrationProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpRouteProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegrationProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRouteProps", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegration", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpRoute", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegration", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRoute" ] } diff --git a/packages/@aws-cdk/aws-apigatewayv2-alpha/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2-alpha/lib/http/api.ts index b6d2f6cef2dc8..51363ac2096c6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-alpha/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2-alpha/lib/http/api.ts @@ -357,11 +357,19 @@ export class HttpApi extends HttpApiBase { */ public readonly defaultStage: IHttpStage | undefined; - private readonly _apiEndpoint: string; - + /** + * Default Authorizer applied to all routes in the gateway. + */ public readonly defaultAuthorizer?: IHttpRouteAuthorizer; + + /** + * Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route. + * The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + */ public readonly defaultAuthorizationScopes?: string[]; + private readonly _apiEndpoint: string; + constructor(scope: Construct, id: string, props?: HttpApiProps) { super(scope, id); From dc9d3eaadd9acd671238604e5ace4341cc11645f Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Mon, 30 Oct 2023 17:48:24 -0400 Subject: [PATCH 2/2] indentatio --- .../aws-apigatewayv2-alpha/awslint.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json b/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json index cfd94f99dbfc6..f3c891320b8a8 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json +++ b/packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json @@ -1,13 +1,13 @@ { "exclude": [ - "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.ApiMappingProps", - "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegrationProps", - "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpRouteProps", - "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegrationProps", - "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRouteProps", - "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegration", - "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpRoute", - "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegration", - "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRoute" + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.ApiMappingProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegrationProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.HttpRouteProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegrationProps", + "props-physical-name:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRouteProps", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpIntegration", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.HttpRoute", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketIntegration", + "from-method:@aws-cdk/aws-apigatewayv2-alpha.WebSocketRoute" ] }