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.77k stars 209 forks source link

Refactor trait codegen javadoc integration to correctly support member documentation #2265

Closed hpmellema closed 5 months ago

hpmellema commented 5 months ago

Background

Refactors the trait codegen Javadoc integration to use a new approach to adding javadocs to both clean up the integration and to correctly support documentation on all members and enum variants.

In this updated approach empty Javadoc sections are first injected for all getters, classes, and enum variants. Interceptors can then populate the Javadocs section with text based on the presence of documentation traits. Finally, the core integration formats any javadoc sections with text as Java doc comments and discards any empty Javadoc sections.

Testing

Adds new suite of more comprehensive tests for smithy documentation traits.

Links


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.