googleapis / googleapis/gapic-generator-go

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

Open
#820 1 comment 1 reaction 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
Go
Stars
305
Forks
60
Avg merge
1d 8h
Merged PRs (30d)
13

Description

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 ?

Contributor guide

Open the contributing guide

Research direction

Start by tracing how REQUIRED field annotations are used when generating calling-method documentation and example payload construction for Go client libraries. Verify that every top-level required request field is identified in both the method documentation and its example payload, with the generated client documentation providing enough information to construct a valid request.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation, tooling
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.