Skip to content

fix: ensure that event data can be an array, number, boolean or null - #281

Merged
lance merged 2 commits into
cloudevents:masterfrom
lance:280-event-data-format
Jul 29, 2020
Merged

lance merged 2 commits into
cloudevents:masterfrom
lance:280-event-data-format

Conversation

@lance

@lance lance commented Jul 28, 2020 •

Copy link
Copy Markdown
Member

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 lball@redhat.com

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 <lball@redhat.com>
@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
Signed-off-by: Lance Ball <lball@redhat.com>
@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