googleapis / googleapis/google-cloud-java
[sdk-platform-java] Improve handling of resource names that (errantly) omit any/all resource ID segments.
- Lingua principale
- Java
- Stelle
- 2.1k
- Fork
- 1.2k
- Merge medio
- 1g 23h
- PR unite (30g)
- 154
Descrizione
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"`.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.