googleapis / googleapis/google-http-java-client

[Documentation] Missing documentation on the enum parsing feature

Đang mở
#1,484 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: feature request
Ngôn ngữ chính
Java
Star
1.4k
Fork
473
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm a `google-http-client-jackson2` user, and I struggled a bit looking for a way to setup an enum type as a `@Key`.

This is the exception I was getting: `IllegalArgumentException: given enum name New not part of enumeration`

Eventually I was able to find that out myself by looking into the [class FieldInfo](https://github.com/googleapis/google-http-java-client/blob/main/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java#L79), and I learned of the existence of the annotations `@Value` and `@NullValue`.

I'm opening this issue to please ask you to update the Developer's Guide (the [JSON page](https://googleapis.github.io/google-http-java-client/json.html) in particular) with a new paragraph talking about those two annotations.

Thanks.

PS: I think this relates to #127

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.