Skip to content

Commit

Permalink
per today's call
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Davis <dug@us.ibm.com>
  • Loading branch information
Doug Davis committed Aug 8, 2019
1 parent 8abf3f1 commit d22b77f
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 80 deletions.
2 changes: 1 addition & 1 deletion SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Here's the list of getters:
Source() -> URL
EventID() -> string
EventTime() -> RFC3339
DataSchemaURL() -> string
DataSchema() -> string
DataContentType() -> string
Data() -> serializable
Extensions() -> map[string]string
Expand Down
2 changes: 1 addition & 1 deletion adapters/aws-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ same pattern as described in the following table:
| `type` | `com.amazonaws.s3.` + "eventName" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | S3 event type (e.g. `application/json`) |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "s3.object.key" value |
| `time` | "eventTime" value |
| `data` | S3 event |
Expand Down
88 changes: 44 additions & 44 deletions adapters/github.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions adapters/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ based on the specified event.
| `type` | `com.gitlab.push` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "checkout_sha" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand All @@ -35,7 +35,7 @@ based on the specified event.
| `type` | `com.gitlab.tag_push` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "ref" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand All @@ -50,7 +50,7 @@ based on the specified event.
| `type` | `com.gitlab.issue.` + "object_attributes.state" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.iid" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand All @@ -65,7 +65,7 @@ based on the specified event.
| `type` | `com.gitlab.note.commit` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.id" value |
| `time` | "object_attributes.created_at" value |
| `data` | Content of HTTP request body |
Expand All @@ -80,7 +80,7 @@ based on the specified event.
| `type` | `com.gitlab.note.merge_request` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.id" value |
| `time` | "object_attributes.created_at` value |
| `data` | Content of HTTP request body |
Expand All @@ -95,7 +95,7 @@ based on the specified event.
| `type` | `com.gitlab.note.issue` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.id" value |
| `time` | "object_attributes.created_at" value |
| `data` | Content of HTTP request body |
Expand All @@ -110,7 +110,7 @@ based on the specified event.
| `type` | `com.gitlab.note.snippet` |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.id" value |
| `time` | "object_attributes.created_at" value |
| `data` | Content of HTTP request body |
Expand All @@ -125,7 +125,7 @@ based on the specified event.
| `type` | `com.gitlab.merge_request.` + "object_attributes.action" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.iid" value |
| `time` | "object_attributes.created_at" value |
| `data` | Content of HTTP request body |
Expand All @@ -140,7 +140,7 @@ based on the specified event.
| `type` | `com.gitlab.wiki_page.` + "object_attributes.action" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.slug" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand All @@ -155,7 +155,7 @@ based on the specified event.
| `type` | `com.gitlab.pipeline.` + "object_attributes.status" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "object_attributes.id" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand All @@ -170,7 +170,7 @@ based on the specified event.
| `type` | `com.gitlab.job.` + "job_status" value |
| `datacontentencoding` | Omit |
| `datacontenttype` | `application/json` |
| `dataschemaurl` | Omit |
| `dataschema` | Omit |
| `subject` | "job_id" value |
| `time` | Current time |
| `data` | Content of HTTP request body |
Expand Down
26 changes: 13 additions & 13 deletions avro-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,20 @@ to the one described by the [CloudEvent Avro Schema](./spec.avsc):

The following table shows exemplary mappings:

| CloudEvents | Type | Exemplary Avro Value |
| --------------- | --------- | ---------------------------------------------- |
| type | string | `"com.example.someevent"` |
| specversion | string | `"0.4-wip` |
| source | string | `"/mycontext"` |
| id | string | `"7a0dc520-c870-4193c8"` |
| time | string | `"2019-06-05T23:45:00Z"` |
| dataschemaurl | string | `"http://registry.com/schema/v1/much.json"` |
| contenttype | string | `"application/json"` |
| data | string | `"{"much":{"wow":"json"}}"` |
| CloudEvents | Type | Exemplary Avro Value |
| ------------ | --------- | ---------------------------------------------- |
| type | string | `"com.example.someevent"` |
| specversion | string | `"0.4-wip` |
| source | string | `"/mycontext"` |
| id | string | `"7a0dc520-c870-4193c8"` |
| time | string | `"2019-06-05T23:45:00Z"` |
| dataschema | string | `"http://registry.com/schema/v1/much.json"` |
| contenttype | string | `"application/json"` |
| data | string | `"{"much":{"wow":"json"}}"` |
||||
| dataschemaurl | string | `"http://registry.com/subjects/ce/versions/1"` |
| contenttype | string | `"application/avro"` |
| data | string | `"Q2xvdWRFdmVudHM="` |
| dataschema | string | `"http://registry.com/subjects/ce/versions/1"` |
| contenttype | string | `"application/avro"` |
| data | string | `"Q2xvdWRFdmVudHM="` |

## References

Expand Down
2 changes: 1 addition & 1 deletion primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ error reporting to report them.
## Versioning of Attributes

For certain CloudEvents attributes, the entity or data model referenced by its
value might change over time. For example, `dataschemaurl` might reference one
value might change over time. For example, `dataschema` might reference one
particular version of a schema document. Often these attribute values will then
distinguish each variant by including some version-specific string as part of
its value. For example, a version number (`v1`, `v2`), or a date (`2018-01-01`)
Expand Down
8 changes: 4 additions & 4 deletions spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"time": {
"$ref": "#/definitions/time"
},
"dataschemaurl": {
"$ref": "#/definitions/dataschemaurl"
"dataschema": {
"$ref": "#/definitions/dataschema"
},
"subject": {
"$ref": "#/definitions/subject"
Expand All @@ -52,9 +52,9 @@
"format": "date-time",
"type": "string"
},
"dataschemaurl": {
"dataschema": {
"type": "string",
"format": "uri-reference"
"format": "uri"
},
"subject": {
"type": "string",
Expand Down
13 changes: 8 additions & 5 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ as a string.
- `Map` - `String`-indexed dictionary of `Any`-typed values.
- String encoding: JSON Object per
[RFC 7159, Section 4](https://tools.ietf.org/html/rfc7159#section-4)
- `URI` - Absolute uniform resource identifier.
- String encoding: `Absolute URI` as defined in
[RFC 3986 Section 4.3](https://tools.ietf.org/html/rfc3986#section-4.3).
- `URI-reference` - Uniform resource identifier reference.
- String encoding: `URI-reference` as defined in
[RFC 3986 Section 4.1](https://tools.ietf.org/html/rfc3986#section-4.1).
Expand Down Expand Up @@ -354,11 +357,11 @@ on the definition of OPTIONAL.
- For Media Type examples see
[IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml)

#### dataschemaurl
#### dataschema

- Type: `URI-reference`
- Description: A link to the schema that the `data` attribute adheres to.
Incompatible changes to the schema SHOULD be reflected by a different URL. See
- Type: `URI`
- Description: Identifies the schema that the `data` attribute adheres to.
Incompatible changes to the schema SHOULD be reflected by a different URI. See
[Versioning of Attributes in the Primer](primer.md#versioning-of-attributes)
for more information.
- Constraints:
Expand Down Expand Up @@ -451,7 +454,7 @@ encapsulated within the `data` attribute.

- Type: `Any`
- Description: The event payload. The payload depends on the `type` and the
`dataschemaurl`. It is encoded into a media format which is specified by the
`dataschema`. It is encoded into a media format which is specified by the
`datacontenttype` attribute (e.g. application/json).
- Constraints:
- OPTIONAL
Expand Down

0 comments on commit d22b77f

Please sign in to comment.