Title: Compute API v1: xxxResourceName.parse throws ValidationException · Issue #3604 · googleapis/google-cloud-java · GitHub
Open Graph Title: Compute API v1: xxxResourceName.parse throws ValidationException · Issue #3604 · googleapis/google-cloud-java
X Title: Compute API v1: xxxResourceName.parse throws ValidationException · Issue #3604 · googleapis/google-cloud-java
Description: Currently all parse() methods in xxxResourceName classes expect that input string will be formatted like projects/{project}/..., but data returned from APIs contains URL prefixes like https://www.googleapis.com/compute/v1/projects/... an...
Open Graph Description: Currently all parse() methods in xxxResourceName classes expect that input string will be formatted like projects/{project}/..., but data returned from APIs contains URL prefixes like https://www.g...
X Description: Currently all parse() methods in xxxResourceName classes expect that input string will be formatted like projects/{project}/..., but data returned from APIs contains URL prefixes like https://www.g...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/3604
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Compute API v1: xxxResourceName.parse throws ValidationException","articleBody":"Currently all `parse()` methods in `xxxResourceName` classes expect that input string will be formatted like `projects/{project}/...`, but data returned from APIs contains URL prefixes like `https://www.googleapis.com/compute/v1/projects/...` and as result parsing fails with `ValidationException`.\r\n\r\n### Example\r\nReceive instance details where:\r\n```\r\ninstance.zone = https://www.googleapis.com/compute/v1/projects/project-123/zones/europe-west3-c\r\n```\r\n\r\nThen when trying to parse it with `ProjectZoneName.parse(instance.zone)` will cause the following exception:\r\n\r\n```\r\nProjectZoneName.parse: formattedString not in valid format: Parameter \"https://www.googleapis.com/compute/v1/projects/project-123/zones/europe-west3-c\" must be in the form \"projects/{project=*}/zones/{zone=*}\"\r\n```\r\n\r\n","author":{"url":"https://github.com/dtretyakov","@type":"Person","name":"dtretyakov"},"datePublished":"2018-08-24T09:17:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3604/google-cloud-java/issues/3604"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ad9a7f7b-d602-fdca-99c0-4615848a0590 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C514:33D2D8:305E74:436034:6A4C7B00 |
| html-safe-nonce | a7ec7082ff176c965d3c3828fd30803d137c6dc38e7fad62b76fdbb3fc9ae518 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTE0OjMzRDJEODozMDVFNzQ6NDM2MDM0OjZBNEM3QjAwIiwidmlzaXRvcl9pZCI6IjkxNzM3Njc1NjI5NjExMjQwOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6a8d32b170183e97dc898c2e54ad8280a8a2a2fdc545533e7919e6e6dc266f9 |
| hovercard-subject-tag | issue:353706958 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/3604/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53698a6a31cb983be340a7add0987c8a78d7e822700eb6a0a62a99121df6d93f/googleapis/google-cloud-java/issues/3604 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53698a6a31cb983be340a7add0987c8a78d7e822700eb6a0a62a99121df6d93f/googleapis/google-cloud-java/issues/3604 |
| og:image:alt | Currently all parse() methods in xxxResourceName classes expect that input string will be formatted like projects/{project}/..., but data returned from APIs contains URL prefixes like https://www.g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dtretyakov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56ac743bebb13694b888673bb7257f4b97a4b7fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width