googleapis / googleapis/google-cloud-java

[sdk-platform-java] Support `:**` for wildcard matching in routing parameters

Open
#12,500 0 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

Storage has a need to support `:**` in the end of a routing parameter, see [proto config](https://github.com/googleapis/googleapis/blob/533398389c34b567e3ca11775fa127a111258ea1/google/storage/v2/storage.proto#L255). This was first found in [Ruby](https://b.corp.google.com/issues/277650689), but Java does not support it either after manual testing.
The original design of routing proto is not clear if this format should be supported or not. See [AIP-4222](https://google.aip.dev/client-libraries/4222) and [routing.proto](https://github.com/googleapis/googleapis/blob/533398389c34b567e3ca11775fa127a111258ea1/google/api/routing.proto) for details. There is an open [PR](https://github.com/aip-dev/google.aip.dev/pull/1067/files) to update the AIP to make it clear.
The current implementation in [PathTemplate](https://github.com/googleapis/gapic-generator-java/blob/main/api-common-java/src/main/java/com/google/api/pathtemplate/PathTemplate.java) only support `**` after `\`, we need to treat `:` as a proper delimeter as well.

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.