sdk-javascript/test/integration
Lance Ball 1fa3a05aed
feat: add a constructor parameter for loose validation (#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 https://github.com/cloudevents/sdk-javascript/pull/328

Fixes: https://github.com/cloudevents/sdk-javascript/issues/325

Signed-off-by: Lance Ball <lball@redhat.com>
2020-09-08 15:32:16 -04:00
..
cloud_event_test.ts feat: add a constructor parameter for loose validation (#328) 2020-09-08 15:32:16 -04:00
constants_test.ts lib: expose constants in a more intuitive way (#299) 2020-08-04 09:42:28 -04:00
http_binding_1.ts src(event)!: make the event's time property only a string (#330) 2020-09-01 10:10:16 -04:00
http_binding_03.ts src(event)!: make the event's time property only a string (#330) 2020-09-01 10:10:16 -04:00
http_emitter_test.ts src(event)!: make the event's time property only a string (#330) 2020-09-01 10:10:16 -04:00
http_receiver_test.ts refactor: combine v03 and v1 event interfaces, specs and schemas into single files(#270) 2020-07-24 15:35:18 -04:00
message_test.ts feat: add a constructor parameter for loose validation (#328) 2020-09-08 15:32:16 -04:00
parser_test.ts refactor: simplify parser logic and duplicated code (#269) 2020-07-24 15:08:52 -04:00
sdk_test.ts feat: introduce Message, Serializer, Deserializer and Binding interfaces (#324) 2020-08-26 18:26:50 -04:00
spec_1_tests.ts src(event)!: make the event's time property only a string (#330) 2020-09-01 10:10:16 -04:00
spec_03_tests.ts src(event)!: make the event's time property only a string (#330) 2020-09-01 10:10:16 -04:00
utilities_test.ts feat: simplify validation logic/imports (#265) 2020-07-23 16:09:07 -07:00