Skip to content

Conversation

@lance
Copy link
Member

@lance lance commented Jul 28, 2020

Proposed Changes

The schema incorrectly limits data values to only object and string. This is
incorrect, since JSON can be an array, boolean, null or a single number as well.
This changes the schemas for both 0.3 and 1.0 events and adds test cases.

Description

Signed-off-by: Lance Ball [email protected]

The schema incorrectly limits data values to only object and string. This is
incorrect, since JSON can be an array or a single number as well.

Fixes: cloudevents#280

Signed-off-by: Lance Ball <[email protected]>
@lance lance added spec/0.3 Support for spec v0.3 type/fix A change that fixes something that is broken spec/1.0 Issues related to the CE specification module/lib Related to the main source code labels Jul 28, 2020
@lance lance requested a review from a team July 28, 2020 18:53
@lance lance self-assigned this Jul 28, 2020
@lance lance requested review from danbev, fabiojose and lholmquist and removed request for a team July 28, 2020 18:53
@lance lance changed the title fix: ensure that event data can be an array or number fix: ensure that event data can be an array, number, boolean or null Jul 28, 2020
@lance lance merged commit b99f728 into cloudevents:master Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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/fix A change that fixes something that is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CloudEvent data in Array format throws a ValidationError

2 participants