googleapis / googleapis/google-cloud-java
[sdk-platform-java] Improve handling of resource names that (errantly) omit any/all resource ID segments.
- Vorherrschende Sprache
- Java
- Sterne
- 2.1k
- Forks
- 1.2k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 154
Beschreibung
A `google.api.resource(_definition)` should have alternating collection ID and resource ID segments e.g. `books/{book}`. Singletons are a well-known exception to this. That said, if it is ever encountered that a resource is missing a resource ID segment e.g. `books/author`, then the generator, which currently throws an exception, should throw a detailed exception stating which resource is missing a resource ID segment.
http://yaqs/3643436287798542336 is an example case. It was not a straight forward debugging process based on the exception currently thrown, but would've been much easier if the generator had stated something along the lines of `"Resource Foo does not have any resource ID segments"`.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.