From 81d5e7a7f81752aedfed234fea60c93bfeb2a532 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Mon, 2 Apr 2018 07:39:58 -0700 Subject: [PATCH 1/4] Add namespacing to an event. This commit has been spliced off of https://github.com/cloudevents/spec/pull/129 Signed-off-by: Thomas Bouldin --- spec.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/spec.md b/spec.md index 989fd95be..89f5213f6 100644 --- a/spec.md +++ b/spec.md @@ -264,14 +264,17 @@ that contains both context and data). ### eventType * Type: String -* Description: Type of the event `data`. Producers can specify the format of - this, depending on their service. This enables the interpretation of `data`, - and can be used for routing, policy and more. +* Description: Type of occurrence which has happened. The event type MUST be + namespaced with a package based on the reverse-DNS of a domain associated + with the software that produced the event. This MAY be used for routing, + observability, policy enforcement, etc. * Constraints: - * REQUIRED - * MUST be a non-empty string -* Examples: - * customer.created + * REQUIRED + * MUST be a non-empty string + * MUST be prefixed with a reverse-DNS name associated with the software that + produces the event +* Examples + * com.github.pull.create ### eventTypeVersion * Type: String From 546c93e983a85552fe1121c6c6d65012d1fd6f7c Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Mon, 2 Apr 2018 07:47:10 -0700 Subject: [PATCH 2/4] Update serialization.md to namespace event-type. Noticed that "namespace" was still in the searialization docs, even though it was removed from spec.md. Fixed. Signed-off-by: Thomas Bouldin --- serialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialization.md b/serialization.md index 65f4985be..4ede2297a 100644 --- a/serialization.md +++ b/serialization.md @@ -53,7 +53,7 @@ Example: "cloudEventsVersion": "0.1", "eventID": "6480da1a-5028-4301-acc3-fbae628207b3", "source": "http://example.com/repomanager", - "eventType": "created", + "eventType": "com.example.repro.create", "eventTypeVersion": "v1.5", "eventTime": "2018-04-01T23:12:34Z", "schemaURL": "https://product.example.com/schema/repo-create", From 929190f9f0df454299456d0dbcf874e3a269edc0 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Tue, 10 Apr 2018 10:37:39 -0700 Subject: [PATCH 3/4] Soften stance on namespacing to SHOULD. Accept wording suggestions. This closes issue #32 Signed-off-by: Thomas Bouldin --- spec.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spec.md b/spec.md index 89f5213f6..6795971b8 100644 --- a/spec.md +++ b/spec.md @@ -264,15 +264,13 @@ that contains both context and data). ### eventType * Type: String -* Description: Type of occurrence which has happened. The event type MUST be - namespaced with a package based on the reverse-DNS of a domain associated - with the software that produced the event. This MAY be used for routing, - observability, policy enforcement, etc. +* Description: Type of occurrence which has happened. Often this + property is used for routing, observability, policy enforcement, etc. * Constraints: * REQUIRED * MUST be a non-empty string - * MUST be prefixed with a reverse-DNS name associated with the software that - produces the event + * SHOULD be prefixed with a reverse-DNS name associated with the software + that produces the event * Examples * com.github.pull.create From 5606a11eef3a80d09cd934c5d21da9ed76b52803 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Thu, 12 Apr 2018 09:26:12 -0700 Subject: [PATCH 4/4] Clarify the meaning of the event-type package namespace. It is explicitly OK for one software organization to emit event-types of another organizatoin, so long as they are conforming to the standard set by the organization in the namespace. Signed-off-by: Thomas Bouldin --- spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.md b/spec.md index 6795971b8..0f045d307 100644 --- a/spec.md +++ b/spec.md @@ -269,8 +269,8 @@ that contains both context and data). * Constraints: * REQUIRED * MUST be a non-empty string - * SHOULD be prefixed with a reverse-DNS name associated with the software - that produces the event + * SHOULD be prefixed with a reverse-DNS name. The prefixed domain dictates + the organization which defines the semantics of this event type. * Examples * com.github.pull.create