Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rolledback
runtime
sbom
schemaUri
schemas
schemauri
specversion
src
Expand Down
5 changes: 5 additions & 0 deletions PROVIDERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CDEvents Provider Registry

The canonical registry of known `provider` values is [`schemas/registry/providers.json`](schemas/registry/providers.json). SDKs MUST use this list as the default for provider validation. See the [Provider Validation](links.md#provider-validation) section in `links.md` for the full SDK validation requirements.

To register a provider, open a pull request adding an entry to the `enum` in [`schemas/registry/providers.json`](schemas/registry/providers.json). Provider identifiers MUST be lowercase, start with a letter, and contain only alphanumeric characters and hyphens. Once merged, the value is considered stable and MUST NOT be renamed.
126 changes: 126 additions & 0 deletions conformance/formats/domainid.json
Comment thread
xibz marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"description": "Test vectors for domainId URN serialization. Each valid case specifies the logical segments and the expected serialized string. SDKs MUST produce the expected string from the given segments and MUST parse the expected string back to the same segments (round-trip).",
"valid": [
{
"description": "GitHub PR, no provider-id",
"segments": {
"provider": "github",
"providerId": "",
"namespace": "xibz",
"groups": "cdevents-spec",
"type": "pr",
"resourceId": "42"
},
"expected": "cdevents:v0:github::xibz:cdevents-spec:pr:42"
},
{
"description": "GitHub PR with provider-id distinguishing two internal GitHub Enterprise deployments",
"segments": {
"provider": "github",
"providerId": "org-a-github",
"namespace": "xibz",
"groups": "cdevents-spec",
"type": "pr",
"resourceId": "42"
},
"expected": "cdevents:v0:github:org-a-github:xibz:cdevents-spec:pr:42"
},
{
"description": "Jira ticket, no provider-id",
"segments": {
"provider": "jira",
"providerId": "",
"namespace": "xibz",
"groups": "cdevents-project",
"type": "issue",
"resourceId": "PROJ-123"
},
"expected": "cdevents:v0:jira::xibz:cdevents-project:issue:PROJ-123"
},
{
"description": "GitLab MR with nested groups",
"segments": {
"provider": "gitlab",
"providerId": "",
"namespace": "my-company",
"groups": "platform/backend",
"type": "mr",
"resourceId": "99"
},
"expected": "cdevents:v0:gitlab::my-company:platform/backend:mr:99"
},
{
"description": "Datadog alert, no provider-id",
"segments": {
"provider": "datadog",
"providerId": "",
"namespace": "prod",
"groups": "api-monitors",
"type": "alert",
"resourceId": "98765"
},
"expected": "cdevents:v0:datadog::prod:api-monitors:alert:98765"
},
{
"description": "Docker artifact using PURL as resource id — provider, provider-id, namespace and groups all empty because registry is unknown",
"segments": {
"provider": "",
"providerId": "",
"namespace": "",
"groups": "",
"type": "artifact",
"resourceId": "pkg%3Adocker%2Fmyapp%401.0.0"
},
"expected": "cdevents:v0:::::artifact:pkg%3Adocker%2Fmyapp%401.0.0"
},
{
"description": "All optional segments empty — only type and resource id present; structurally valid",
"segments": {
"provider": "",
"providerId": "",
"namespace": "",
"groups": "",
"type": "pr",
"resourceId": "42"
},
"expected": "cdevents:v0:::::pr:42"
}
],
"invalid": [
{
"description": "Missing provider-id segment (only 6 colons)",
"input": "cdevents:v0:github:xibz:cdevents-spec:pr:42",
"reason": "Segment count mismatch — provider-id segment omitted rather than left empty"
},
{
"description": "Empty type",
"input": "cdevents:v0:github::xibz:cdevents-spec::42",
"reason": "type is required and must not be empty"
},
{
"description": "Empty resource id",
"input": "cdevents:v0:github::xibz:cdevents-spec:pr:",
"reason": "resource id is required and must not be empty"
},
{
"description": "Leading slash in groups",
"input": "cdevents:v0:github::xibz:/cdevents-spec:pr:42",
"reason": "Leading '/' in groups is invalid"
},
{
"description": "Trailing slash in groups",
"input": "cdevents:v0:github::xibz:cdevents-spec/:pr:42",
"reason": "Trailing '/' in groups is invalid"
},
{
"description": "Wrong version",
"input": "cdevents:v1:github::xibz:cdevents-spec:pr:42",
"reason": "Only v0 is currently defined"
},
{
"description": "Wrong scheme prefix",
"input": "CDEvents:v0:github::xibz:cdevents-spec:pr:42",
"reason": "Scheme must be lowercase 'cdevents'"
}
]
}
Loading