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

docs: include documentation for required parameters #964

Merged
merged 4 commits into from Apr 1, 2021
Merged

docs: include documentation for required parameters #964

merged 4 commits into from Apr 1, 2021

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Mar 31, 2021

Currently it is unclear how to use some of the functions that
return calls. Their required parameters are undocumented. This
means a user of the library either needs to go look at the official
docs page for the api or find the corresponding do method in the
code and look for its private discovery json comment. This commit
starts to add parameter descriptions for required fields, those
that are passed to the Call method.

Fixes: #950

Currently it is unclear how to use some of the functions that
return calls. Their required parameters are undocumented. This
means a user of the library either needs to go look at the official
docs page for the api or find the corresponding do method in the
code and look for its private discovery json comment. This commit
starts to add parameter descriptions for required fields, those
that are passed to the Call method.

Fixes: #950
@codyoss codyoss requested review from yoshi-approver and a team as code owners March 31, 2021 15:00
@codyoss codyoss requested a review from tbpg March 31, 2021 15:00
@codyoss
Copy link
Member Author

codyoss commented Mar 31, 2021

@tbpg The first commit contains the actual code changes to the generator. LMK what you think of the formatting. I am open to suggestions!

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 31, 2021
Copy link
Contributor

@tbpg tbpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Comment on lines 968 to 971
// - name: The resource name of the settings. Format is one of: *
// "projects/{project}/accessApprovalSettings" *
// "folders/{folder}/accessApprovalSettings" *
// "organizations/{organization}/accessApprovalSettings"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this show up properly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is too much we can do here. It is hard to know intent of *. I don't think you can confidently tell where the last bullet should end. This is also a problem in other struct field and method docs already today.

abusiveexperiencereport/v1/abusiveexperiencereport-gen.go Outdated Show resolved Hide resolved
abusiveexperiencereport/v1/abusiveexperiencereport-gen.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tbpg tbpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@codyoss codyoss merged commit 222eb0e into googleapis:master Apr 1, 2021
@codyoss codyoss deleted the docs branch April 1, 2021 20:30
@kortschak
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: improve godoc generation for functions
3 participants