All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support for CDEvents specification v0.5.0
- New
pkg/api/v05package with v0.5 event types ContextV05struct withspecversionfield (replacesversionfrom v0.4)ContextForUnmarshallingfor backward-compatible event parsing- Support for
chainIdfield in event context - Support for
linksfield with embedded links (PATH, END, RELATION types) - Support for
schemaUrifield for custom schema validation - 83 generated event types for v0.5 specification
- Comprehensive conformance tests for v0.5 events
- Multi-version support: SDK can parse v0.3, v0.4, and v0.5 events
- Updated README.md with v0.5 examples and import statements
- Reordered API reference links (v05 first, then v04, v03)
- Updated Go version to 1.24.0 with toolchain 1.24.3
- Updated dependencies (golang.org/x/mod, golang.org/x/sys, etc.)
- Generator now includes v0.5.0 in SPEC_VERSIONS
- Breaking Change in Spec: v0.5 uses
specversionfield instead ofversionin context - Event Type Versions: All v0.5 events use version
0.2.0or0.3.0in their type string - Backward Compatibility: SDK maintains full backward compatibility with v0.3 and v0.4 events
- New Event Types: Added TicketClosed, TicketCreated, TicketUpdated events (v0.2.0)
- Schema Version: v0.5 schemas reference CDEvents spec version 0.5.0
To migrate from v0.4 to v0.5:
-
Update your import statement:
// Old (v0.4) import cdevents "github.com/cdevents/sdk-go/pkg/api/v04" // New (v0.5) import cdevents "github.com/cdevents/sdk-go/pkg/api/v05"
-
Event creation remains the same:
event, err := cdevents.NewPipelineRunQueuedEvent()
-
New optional fields available:
event.SetChainId("my-chain-id") event.SetLinks(links) event.SetSchemaUri("https://example.com/schema")
-
The SDK automatically handles parsing events from all versions (v0.3, v0.4, v0.5)
For releases prior to v0.5 support, please refer to the git history and release tags.