CloudEvent data in Array format throws a ValidationError #280
Labels
module/lib
Related to the main source code
spec/0.3
Support for spec v0.3
spec/1.0
Issues related to the CE specification
type/bug
Something isn't working
Describe the Bug
When creating or receiving a
CloudEvent
, if the data is in the form of an Array - which is valid JSON - we get a validation error.Steps to Reproduce
new CloudEvent()
to create an event with thedata
property as an array. For example:That will produce:
Expected Behavior
No error thrown.
Additional context
The schema seems to have wrongly typed data here https://github.com/cloudevents/sdk-javascript/blob/master/src/event/schemas.ts#L12-L14 and here https://github.com/cloudevents/sdk-javascript/blob/master/src/event/schemas.ts#L91-L93
The text was updated successfully, but these errors were encountered: