Skip to content

improve documentation truncation behavior #728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 28, 2023
Merged

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Mar 27, 2023

You can see that some shapes get quite long, CLI example: https://docs.aws.amazon.com/cli/latest/reference/quicksight/update-template.html

JSv3 API example: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-quicksight/classes/updatetemplatecommand.html


This PR aims to improve the recently implemented structural hint doc generation.

  • more aggressive truncation for repeated shapes

  • truncated item shows the target shape name instead of its entire structure

    • the name appears earlier in the shape hint

example, original shape appearance with name tag and then subsequent repeated shape truncation

{
  myShape: { // MyShape
    field1: "STRING_VALUE",
    field2: "STRING_VALUE"
  },
  myShape2: "<MyShape>"
}

JSv3 diff in https://github.com/aws/aws-sdk-js-v3/pull/4585/files

@syall
Copy link
Contributor

syall commented Mar 28, 2023

Could test cases be added for truncating on both occurrences and depth?

@kuhe kuhe merged commit 9821ec9 into smithy-lang:main Mar 28, 2023
@kuhe kuhe deleted the fix/docs branch March 28, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants