Repository navigation
Update compute_gapic.yaml (WIP) - #95
Closed
andreamlin wants to merge 1 commit into
Closed
andreamlin wants to merge 1 commit into
andreamlin wants to merge 1 commit into
Conversation
This was referenced Nov 2, 2018
Closed
andreamlin
force-pushed
the
compute_gapic_update
branch
from
November 5, 2018 18:21
5cdef0d to
a536f0a
Compare
andreamlin
added a commit
to googleapis/gapic-generator
that referenced
this pull request
Dec 11, 2018
Partially addresses googleapis/google-cloud-java#3604. Don't force pathtemplate strings to start with a literal string. The status quo, for path templates, is to magically append a literal string to templated paths that begin with a bracketed string, e.g. the path {project}/zones/{zone} is rendered as projects/{project}/zones/{zone}. I don't remember exactly why we decided to do this, though it may have been related to purity of usage of PathTemplates, where all existing Google grpc path templates start with a projects (or possibly organizations) substring. More importantly, this PR allows us to parse a resource string returned from the server (see issue googleapis/google-cloud-java#3604), which often looks like https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}. The compute.v1.json Discovery API specifies that the baseUrl is exactly https://www.googleapis.com/compute/v1/projects. We can then take a resource string from the server, remove the given baseUrl prefix, and then parse the remaining suffix {project}/zones/{zone} into a ProjectsZoneName. See googleapis/google-cloud-java#3899 and googleapis/discovery-artifact-manager#95 for the resulting surface diffs from this generator change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated with googleapis/gapic-generator#2402.
Diff will be simpler after #96 gets checked in.edit: diffbase checked into masterTesting: Regenerated Java google-cloud-compute client with this refreshed compute_gapic.yaml, and there were 0 changes in the Java client code.