googleapis / googleapis/google-cloud-java
[sdk-platform-java] Improve handling of resource names that (errantly) omit any/all resource ID segments.
- Ngôn ngữ chính
- Java
- Star
- 2.1k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 154
Mô tả
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"`.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.