-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compute API v1: xxxResourceName.parse throws ValidationException #3604
Copy link
Copy link
Closed
googleapis/gapic-generator
#2478Labels
api: computeIssues related to the Compute Engine API.Issues related to the Compute Engine API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: computeIssues related to the Compute Engine API.Issues related to the Compute Engine API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Currently all
parse()methods inxxxResourceNameclasses expect that input string will be formatted likeprojects/{project}/..., but data returned from APIs contains URL prefixes likehttps://www.googleapis.com/compute/v1/projects/...and as result parsing fails withValidationException.Example
Receive instance details where:
Then when trying to parse it with
ProjectZoneName.parse(instance.zone)will cause the following exception: