Skip to content

Commit

Permalink
Master represents the future version of the spec, use the future vers…
Browse files Browse the repository at this point in the history
…ion in the text. (cloudevents#415)

* Bump the version used in master to 0.3 of the spec.

Signed-off-by: Scott Nichols <[email protected]>

* feedback was to use a wip tag. done.

Signed-off-by: Scott Nichols <[email protected]>
  • Loading branch information
n3wscott authored and Doug Davis committed Apr 18, 2019
1 parent 8cec5fb commit 471fe82
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 57 deletions.
4 changes: 2 additions & 2 deletions amqp-transport-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ content-type: application/json; charset=utf-8
----------- application-properties -----------
cloudEvents:specversion: "0.2"
cloudEvents:specversion: "0.3-wip"
cloudEvents:type: "com.example.someevent"
cloudEvents:time: "2018-04-05T03:56:24Z"
cloudEvents:id: "1234-1234-1234"
Expand Down Expand Up @@ -263,7 +263,7 @@ content-type: application/cloudevents+json; charset=utf-8
------------- application-data --------------------------
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand Down
18 changes: 9 additions & 9 deletions http-transport-binding.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP Transport Binding for CloudEvents - Version 0.2
# HTTP Transport Binding for CloudEvents - Version 0.3-wip

## Abstract

Expand Down Expand Up @@ -236,7 +236,7 @@ request:
```text
POST /someresource HTTP/1.1
Host: webhook.example.com
ce-specversion: "0.2"
ce-specversion: "0.3-wip"
ce-type: "com.example.someevent"
ce-time: "2018-04-05T03:56:24Z"
ce-id: "1234-1234-1234"
Expand All @@ -254,7 +254,7 @@ This example shows a response containing an event:

```text
HTTP/1.1 200 OK
ce-specversion: "0.2"
ce-specversion: "0.3-wip"
ce-type: "com.example.someevent"
ce-time: "2018-04-05T03:56:24Z"
ce-id: "1234-1234-1234"
Expand Down Expand Up @@ -313,7 +313,7 @@ Content-Type: application/cloudevents+json; charset=utf-8
Content-Length: nnnn
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand All @@ -334,7 +334,7 @@ Content-Type: application/cloudevents+json; charset=utf-8
Content-Length: nnnn
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand Down Expand Up @@ -390,7 +390,7 @@ Content-Length: nnnn
[
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand All @@ -400,7 +400,7 @@ Content-Length: nnnn
}
},
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someotherevent",
... further attributes omitted ...
Expand All @@ -423,7 +423,7 @@ Content-Length: nnnn
[
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand All @@ -433,7 +433,7 @@ Content-Length: nnnn
}
},
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someotherevent",
... further attributes omitted ...
Expand Down
14 changes: 7 additions & 7 deletions json-format.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JSON Event Format for CloudEvents - Version 0.2
# JSON Event Format for CloudEvents - Version 0.3-wip

## Abstract

Expand Down Expand Up @@ -109,7 +109,7 @@ The following table shows exemplary mappings:
| CloudEvents | Type | Exemplary JSON Value |
| --------------- | ------------- | ------------------------------- |
| type | String | "com.example.someevent" |
| specversion | String | "0.2" |
| specversion | String | "0.3-wip" |
| source | URI-reference | "/mycontext" |
| id | String | "1234-1234-1234" |
| time | Timestamp | "2018-04-05T17:31:00Z" |
Expand Down Expand Up @@ -173,7 +173,7 @@ Example event with `String`-valued `data`:

```JSON
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
"source" : "/mycontext",
"id" : "A234-1234-1234",
Expand All @@ -191,7 +191,7 @@ Example event with `Binary`-valued data

```JSON
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
"source" : "/mycontext",
"id" : "B234-1234-1234",
Expand All @@ -210,7 +210,7 @@ or [JSON data](#31-special-handling-of-the-data-attribute) data:

```JSON
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
"source" : "/mycontext",
"id" : "C234-1234-1234",
Expand Down Expand Up @@ -260,7 +260,7 @@ second with JSON data.
```JSON
[
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
"source" : "/mycontext/4",
"id" : "B234-1234-1234",
Expand All @@ -273,7 +273,7 @@ second with JSON data.
"data" : "... base64 encoded string ..."
},
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someotherevent",
"source" : "/mycontext/9",
"id" : "C234-1234-1234",
Expand Down
6 changes: 3 additions & 3 deletions mqtt-transport-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Content Type: application/json; charset=utf-8
------------- User Properties ----------------
specversion: "0.2"
specversion: "0.3-wip"
type: "com.example.someevent"
time: "2018-04-05T03:56:24Z"
id: "1234-1234-1234"
Expand Down Expand Up @@ -260,7 +260,7 @@ Content Type: application/cloudevents+json; charset=utf-8
------------------ payload -------------------
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand All @@ -285,7 +285,7 @@ Topic Name: mytopic
------------------ payload -------------------
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand Down
2 changes: 1 addition & 1 deletion nats-transport-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Subject: mySubject
------------------ payload -------------------
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.example.someevent",
... further attributes omitted ...
Expand Down
4 changes: 2 additions & 2 deletions protobuf-format.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Protocol Buffers Event Format for CloudEvents - Version 0.2
# Protocol Buffers Event Format for CloudEvents - Version 0.3-wip

## Abstract

Expand Down Expand Up @@ -102,7 +102,7 @@ CloudEventMap event = CloudEventMap.newBuilder()
.putValue(
"specversion",
CloudEventAny.newBuilder()
.setStringValue("0.2")
.setStringValue("0.3-wip")
.build())
.putValue(
"time",
Expand Down
72 changes: 39 additions & 33 deletions spec.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# CloudEvents - Version 0.2
# CloudEvents - Version 0.3-wip

=======

## Abstract

Expand Down Expand Up @@ -179,34 +181,36 @@ within the same JSON object.
- Type: `String`
- Description: The version of the CloudEvents specification which the event
uses. This enables the interpretation of the context. Compliant event
producers MUST use a value of `0.2` when referring to this version of the
producers MUST use a value of `0.3-wip` when referring to this version of the
specification.
- Constraints:
- REQUIRED
- MUST be a non-empty string

### source

- Type: `URI-reference`
- Description: This describes the event producer. Often this will include
information such as the type of the event source, the organization
publishing the event, the process that produced the event, and some unique
identifiers. The exact syntax and semantics behind the data encoded in the URI
is event producer defined.
information such as the type of the event source, the organization publishing
the event, the process that produced the event, and some unique identifiers.
The exact syntax and semantics behind the data encoded in the URI is event
producer defined.
- Constraints:
- REQUIRED
- Examples
- https://github.com/cloudevents/spec/pull
- /cloudevents/spec/pull
- urn:event:from:myapi/resource
- mailto:[email protected]
- https://github.com/cloudevents/spec/pull
- /cloudevents/spec/pull
- urn:event:from:myapi/resource
- mailto:[email protected]

### subject

- Type: `String`
- Description: This describes the subject of the event in the context of the
event producer (identified by `source`). In publish-subscribe scenarios,
a subscriber will typically subscribe to events emitted by a `source`,
but the `source` identifier alone might not be sufficient as a qualifier for
any specific event if the `source` context has internal sub-structure.
event producer (identified by `source`). In publish-subscribe scenarios, a
subscriber will typically subscribe to events emitted by a `source`, but the
`source` identifier alone might not be sufficient as a qualifier for any
specific event if the `source` context has internal sub-structure.

Identifying the subject of the event in context metadata (opposed to only in
the `data` payload) is particularly helpful in generic subscription filtering
Expand All @@ -215,13 +219,14 @@ within the same JSON object.
ending with '.jpg' or '.jpeg' and the `subject` attribute allows for
constructing a simple and efficient string-suffix filter for that subset of
events.

- Constraints:
- OPTIONAL
- If present, MUST be a non-empty string
- Example:
- A subscriber might register interest for when new blobs are created
inside a blob-storage container. In this case, the event `source` identifies
the subscription scope (storage container), the `type` identifies the "blob
- A subscriber might register interest for when new blobs are created inside a
blob-storage container. In this case, the event `source` identifies the
subscription scope (storage container), the `type` identifies the "blob
created" event, and the `id` uniquely identifies the event instance to
distinguish separate occurrences of a same-named blob having been created;
the name of the newly created blob is carried in `subject`:
Expand Down Expand Up @@ -325,27 +330,28 @@ can also be used to help intermediate gateways determine how to route the
events.

### datacontentencoding
- Type: `String` per [RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1)
- Description: Describes the content encoding for the `data`
attribute for when the `data` field MUST be encoded as a string,
like with structured transport binding modes using the JSON event
format, but the `datacontenttype` indicates a non-string media
type. When the `data` field's effective data type is not `String`,
this attribute MUST NOT be set and MUST be ignored when set.

The "Base64" value for the Base64 encoding as defined in [RFC 2045 Section 6.8](https://tools.ietf.org/html/rfc2045#section-6.8)
MUST be supported. When set, the event-format-encoded value of the `data`
attribute is a base64 string, but the effective data type of
the `data` attribute towards the application is the base64-decoded
binary array.

- Type: `String` per
[RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1)
- Description: Describes the content encoding for the `data` attribute for when
the `data` field MUST be encoded as a string, like with structured transport
binding modes using the JSON event format, but the `datacontenttype` indicates
a non-string media type. When the `data` field's effective data type is not
`String`, this attribute MUST NOT be set and MUST be ignored when set.

The "Base64" value for the Base64 encoding as defined in
[RFC 2045 Section 6.8](https://tools.ietf.org/html/rfc2045#section-6.8) MUST
be supported. When set, the event-format-encoded value of the `data` attribute
is a base64 string, but the effective data type of the `data` attribute
towards the application is the base64-decoded binary array.

All other RFC2045 schemes are undefined for CloudEvents.

- Constraints:
- The attribute MUST be set if the `data` attribute contains string-encoded
binary data. Otherwise the attribute MUST NOT be set.
- If present, MUST adhere to [RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1)

- If present, MUST adhere to
[RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1)

## Data Attribute

Expand Down Expand Up @@ -397,7 +403,7 @@ The following example shows a CloudEvent serialized as JSON:

```JSON
{
"specversion" : "0.2",
"specversion" : "0.3-wip",
"type" : "com.github.pull.create",
"source" : "https://github.com/cloudevents/spec/pull",
"subject" : "123",
Expand Down

0 comments on commit 471fe82

Please sign in to comment.