aws / aws/aws-lambda-java-libs

v4 Events Lib - Major Version Change

Đang mở
#282 23 bình luận 14 reaction 0 người được giao Xem trên GitHub
events-v4
Ngôn ngữ chính
Java
Star
548
Fork
241
Merge trung bình
2 ngày 5 phút
Pull request đã merge (30 ngày)
11

Mô tả

The next major version of the `aws-lambda-java-events` library is now being worked on. As part of this we are considering changes around serialization. Our goals are to make it easier for customers to handle different serialization scenarios, reduce package size and to more easily add new events to the library.

Our current plans include enabling customers to bring their own serializer by implementing the [PojoSerializer](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/PojoSerializer.java) interface and including a provider-configuration file under `META-INF/services`.

To make it easier for new event objects to be added we are exploring ways to remove the use of mixins in the serialization library.

For example the [SecretsManagerRotationEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/SecretsManagerRotationEvent.java) uses the [SecretsManagerRotationEventMixin.java](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/SecretsManagerRotationEventMixin.java) to change upper case attributes `Step`, `SecretId` and `ClientRequestToken` to lower case ones. This is required because Jackson expects lower case attribute names. Instead Jackson annotations will be added directly to the event fields which require them.

At this time we’ll also change the existing event objects to all follow the same design. Lombok annotations `@Data`, `@NoArgsConstructor`, `@Builder(setterPrefix = "with")`, `@AllArgsConstructor` and `@Singular`(when needed) will be added to events without them.

The `joda-time` dependency will be removed in this release.

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.