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

gapic: Add extra method/example comments for each REQUIRED field #820

Open
noahdietz opened this issue Nov 30, 2021 · 1 comment
Open

gapic: Add extra method/example comments for each REQUIRED field #820

noahdietz opened this issue Nov 30, 2021 · 1 comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@noahdietz
Copy link
Collaborator

Proto fields annotated as REQUIRED have documentation stating they are Required, but this doesn't appear anywhere in the client library documentation as the request message types are in a separate package with separate docs.

Each top-level request field annotated with (google.api.field_behavior) = REQUIRED should be:

  • mentioned in the calling method's documentation as a required field
  • mentioned in the calling method's example payload construction code as a required field (maybe even with a value initialized)

This will help make it easier for users to construct a valid request from just the client library documentation.

WDYT @tbpg @codyoss ?

@noahdietz noahdietz added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Nov 30, 2021
@codyoss
Copy link
Member

codyoss commented Dec 21, 2022

Maybe something like this in the example?

FooRequest{
    // Parent: Required
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants