You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the reasons I would like to see this flag enabled is a significant simplification of overriding massive resource model definitions in testing, especially in testing an UpdateHandler.
Assume I'm using these models in UpdateHandler test suite. If the update flow has a broad branching based on model attribute invariants, one has to initiate separate model instances for each branch case. It's completely fine for a 5-10 attribute models, but the burden of carrying things around grows once one has to deal with a 30-50 attribute model.
Having toBuilder = true enabled in ResourceModel definition would let one define models like
Dear team,
I wonder if you folks would have any concerns about enabling
toBuilder
attribute for Lombok @Builder by default or with an additional schema flag?At the moment,
ResourceModel
template generates non-parametrized @Builder: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/blob/master/python/rpdk/java/templates/init/guided_aws/ResourceModel.java#L20One of the reasons I would like to see this flag enabled is a significant simplification of overriding massive resource model definitions in testing, especially in testing an
UpdateHandler
.Here is an example:
Assume I'm using these models in
UpdateHandler
test suite. If the update flow has a broad branching based on model attribute invariants, one has to initiate separate model instances for each branch case. It's completely fine for a 5-10 attribute models, but the burden of carrying things around grows once one has to deal with a 30-50 attribute model.Having
toBuilder = true
enabled inResourceModel
definition would let one define models likeIn fact, being able to override a static model locally within the current test case scope is even better, it could look like:
The text was updated successfully, but these errors were encountered: