Merge documentation of same inline modules#4008
Merged
Conversation
207b69c to
420527e
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
420527e to
c66fa96
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
c66fa96 to
b6bec8f
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
b6bec8f to
b7bb68e
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
b7bb68e to
4eb4331
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
david-perez
approved these changes
Feb 14, 2025
drganjoo
added a commit
that referenced
this pull request
Feb 14, 2025
When two inline modules with the same name are generated from different parts of the codebase, their documentation should be merged. However, other metadata must match exactly, as it is an error for one part of the codebase to define an inline module with pub visibility while another defines it with pub(crate) visibility. This PR enables documentation merging while maintaining strict validation of other metadata fields. Currently, the following sample model fails to generate code because both `SomeList` and `member` are generated in the same inline module but with different doc comments: ```smithy @documentation("Outer constraint has some documentation") @Length(max: 3) list SomeList { @Length(max: 8000) member: String } ``` Co-authored-by: Fahad Zubair <fahadzub@amazon.com>
Merged
aws-sdk-rust-ci
pushed a commit
that referenced
this pull request
Feb 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When two inline modules with the same name are generated from different parts of the codebase, their documentation should be merged. However, other metadata must match exactly, as it is an error for one part of the codebase to define an inline module with pub visibility while another defines it with pub(crate) visibility.
This PR enables documentation merging while maintaining strict validation of other metadata fields.
Currently, the following sample model fails to generate code because both
SomeListandmemberare generated in the same inline module but with different doc comments: