Skip to content
Closed
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
28 changes: 17 additions & 11 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,25 @@ that contains both context and data).
[RFC 2046](https://tools.ietf.org/html/rfc2046)
* For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml)

### extensions
* Type: Map <String, Object>
* Description: This is for additional metadata and this does not have a
mandated structure. This enables a place for custom fields a producer or
middleware might want to include and provides a place to test metadata before
adding them to the CloudEvents specification. TBD - Determine a shorter
prefix for this (e.g. OpenAPI uses “x-”)
### application-properties
* Type: <Key Value>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be easier to just define this as a Map and say the "value" MUST be a "string" instead of an "Any". That would remove the need for most of the rules specified below because they would be implicit/obvious. But if you do keep any of the rules then they should use MUST instead of "should".

* Description: A list of “key : value” pairs providing information about the event, which are
used by an event-based application. The “key : value” pairs should be in flat structure.
The value should be a string. There should be no duplication of keys.
One usage example: an application workflow can use a "key:value" to correlate multiple events
(from different event sources) asscociated with a serverless application workflow.
* Constraints:
* OPTIONAL
* If present, MUST contain at least one entry
* MANDATORY
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/MANDATORY/REQUIRED/

* MUST be in the format of <key value> pair.
* Examples:
* authorization data

application-properties
{
"building address": "12 Main Street, Copenhagen, Denmark, 123456"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing , at the end of each line

"floor": "2"
"apartmentId": "345"
"sensor-location": "room1.window2"
}

### data
* Type: Arbitrary payload
* Description: The event payload. The payload depends on the event-type,
Expand Down