From a51068fd24072355ad60af8220098fd7e745b8fb Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Sun, 15 Apr 2018 14:36:47 -0700 Subject: [PATCH] Add namespacing to event-type (#137) * Add namespacing to an event. This commit has been spliced off of https://github.com/cloudevents/spec/pull/129 Signed-off-by: Thomas Bouldin * 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 * Soften stance on namespacing to SHOULD. Accept wording suggestions. This closes issue #32 Signed-off-by: Thomas Bouldin * 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 --- serialization.md | 2 +- spec.md | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) 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", diff --git a/spec.md b/spec.md index 989fd95be..0f045d307 100644 --- a/spec.md +++ b/spec.md @@ -264,14 +264,15 @@ 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. Often this + property is 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 + * 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 ### eventTypeVersion * Type: String