Skip to content

Commit

Permalink
Fixed linting issue and missing jddoc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JonWallsten committed Oct 5, 2024
1 parent d798c01 commit c8dcace
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ api.addRoutes({

// You can only access authorizerId after it's been bound to a route
// In this example we expect use CfnOutput
new CfnOutput(stack, 'authorizerId', authorizer.authorizerId);
new CfnOutput(stack, 'authorizerType', authorizer.authorizerType);
new CfnOutput(this, 'authorizerId', authorizer.authorizerId);
new CfnOutput(this, 'authorizerType', authorizer.authorizerType);
```

```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
* Authorize HTTP API Routes with IAM
*/
export class HttpIamAuthorizer implements IHttpRouteAuthorizer {
/**
/**
* The authorizationType used for IAM Authorizer
*/
public readonly authorizationType = HttpAuthorizerType.IAM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('HttpJwtAuthorizer', () => {

// THEN
expect(authorizer.authorizerId).toBeDefined();
expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId);
});

test('should throw error when acessing authorizer before it been bound to route', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ describe('HttpLambdaAuthorizer', () => {

// THEN
expect(authorizer.authorizerId).toBeDefined();
expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId);
});

test('should throw error when acessing authorizer before it been bound to route', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ describe('HttpUserPoolAuthorizer', () => {

// THEN
expect(authorizer.authorizerId).toBeDefined();
expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId);
});

test('should throw error when acessing authorizer before it been bound to route', () => {
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ function undefinedIfNoKeys<A extends { [key: string]: unknown }>(obj: A): A | un
* Explicitly configure no authorizers on specific HTTP API routes.
*/
export class HttpNoneAuthorizer implements IHttpRouteAuthorizer {
/**
* The authorizationType used for IAM Authorizer
*/
public readonly authorizationType = 'NONE';
public bind(_options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig {
return {
Expand Down

0 comments on commit c8dcace

Please sign in to comment.