smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.7k stars 201 forks source link

Update codegen documentation to show smithy-trait-codegen #2301

Closed kubukoz closed 1 month ago

kubukoz commented 1 month ago

e.g. in https://smithy.io/2.0/guides/building-codegen/configuring-the-generator.html#converting-json-configuration-to-java

there's no mention of smithy-trait-codegen, and I think it's a pretty huge time-saver when it comes to writing these POJOs.

kubukoz commented 1 month ago

hmm I may've reacted too quickly by making this, in practice these things aren't "traits" per se. However, there's still Node parsing involved, so the codegen could make that easier.

hpmellema commented 1 month ago

Smithy trait codegen is still in an unstable state. We plan to add additional usage documentation to smithy.io as we stabilize the generator.

That said, as I see it, trait codegen doesn't really apply to settings nodes in Directed codegen. These settings nodes are not typically modeled in the IDL so wont be generatable. Additionally, trait codegen is specific to trait shapes and not really intended for generic Node parsing which seems to be what you are getting at.

kubukoz commented 1 month ago

Fair enough!