Skip to content
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

Validation error due to specVersion instead of specversion in the event payload #487

Open
giriraj-hh opened this issue Nov 1, 2022 · 2 comments
Labels
needs-user-input The author of an issue or PR should provide more details

Comments

@giriraj-hh
Copy link

Versions:

	implementation group: 'io.cloudevents', name: 'cloudevents-spring', version: '2.4.0'
	implementation 'io.cloudevents:cloudevents-json-jackson:2.4.0'
	implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.4'

Example payload:
{"data":{"value":"AN_EXAMPLE_JSON_PAYLOAD","id":"228ad7d1-dd16-4fd5-a02e-4b4bdcb7eaed","source":"service-test","type":"dummy.event","subject":null,"time":null,"specVersion":"V1","dataContentType":"application/cloudevents+json","dataSchema":null,"extensionNames":[],"attributeNames":["datacontenttype","specversion","id","source","type"]}

Getting following error:

org.springframework.messaging.MessageHandlingException: error occurred in message handler [bean 'serviceActivator.handler' for component 'serviceActivator']; nested exception is io.cloudevents.core.format.EventDeserializationException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Missing mandatory specversion attribute

I am not sure if this is a known issue of if there is anything missing in the documentation to properly serialize the base event attributes.
Would appreciate any help here.

Regards,
Giriraj

@pierDipi
Copy link
Member

pierDipi commented Nov 3, 2022

Hi @giriraj-hh, is a fix something you can contribute?

@JemDay
Copy link
Contributor

JemDay commented Jan 3, 2023

@giriraj-hh - Can you clarify where the "example payload" is coming from? .. CloudEvent context attribute names aren't camelCase'd, so "specVersion" doesn't mean the same thing as "specversion".

@pierDipi pierDipi added the needs-user-input The author of an issue or PR should provide more details label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-user-input The author of an issue or PR should provide more details
Projects
None yet
Development

No branches or pull requests

3 participants