feat(codegen): add types-only codegen#2158
Conversation
This adds support for types-only codegen driven by Smithy shape closures. This does not add support for mixed-mode generation, but it does take steps in that direction by centralizing generation in a single codegen plugin that takes a mode parameter.
b1446f9 to
d554d15
Compare
|
😲 |
| "modes": ["types"], | ||
| "closure": "example.types#typesClosure" | ||
| } | ||
| } |
There was a problem hiding this comment.
in addition, the ./codegen/smithy-typescript-protocol-test-codegen folder should receive a new types-only model, with corresponding declaration in its smithy-build.json.
Please have the make generate-protocol-tests target include deleting and regenerating the sample model(s).
That app/target generates into ./private/<pkg>, which is versioned. This gives a reviewable diff of the consequences of the codegen change. It currently has one SSDK (newly added), and two client SDKs in both schema-serde and legacy modes.
There was a problem hiding this comment.
Protocol tests aren't really appropriate since there are no protocol tests for types-only mode. I'll get something together at least.
There was a problem hiding this comment.
The name make generate-protocol-tests was perhaps misleading.
It is generating SDKs, some of which come with protocol tests, namely the Smithy RPCv2 CBOR protocol test client and perhaps more in the future, but the other things it generates are for visual diffing, which is why I want to have a types-only package in the group.
This adds support for types-only codegen driven by Smithy shape closures. This does not add support for mixed-mode generation, but it does take steps in that direction by centralizing generation in a single codegen plugin that takes a mode parameter.
This is in draft because I'm not super happy with how schemas work right now.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.