Skip to content

fix(spec): align cloudevents-binding and spec examples with 0.6.0-draft schemas - #347

Open
xgbtxy wants to merge 1 commit into
cdevents:mainfrom
xgbtxy:fix/spec-cloudevents-binding-schema-conformance
Open

xgbtxy wants to merge 1 commit into
cdevents:mainfrom
xgbtxy:fix/spec-cloudevents-binding-schema-conformance

Conversation

@xgbtxy

@xgbtxy xgbtxy commented Nov 26, 2026

Copy link
Copy Markdown

Changes

Align cloudevents-binding.md and spec.md with the current 0.6.0-draft specification and normative JSON Schema (schemas/taskrunstarted.json, Draft 2020-12):

  1. cloudevents-binding.md HTTP binary mode example:

    • Fixed three RFC 8259 JSON syntax errors in the request body (trailing comma after "timestamp", missing comma after the "context" object, and missing comma after "uri").
    • Fixed three schemas/taskrunstarted.json conformance errors: updated ce-type and context.type from dev.cdevents.taskrun.started.0.1.1 to dev.cdevents.taskrun.started.0.3.0, renamed subject.content.task to taskName (additionalProperties: false), and changed subject.content.uri from a relative path to an absolute RFC 3986 URI (format: "uri").
    • Changed the fenced code block language tag from json to http because the block contains an HTTP request header block followed by the JSON body.
  2. spec.md normative metadata & examples:

    • Fixed the non-existent attribute name `customDataEncoding` in the Overview section to `customDataContentType` (every event schema sets additionalProperties: false and defines customDataContentType, matching the Custom Data section).
    • Updated the normative specversion value (0.1.1 -> 0.6.0-draft to match version.txt, schema $ids, and conformance fixtures) and event type examples (taskrun.started and environment.created from 0.2.0 -> 0.3.0).
    • Updated the Context example, content example (wrapped as valid JSON with taskName and absolute uri), and Subject example so the complete taskrun.started event parses cleanly under RFC 8259 and validates against schemas/taskrunstarted.json.
    • Fixed the broken Vocabulary Stages link [Testing](testing.md) -> [Testing](testing-events.md).

Verification

  • Validated the updated cloudevents-binding.md JSON payload and spec.md Subject example against schemas/taskrunstarted.json (with schemas/links/*.json registered and format validation enabled) using both Ajv2020 + ajv-formats and Python jsonschema.Draft202012Validator — both pass with 0 errors.
  • Confirmed tools/spec-release.sh's "specversion": "0.6.0-draft", pattern remains preserved in both cloudevents-binding.md and spec.md.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has the primer doc been updated if a design decision is involved (N/A — no design change)
  • Have the JSON schemas been updated if the specification changed (N/A — aligning docs/examples to existing schemas)
  • Has spec version and event versions been updated according to the versioning policy (N/A — aligning to existing 0.6.0-draft / 0.3.0)
  • Meets the CDEvents contributor standards

…ft schemas

Fix RFC 8259 JSON syntax errors and Draft 2020-12 taskrunstarted.json
schema mismatches in cloudevents-binding.md and spec.md:

- Repair three JSON syntax errors in the cloudevents-binding.md HTTP
  binary example, tag the block as http, and align ce-type/context.type
  (0.3.0), subject.content.taskName, and absolute RFC 3986 uri.
- Align spec.md Context, content, and Subject examples with
  schemas/taskrunstarted.json (0.3.0, taskName, absolute uri, valid JSON).
- Replace non-existent customDataEncoding with customDataContentType,
  update normative specversion from 0.1.1 to 0.6.0-draft, update the
  environment.created type example to 0.3.0, and fix the broken
  testing.md link to testing-events.md.

Signed-off-by: Yan Chen <yan8925298@gmail.com>
@xgbtxy
xgbtxy requested a review from a team as a code owner November 26, 2026 15:13
Copilot AI balanced review requested due to automatic review settings November 26, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

3 participants