feat: add a constructor parameter for loose validation by lance · Pull Request #328 · cloudevents/sdk-javascript

@lance lance requested a review from a team

August 26, 2020 19:05

grant

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

Fixes: cloudevents#325

Signed-off-by: Lance Ball <lball@redhat.com>
This commit modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from cloudevents#328

Signed-off-by: Lance Ball <lball@redhat.com>

@lance lance mentioned this pull request

Sep 2, 2020

lholmquist

@lance lance mentioned this pull request

Sep 3, 2020

@lance lance deleted the 325-loose-validation branch

September 8, 2020 19:32

lholmquist pushed a commit to lholmquist/sdk-javascript that referenced this pull request

Sep 8, 2020
* feat: add a constructor parameter for loose validation

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

This commit also modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from cloudevents#328

Fixes: cloudevents#325

Signed-off-by: Lance Ball <lball@redhat.com>

lance added a commit that referenced this pull request

Sep 9, 2020
* feat: add a constructor parameter for loose validation

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

This commit also modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from #328

Fixes: #325

Signed-off-by: Lance Ball <lball@redhat.com>

lance added a commit to lance/sdk-javascript that referenced this pull request

Sep 9, 2020
* chore(example): Replaced body parser with express JSON parser (cloudevents#334)

Signed-off-by: Philip Hayes <phayes@redhat.com>

Co-authored-by: Philip Hayes <phayes@redhat.com>

* fix: upgrade cloudevents from 3.0.1 to 3.1.0 (cloudevents#335)

Snyk has created this PR to upgrade cloudevents from 3.0.1 to 3.1.0.

See this package in npm:
https://www.npmjs.com/package/cloudevents

See this project in Snyk:
https://app.snyk.io/org/lance/project/cb2960b0-db0c-4e77-9ab2-e78efded812e?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>

* feat: add a constructor parameter for loose validation (cloudevents#328)

* feat: add a constructor parameter for loose validation

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

This commit also modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from cloudevents#328

Fixes: cloudevents#325

Signed-off-by: Lance Ball <lball@redhat.com>

Co-authored-by: Philip Hayes <philip@deewhy.ie>
Co-authored-by: Philip Hayes <phayes@redhat.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Lance Ball <lball@redhat.com>

lance added a commit to lance/sdk-javascript that referenced this pull request

Sep 9, 2020
* feat: add a constructor parameter for loose validation

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

This commit also modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from cloudevents#328

Fixes: cloudevents#325

Signed-off-by: Lance Ball <lball@redhat.com>

lance added a commit that referenced this pull request

Sep 11, 2020
* feat: add a constructor parameter for loose validation

This commit adds a second, optional boolean parameter to the `CloudEvent`
constructor. When `false` is provided, the event constructor will not
perform validation of the event properties, values and extension names.

This commit also modifies the ValidationError class so that the error message
string includes the JSON.stringified version of any schema validation
errors. It also makes the HTTP.toEvent() function create CloudEvent
objects with loose/no validation.

Incorporates comments from #328

Fixes: #325

Signed-off-by: Lance Ball <lball@redhat.com>

@lance lance mentioned this pull request

Oct 30, 2020

This was referenced

Dec 24, 2020

@lance lance mentioned this pull request

Mar 3, 2022