Skip to content

docs: explain validation of received HTTP events - #671

Open
lazypanic999 wants to merge 1 commit into
cloudevents:mainfrom
lazypanic999:docs/597-receiving-validation
Open

lazypanic999 wants to merge 1 commit into
cloudevents:mainfrom
lazypanic999:docs/597-receiving-validation

Conversation

@lazypanic999

Copy link
Copy Markdown

The receiving-events example does not explain that HTTP conversion and event validation are separate. As reported in #597, a message without a type can be converted to a CloudEvent and then processed by an application that assumes conversion guarantees validity.

Document the explicit validate() step, show HTTP 400 handling for invalid input, and cover both individual events and HTTP batches. Explain that validation applies to the resulting objects after constructor defaults. This is a documentation improvement related to #597; it does not resolve the request to change deserialization behavior.

Validation:

  • Markdown and JavaScript lint passed.
  • TypeScript and browser builds passed.
  • 234 integration tests passed on Node.js 24.18.0.
  • 7 conformance scenarios / 38 steps passed after initializing the conformance submodule.
  • Executed the exact new README snippet against six cases: valid structured event, missing type, defaulted specversion, valid batch, invalid batch, and malformed JSON. All produced the expected HTTP status.

Prepared with AI assistance; behavior was checked against the source, existing tests, and the executable example.

Signed-off-by: Doğukan Sağlık <dogukansaglik8563@gmail.com>
@lazypanic999
lazypanic999 marked this pull request as ready for review November 8, 2026 10:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant