sdk-javascript/test/integration
Lance Ball ae21dba76e
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-09 08:45:54 -04:00
..
cloud_event_test.ts feat: add a constructor parameter for loose validation (#328) 2020-09-09 08:45:54 -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 feat: simplify validation logic/imports (#265) 2020-07-23 16:09:07 -07:00
http_binding_03.ts feat(src): A CloudEvent should be readonly but provide a way to augment itself. (#234) 2020-07-13 15:15:32 -04:00
http_emitter_test.ts feat: introduce Message, Serializer, Deserializer and Binding interfaces (#324) 2020-09-03 15:51: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-09 08:45:54 -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-09-03 15:51:16 -04:00
spec_1_tests.ts lib: validate extension values (#251) 2020-07-27 13:19:09 -04:00
spec_03_tests.ts feat(src): A CloudEvent should be readonly but provide a way to augment itself. (#234) 2020-07-13 15:15:32 -04:00
utilities_test.ts feat: simplify validation logic/imports (#265) 2020-07-23 16:09:07 -07:00