googleapis / googleapis/gapic-generator-php

consider removing required `$name` parameter from OperationsClient::listOperations

Open
#500 2 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: feature request
Dominant language
PHP
Stars
14
Forks
18
PR merge metrics
No merged PRs in 30d

Description

There are five APIs which allow calls to `listOperations` without a`$name` parameter:

- Functions
- ServiceManagement
- ServiceUsage
- Speech
- VideoIntelligence

Out of these APIs, only `VideoIntelligence` provides bindings for calling `listOperations` with a `$name` parameter.

Because of this, it would be better to make the `$name` parameter to `OperationsClient::listOperations` optional, and throw an exception when it's required (I believe the API would handle throwing this exception anyway). Otherwise, users are forced to provide this parameter when it isn't necessary and/or supported.

It looks like the [`ListOperationsRequest` proto](https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto#L171) does not require the `$name` parameter, so I believe this is as a result of the parameter moving from required to optional, and we will just have to fix it in the next version (or add a way for the generator to make these parameters optional)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.