-
Notifications
You must be signed in to change notification settings - Fork 167
Make ProtoCloudEventData consistent with spec. #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pierDipi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have or can we add tests on the new getAny when data is binary_data or text_data [1] ?
Yes .. in two situations:
|
formats/protobuf/src/main/java/io/cloudevents/protobuf/ProtoDataWrapper.java
Outdated
Show resolved
Hide resolved
formats/protobuf/src/main/java/io/cloudevents/protobuf/ProtoSerializer.java
Show resolved
Hide resolved
Signed-off-by: Jem Day <[email protected]>
pierDipi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JemDay !
Modified ProtoCloudEventData to always return a Protobuf Any object - this ensures it is coherent with the Protobuf CloudEvent format specification. It remains possible to wrap any Protobuf 'Message' object directly (which includes an 'Any') as a convienience to reduce application code. Signed-off-by: Jem Day <[email protected]> Signed-off-by: Randi Sheaffer-Klass <[email protected]>
Modified ProtoCloudEventData to always return a Protobuf Any object - this ensures it is coherent with the Protobuff CloudEvent format specification.
It remains possible to wrap any Protobuf 'Message' object directly (which includes an 'Any') as a convienience to reduce application code.
Closes #532