googleapis / googleapis/google-api-java-client-services

Android Management API Deprecations

Đang mở
#22,611 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p2 type: feature request
Ngôn ngữ chính
Java
Star
725
Fork
394
Merge trung bình
42 phút
Pull request đã merge (30 ngày)
257

Mô tả

While having a look at the [Android Management API Client](https://github.com/googleapis/google-api-java-client-services/tree/main/clients/google-api-services-androidmanagement) in comparison with the reference documentation, I noticed that there are some fields and methods marked as deprecated within the reference but not within the Java client library.
E.g.: "statusBarDisabled" of [Policies](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies).

As developer I'd love to notice deprecated API fields inside the related client code, so I can handle them directly when using them.

My suggestion would be to include a proper `@Deprecated` annotation in combination with a good JavaDoc which leads me to the correct place. This would increase the visibility of deprecation within the regular development process.
E.g:
```java
/**
* Password requirements. The field password_requirements.require_password_unlock must not be set.
*
* @deprecated Use passwordPolicies instead.
*
* Note: Complexity-based values of PasswordQuality, that is,
* COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here.
* unified_lock_settings cannot be used here.
* @param passwordRequirements passwordRequirements or {@code null} for none
*/
@Deprecated
public Policy setPasswordRequirements(PasswordRequirements passwordRequirements) {
this.passwordRequirements = passwordRequirements;
return this;
}
```

I'm willing to contribute with a PR containing the annotations of deprecations of the Android Management API together with proper documentation about alternatives as described within the API reference documentation. Just add the "Accepting Contributions" label and I'll set up a PR for it.

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.