Skip to content

Conversation

@slinkydeveloper
Copy link
Member

Fix #215

cc @johanhaleby

Signed-off-by: Francesco Guardiani francescoguard@gmail.com

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper slinkydeveloper added the enhancement New feature or request label Aug 31, 2020
@slinkydeveloper slinkydeveloper added this to the 2.0.0-milestone2 milestone Aug 31, 2020
@johanhaleby
Copy link
Contributor

Would it make sense to have a method such as public SELF withoutExtension(@Nonnull Extension extension) to remove all properties of an extension?

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper
Copy link
Member Author

@johanhaleby what about now?

@johanhaleby
Copy link
Contributor

👍

But I think it would be great to also add an equals check (psuedo code from memory :)):

CloudEvent a = CloudEventBuilder.v1().withId("id").withExtension(myExtension).build();
CloudEvent b = CloudEventBuilder.v1(a).withoutExtension(myExtension).build();

assertThat(a).isEqualTo(b);

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper slinkydeveloper merged commit 8b4e586 into cloudevents:master Sep 1, 2020
@slinkydeveloper slinkydeveloper deleted the issues/215 branch September 1, 2020 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier/more obvious to remove extensions from a cloud event

2 participants