Closed
Description
Describe the Bug
Does not throw if event doesn't have a specversion
attribute, and fallbacks to 1.0
. The spec says that the specversion
attribute is mandatory, so I think this library should fail when it's missing, instead of "magically" falling back.
Steps to Reproduce
Receiver.accept({ 'Content-Type': 'application/cloudevents+json' }, { id: 'foo', source: 'foo', type: 'foo' });
- Prints
console.error
saying it will fallback to1.0
- Validation passes
Expected Behavior
It should throw, since the specversion
attribute is missing