Skip to content
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

Documentation issues #2374

Closed
stefansundin opened this issue Dec 22, 2018 · 2 comments · Fixed by #2617 or #2621
Closed

Documentation issues #2374

stefansundin opened this issue Dec 22, 2018 · 2 comments · Fixed by #2617 or #2621
Labels
documentation This is a problem with documentation.

Comments

@stefansundin
Copy link
Contributor

There are some issues in the documentation. The major one is similar to what I helped fix in a couple of places a while back in #1224, namely that package names are missing for types in examples. This is not the case everywhere, though, but in most examples.

Example from https://docs.aws.amazon.com/sdk-for-go/api/service/chime/#Chime.ListAccountsPages:

// Example iterating over at most 3 pages of a ListAccounts operation.
pageNum := 0
err := client.ListAccountsPages(params,
    func(page *ListAccountsOutput, lastPage bool) bool {   // <--- "chime." missing here before "ListAccountsOutput"
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

Running this command gives you a list of possible errors: (output)

$ grep -r '^//  .*[*][A-Z]' .

Running these two commands gives you a tally of errors versus proper examples:

$ grep -r '^//  .*[*][A-Z]' . | wc -l
     552
$ grep -r '^//  .*[*][a-z]*[.][A-Z]' . | wc -l
     340

So more than half of the examples are affected.

Other minor things

There is a word salad in the Overview section here: https://docs.aws.amazon.com/sdk-for-go/api/service/chime/

Using an AWS SDKYou don't [...]

Using the AWS CLIUse your [...]

Using REST APIIf you use [...]

There are double bullet points in the lists on the main page (maybe other pages too?): https://docs.aws.amazon.com/sdk-for-go/api/

Hope that helps! :)

@stefansundin
Copy link
Contributor Author

I'd like to add one more thing.. Not all function calls have all the types linked. E.g. Credentials is missing links in NewSharedCredentials and NewStaticCredentials. This is probably a thing all over the place. See https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#NewSharedCredentials

@diehlaws diehlaws self-assigned this Dec 27, 2018
@diehlaws diehlaws added the documentation This is a problem with documentation. label Dec 27, 2018
@diehlaws
Copy link
Contributor

diehlaws commented Jan 7, 2019

Hi @stefansundin, thanks for taking the time to put this together and apologies for the delay in our response. Most of these issues stem from the way in which our docs are generated from our source code, which is something we're aware of and will work toward fixing in the near future.

jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 23, 2019
Fixes bugs in how the SDK generates the Go documentation for the AWS
API clients.

Fix aws#2572
Partial Fix aws#2374
jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 23, 2019
Fixes the pagination helper method's doc example to refer to the package
of the paginator.

Fix aws#2374
jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 23, 2019
Fixes bugs in how the SDK generates the Go documentation for the AWS
API clients.

Fix aws#2572
Partial Fix aws#2374
jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 23, 2019
Fixes the pagination helper method's doc example to refer to the package
of the paginator.

Fix aws#2374
jasdel added a commit that referenced this issue May 24, 2019
Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.

Fix #2572
Fix #2374
diehlaws pushed a commit to diehlaws/aws-sdk-go that referenced this issue Jul 2, 2019
Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.

Fix aws#2572
Fix aws#2374
@diehlaws diehlaws removed their assignment Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
2 participants