Skip to content

SHOULD update schema to latest CE-spec schema? #383

Closed
@c-pius

Description

@c-pius

Describe the Bug
The schemaV1 is currently not up to date with the one from the specification (e.g. spec schema contains source minLength 1, SDK schema doesn't). Therefore, event.validate() does for instance not throw when source is an empty string.

Steps to Reproduce
Use the following snippet:

const event = new CloudEvent({
      id: '0815',
      specversion: '1.0',
      type: 'my.event.type',
      source: '',
    })

    const validated = event.validate() // does not throw
    console.log(validated)  // true

Expected Behavior
Schema should be up to date so that event.validate() throws accordingly.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions