Skip to content

Commit 312235a

Browse files
authored
chore(apigatewayv2): add apigatewayv2 integrations and authorizers to jsiirc (#30461)
### Issue # (if applicable) Closes #28348 ### Reason for this change When we promote apigatewayv2 from experimental to stable module, we did not add `jsiirc.json` file, thus no documentation is created and the namespace for import is incorrect. ### Description of changes We cannot fix the namespace now as this is stable modules and there're customers using it. Fixing this would be a breaking change to users who use apigatewayv2 in `aws-cdk-lib`. ### Description of how you validated changes N/A ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent d2ea280 commit 312235a

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"targets": {
3+
"dotnet": {
4+
"namespace": "Amazon.CDK.AwsApigatewayv2Authorizers"
5+
},
6+
"java": {
7+
"package": "software.amazon.awscdk.aws_apigatewayv2_authorizers"
8+
},
9+
"python": {
10+
"module": "aws_cdk.aws_apigatewayv2_authorizers"
11+
}
12+
}
13+
}

packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
- [WebSocket APIs](#websocket-apis)
1414
- [Lambda Authorizer](#lambda-authorizer)
1515
- [IAM Authorizers](#iam-authorizer)
16+
- [Import Issues](#import-issues)
17+
- [DotNet Namespace](#dotnet-namespace)
18+
- [Java Package](#java-package)
1619

1720
## Introduction
1821

@@ -280,3 +283,26 @@ user.attachInlinePolicy(new iam.Policy(this, 'AllowInvoke', {
280283
}));
281284

282285
```
286+
287+
## Import Issues
288+
289+
`jsiirc.json` file is missing during the stablization process of this module, which caused import issues for DotNet and Java users who attempt to use this module. Unfortunately, to guarantee backward compatibility, we cannot simply correct the namespace for DotNet or package for Java. The following outlines the workaround.
290+
291+
### DotNet Namespace
292+
293+
Instead of the conventional namespace `Amazon.CDK.AWS.Apigatewayv2.Authorizers`, you would need to use the following namespace:
294+
295+
```cs
296+
using Amazon.CDK.AwsApigatewayv2Authorizers;;
297+
```
298+
299+
### Java Package
300+
301+
Instead of conventional package `import software.amazon.awscdk.services.apigatewayv2_authorizers.*`, you would need to use the following package:
302+
303+
```java
304+
import software.amazon.awscdk.aws_apigatewayv2_authorizers.*;
305+
306+
// If you want to import a specific construct
307+
import software.amazon.awscdk.aws_apigatewayv2_authorizers.WebSocketIamAuthorizer;
308+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"targets": {
3+
"dotnet": {
4+
"namespace": "Amazon.CDK.AwsApigatewayv2Integrations"
5+
},
6+
"java": {
7+
"package": "software.amazon.awscdk.aws_apigatewayv2_integrations"
8+
},
9+
"python": {
10+
"module": "aws_cdk.aws_apigatewayv2_integrations"
11+
}
12+
}
13+
}

packages/aws-cdk-lib/aws-apigatewayv2-integrations/README.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
- [WebSocket APIs](#websocket-apis)
1212
- [Lambda WebSocket Integration](#lambda-websocket-integration)
1313
- [AWS WebSocket Integration](#aws-websocket-integration)
14+
- [Import Issues](#import-issues)
15+
- [DotNet Namespace](#dotnet-namespace)
16+
- [Java Package](#java-package)
1417

1518
## HTTP APIs
1619

@@ -307,4 +310,27 @@ webSocketApi.addRoute('$connect', {
307310
```
308311

309312
You can also set additional properties to change the behavior of your integration, such as `contentHandling`.
310-
See [Working with binary media types for WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-binary-media-types.html).
313+
See [Working with binary media types for WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-binary-media-types.html).
314+
315+
## Import Issues
316+
317+
`jsiirc.json` file is missing during the stablization process of this module, which caused import issues for DotNet and Java users who attempt to use this module. Unfortunately, to guarantee backward compatibility, we cannot simply correct the namespace for DotNet or package for Java. The following outlines the workaround.
318+
319+
### DotNet Namespace
320+
321+
Instead of the conventional namespace `Amazon.CDK.AWS.Apigatewayv2.Integrations`, you would need to use the following namespace:
322+
323+
```cs
324+
using Amazon.CDK.AwsApigatewayv2Integrations;
325+
```
326+
327+
### Java Package
328+
329+
Instead of conventional package `import software.amazon.awscdk.services.apigatewayv2_integrations.*`, you would need to use the following package:
330+
331+
```java
332+
import software.amazon.awscdk.aws_apigatewayv2_integrations.*;
333+
334+
// If you want to import a specific construct
335+
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration;
336+
```

0 commit comments

Comments
 (0)