Commit 9f34193
authored
feat(type-safe-api): websocket apis for typescript (#731)
Add a new `TypeSafeWebSocketApiProject` which can be used to build WebSocket APIs in a similar
manner to REST APIs.
This includes:
* Modelling an API in Smithy or OpenAPI
* Generated CDK infrastructure (WebSocket API and Lambda functions)
* Generated runtimes containing lambda handler wrappers, and server SDK to send messages to clients
* Generated handler stubs with the `@handler` trait
* Generated client and react hooks libraries for use client side
* Integration with infrastructure and website projects
* WebSocket API explorer
* WebSocket API CDK construct with validation schemas as custom resource to scale for larger apis
Only TypeScript is supported currently, but refactoring work has been done to make Python and Java
support more straightforward.
Note the new Java project in `internal/smithy-async-transformer` - this allows us to perform a
transform on users' Smithy models to augment operations with additional traits required for OpenAPI
generation.1 parent 8eccfac commit 9f34193
File tree
261 files changed
+97249
-4096
lines changed- .projen
- internal/smithy-async-transformer
- .projen
- src
- main
- java/software/aws/pdk/smithy
- resources/META-INF/services
- test
- java/software/aws/pdk/smithy
- resources/software/aws/pdk/smithy
- packages
- cdk-graph-plugin-diagram
- cdk-graph-plugin-threat-composer
- test/__snapshots__
- cdk-graph
- cloudscape-react-ts-website
- samples/cloudscape-react-ts-website/src
- components
- TypeSafeWebSocketApiClientProvider
- WebSocketApiExplorer
- hooks
- layouts
- App
- Routes
- pages
- ApiExplorer
- Home
- src
- test/__snapshots__
- identity
- infrastructure
- samples/infrastructure/typescript/src
- constructs
- apis
- websites
- stacks
- src/projects/typescript
- test/projects/typescript/__snapshots__
- pdk-nag
- pdk
- .projen
- pipeline
- src
- test/__snapshots__
- static-website
- src
- test/__snapshots__
- type-safe-api
- .projen
- docs/developer_guides/type-safe-api
- samples/type-safe-api/readme
- model-async
- model-rest
- scripts/type-safe-api
- custom/smithy-async-transformer
- generators
- java-async-cdk-infrastructure
- templates
- java-async-lambda-handlers
- templates
- java-async-runtime
- templates
- python-async-cdk-infrastructure
- templates
- python-async-lambda-handlers
- templates
- python-async-runtime
- templates
- typescript-async-cdk-infrastructure
- templates
- typescript-async-lambda-handlers
- templates
- typescript-async-runtime
- templates
- typescript-websocket-client
- templates
- typescript-websocket-hooks
- templates
- typescript/templates
- parser
- src
- construct
- prepare-spec-event-handler
- websocket
- project
- codegen
- components
- handlers
- infrastructure/cdk
- library
- runtime
- model
- openapi
- smithy
- components
- test
- construct
- __snapshots__
- prepare-spec-event-handler
- __snapshots__
- project
- __snapshots__
- codegen
- handlers
- __snapshots__
- infrastructure/cdk
- __snapshots__
- types
- __snapshots__
- model
- __snapshots__
- resources
- smithy/async-recursive
- specs/async
- scripts
- generators
- __snapshots__
- async
- __snapshots__
- parser
- __snapshots__
- projenrc
- abstract
- projects
- internal
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
261 files changed
+97249
-4096
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments