gapic-generator-ruby icon indicating copy to clipboard operation
gapic-generator-ruby copied to clipboard

Document method argument annotations

Open blowmage opened this issue 5 years ago • 4 comments

Client method documentation should show whether the arguments are input only, required, or optional. We should not show arguments for fields that are output only.

blowmage avatar Mar 23 '19 20:03 blowmage

We have reconsidered the method signatures, and are currently using positional arguments for both the request object/hash and the options object/hash. This means that we are no longer generating named arguments for the request fields. But, users can still make calls using named argument syntax, and Ruby will collect the named arguments into a hash and pass that as the request argument.

We are documenting the fields/named arguments for the request that users can use, and we are excluding the fields with output-only annotations.

blowmage avatar May 31 '19 15:05 blowmage

@blowmage So is this issue relevant anymore?

dazuma avatar Aug 07 '19 00:08 dazuma

I don’t think we document whether an argument’s field is required or not. I’ll look st this tomorrow.

blowmage avatar Aug 07 '19 03:08 blowmage

The current generated client method argument documentation does not specify whether the argument (proto message field) is required or optional. It does not, however, document fields that are marked as output-only.

The generated class attribute documentation (proto message) also does not indicate which attributes (proto message fields) are required vs. optional, input vs. output, etc.

blowmage avatar Aug 07 '19 16:08 blowmage