googleapis / googleapis/google-cloud-java
[sdk-platform-java] Improve handling of resource names that (errantly) omit any/all resource ID segments.
- Lenguaje dominante
- Java
- Estrellas
- 2.1k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 154
Descripción
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"`.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.