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

Revert "Comment update, add several helper methods" #1411

Merged
merged 4 commits into from
Nov 8, 2018

Conversation

jdpedrie
Copy link
Contributor

@jdpedrie jdpedrie commented Nov 8, 2018

Reverts #1408

A configuration issue causes the REST transport to be broken. Reverting this until the gapic generator can be updated to address the issue.

Exception:

1) Google\Cloud\Container\Tests\System\ClusterManagerClientTest::testListOperations with data set #0 (Google\Cloud\Container\V1\ClusterManagerClient Object (...))
Google\ApiCore\ValidationException: Could not map bindings for google.container.v1.ClusterManager/ListOperations to any Uri template.
Bindings: Array
(
    [parent] =>
)
UriTemplates: Array
(
    [0] => /v1/{parent=projects/*/locations/*}/operations
    [1] => /v1/projects/{project_id}/zones/{zone}/operations
)

Relevant section of cluster_manager_rest_client_config.php:

            'ListOperations' => [
                'method' => 'get',
                'uriTemplate' => '/v1/{parent=projects/*/locations/*}/operations',
                'additionalBindings' => [
                    [
                        'method' => 'get',
                        'uriTemplate' => '/v1/projects/{project_id}/zones/{zone}/operations',
                    ],
                ],
                'placeholders' => [
                    'parent' => [
                        'getters' => [
                            'getParent',
                        ],
                    ]
                ],
            ],

Without placeholder mapping for the additional binding placeholders (project_id and zone), the request builder is unable to construct a request when methods are called providing project_id and zone rather than parent.

The Gapic Generator needs to be updated to include getter mapping for placeholders in additionalBinding uriTemplates.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 8, 2018
@dwsupplee dwsupplee merged commit e71766d into master Nov 8, 2018
@dwsupplee dwsupplee deleted the revert-1408-container-synth branch November 9, 2018 18:29
jdpedrie added a commit that referenced this pull request Nov 12, 2018
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.

4 participants