Skip to content

Commit cea7f34

Browse files
author
Daniel Bot
committed
fix: make custom authorizer optional and give access to cfnApi
1 parent 4326b82 commit cea7f34

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/http-openapi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ export class HttpOpenApi extends Construct {
2121
/**
2222
* Api Resource being created based on openAPI definition
2323
*/
24-
private readonly cfnApi: apigwv2.CfnApi
24+
public readonly cfnApi: apigwv2.CfnApi
2525

2626
/**
2727
* Default stage being created & deployed for the API
2828
*/
29-
private readonly apiStage: apigwv2.CfnStage
29+
public readonly apiStage: apigwv2.CfnStage
3030

3131
/**
3232
* Maps operationId to lambda Function that is being created
3333
*/
3434
public readonly functions: Record<string, lambda.Function>
3535

36-
private readonly permissions: Record<string, lambda.CfnPermission>
36+
public readonly permissions: Record<string, lambda.CfnPermission>
3737

3838
/**
3939
* Maps operationId to http path and method - for routing purposes
4040
*/
41-
private readonly methodMappings: Record<string, MethodMapping>
41+
public readonly methodMappings: Record<string, MethodMapping>
4242

4343
constructor (scope: Construct, id: string, props: HttpApiProps) {
4444
super(scope, id)

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface HttpApiProps {
3535
/**
3636
* ARN of the lambda to be used as a custom authorizer for your requests
3737
*/
38-
readonly customAuthorizerLambdaArn: string
38+
readonly customAuthorizerLambdaArn?: string
3939

4040
/**
4141
* Directory path for locating lambas source code.

0 commit comments

Comments
 (0)