Skip to content

Commit

Permalink
run the linter
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Davis <[email protected]>
  • Loading branch information
Doug Davis committed Oct 17, 2019
1 parent 8e9ec41 commit 374d06e
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 131 deletions.
6 changes: 3 additions & 3 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ If a vote is taken during a meeting, the follow rules will be followed:
An acceptable absence would include situations where the person is not
officially working at all, such as being on vacation, taking a sabbatical or
there is a public holiday. However, situations such as a scheduling conflict
would not apply. Absence from meetings during that time will not impact
would not apply. Absence from meetings during that time will not impact
their voting rights.
- Only members with voting rights will be allowed to vote.
- A vote passes if more than 50% of the votes cast approve the motion.
Expand Down Expand Up @@ -122,8 +122,8 @@ To create a new release:
- Add some descriptive text, or the list of PRs that have been merged since
the previous release. The git query to get the list commits since the last
release is:
`git log --pretty=format:%s master...v0.1 | grep -v "Merge pull"`.
Just replace "v0.1" with the name of the previous release.
`git log --pretty=format:%s master...v0.1 | grep -v "Merge pull"`.
Just replace "v0.1" with the name of the previous release.
- Press `Publish release` button
- Create a PR that modifies the version string in all of the files
(but not the README.md table) to be the next version number with a `-wip`
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ a Cloud Native sandbox level project on

The following documents are available:

| | Latest Release | Working Draft |
| :---------------------------- | :-----------------------------------------------------------------------------: | :---------------------------------------------------------------------------------: |
| | Latest Release | Working Draft |
| :---------------------------- | :-------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------: |
| **Core Specification:** |
| CloudEvents | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/spec.md) | [master](https://github.com/cloudevents/spec/blob/master/spec.md) |
| |
| **Optional Specifications:** |
| AMQP Transport Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/amqp-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/amqp-protocol-binding.md) |
| AVRO Event Format | - | [master](./avro-format.md) |
| HTTP Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/http-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/http-protocol-binding.md) |
| AMQP Transport Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/amqp-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/amqp-protocol-binding.md) |
| AVRO Event Format | - | [master](./avro-format.md) |
| HTTP Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/http-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/http-protocol-binding.md) |
| JSON Event Format | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/json-format.md) | [master](https://github.com/cloudevents/spec/blob/master/json-format.md) |
| Kafka Protocol Binding | - | [master](https://github.com/cloudevents/spec/blob/master/kafka-protocol-binding.md) |
| MQTT Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/mqtt-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/mqtt-protocol-binding.md) |
| NATS Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/nats-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/nats-protocol-binding.md) |
| Kafka Protocol Binding | - | [master](https://github.com/cloudevents/spec/blob/master/kafka-protocol-binding.md) |
| MQTT Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/mqtt-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/mqtt-protocol-binding.md) |
| NATS Protocol Binding | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/nats-transport-binding.md) | [master](https://github.com/cloudevents/spec/blob/master/nats-protocol-binding.md) |
| Web hook | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/http-webhook.md) | [master](https://github.com/cloudevents/spec/blob/master/http-webhook.md) |
| |
| **Additional Documentation:** |
| CloudEvents Adapters | - | [master](https://github.com/cloudevents/spec/blob/master/adapters.md) |
| CloudEvents SDK Requirements | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/SDK.md) | [master](https://github.com/cloudevents/spec/blob/master/SDK.md) |
| Documented Extensions | - | [master](https://github.com/cloudevents/spec/blob/master/documented-extensions.md) |
| CloudEvents Adapters | - | [master](https://github.com/cloudevents/spec/blob/master/adapters.md) |
| CloudEvents SDK Requirements | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/SDK.md) | [master](https://github.com/cloudevents/spec/blob/master/SDK.md) |
| Documented Extensions | - | [master](https://github.com/cloudevents/spec/blob/master/documented-extensions.md) |
| Primer | [v1.0-rc1](https://github.com/cloudevents/spec/blob/v1.0-rc1/primer.md) | [master](https://github.com/cloudevents/spec/blob/master/primer.md) |
| Proprietary Specifications | - | [master](https://github.com/cloudevents/spec/blob/master/proprietary-specs.md) |
| Proprietary Specifications | - | [master](https://github.com/cloudevents/spec/blob/master/proprietary-specs.md) |

If you are new to CloudEvents, it is recommended that you start by reading the
[Primer](primer.md) for an overview of the specification's goals and design
Expand Down
6 changes: 3 additions & 3 deletions adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ CloudEvents attributes. In order to promote interoperability across multiple
implementations of these adpaters, the following documents show the proposed
algorithms that should be used:

* [AWS S3](adapters/aws-s3.md)
* [GitHub](adapters/github.md)
* [GitLab](adapters/gitlab.md)
- [AWS S3](adapters/aws-s3.md)
- [GitHub](adapters/github.md)
- [GitLab](adapters/gitlab.md)
22 changes: 9 additions & 13 deletions amqp-protocol-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mandate specific existing features to be used.
This specification does not further define any of the [CloudEvents][ce] event
attributes.

One event attribute, `datacontenttype` is handled specially in *binary* content
One event attribute, `datacontenttype` is handled specially in _binary_ content
mode and mapped onto the AMQP content-type message property. All other
attributes are transferred as metadata without further interpretation.

Expand Down Expand Up @@ -194,12 +194,12 @@ the native AMQP types above or the canonical string form.

An implementation

- MUST be able to interpret both forms on an incoming AMQP message
- MUST be able to interpret both forms on an incoming AMQP message
- MAY further relax the requirements for incoming messages (for example
accepting numeric types other than AMQP long), but MUST be strict for outgoing
messages.
accepting numeric types other than AMQP long), but MUST be strict for outgoing
messages.
- SHOULD use the native AMQP form on outgoing AMQP messages when it is efficient
to do so, but MAY forward values as canonical strings
to do so, but MAY forward values as canonical strings

#### 3.1.4 Examples

Expand Down Expand Up @@ -312,11 +312,7 @@ content-type: application/cloudevents+json; charset=utf-8
[rfc4627]: https://tools.ietf.org/html/rfc4627
[rfc6839]: https://tools.ietf.org/html/rfc6839#section-3.1
[rfc7159]: https://tools.ietf.org/html/rfc7159
[oasis-amqp-1.0]:
http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-overview-v1.0.html
[message-format]:
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format
[data]:
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-data
[app-properties]:
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties
[oasis-amqp-1.0]: http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-overview-v1.0.html
[message-format]: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format
[data]: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-data
[app-properties]: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties
2 changes: 1 addition & 1 deletion documented-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MAY), this usage only applies to events that use the extension.

Extensions attributes, while not defined by the core CloudEvents specifications,
MUST follow the same serialization rules as defined by the format and protocol
binding specifications. See
binding specifications. See
[Extension Context Attributes](spec.md#extension-context-attributes) for more
information.

Expand Down
22 changes: 11 additions & 11 deletions extensions/dataref.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,38 @@ attribute by using the `dataref` attribute.
## Attributes

### dataref
* Type: `URI-reference`
* Description: A reference to a location where the event payload is stored. The

- Type: `URI-reference`
- Description: A reference to a location where the event payload is stored. The
location MAY not be accessible without further information (e.g. a pre-shared
secret).

Known as the "Claim Check Pattern", this attribute MAY be used for a variety
of purposes, including:

* If the [Data](../spec.md#data) is too large to be included in the message,
- If the [Data](../spec.md#data) is too large to be included in the message,
the `data` is not present, and the consumer can retrieve it using
this attribute.
* If the consumer wants to verify that the [Data](../spec.md#data) has not
- If the consumer wants to verify that the [Data](../spec.md#data) has not
been tampered with, it can retrieve it from a trusted source using this
attribute.
* If the [Data](../spec.md#data) MUST only be viewed by trusted consumers
(e.g. personally identifiable information), only a trusted consumer can
- If the [Data](../spec.md#data) MUST only be viewed by trusted consumers
(e.g. personally identifiable information), only a trusted consumer can
retrieve it using this attribute and a pre-shared secret.

If this attribute is used, the information SHOULD be accessible long enough
for all consumers to retrieve it, but MAY not be stored for an extended period
of time.

* Constraints:
* OPTIONAL
- Constraints:
- OPTIONAL

# Examples

The following example shows a CloudEvent in which the event producer has included
both `data` and `dataref` (serialized as JSON):

``` JSON
```JSON
{
"specversion" : "1.0-rc1",
"type" : "com.github.pull.create",
Expand All @@ -60,7 +61,7 @@ both `data` and `dataref` (serialized as JSON):
The following example shows a CloudEvent in which a middleware has replaced the
`data` with a `dataref` (serialized as JSON):

``` JSON
```JSON
{
"specversion" : "1.0-rc1",
"type" : "com.github.pull.create",
Expand All @@ -70,4 +71,3 @@ The following example shows a CloudEvent in which a middleware has replaced the
"dataref" : "https://tenant123.middleware.com/events/data/A234-1234-1234.xml"
}
```

18 changes: 9 additions & 9 deletions extensions/partitioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ same bucket are done so by using the same partition key on those events.

### partitionkey

* Type: `String`
* Description: A partition key for the event, typically for the purposes of
- Type: `String`
- Description: A partition key for the event, typically for the purposes of
defining a causal relationship/grouping between multiple events. In cases
where the CloudEvent is delivered to an event consumer via multiple hops,
it is possible that the value of this attribute might change, or even be
removed, due to protocol semantics or business processing logic within
it is possible that the value of this attribute might change, or even be
removed, due to protocol semantics or business processing logic within
each hop.
* Examples:
* The ID of the entity that the event is associated with
* Constraints:
* REQUIRED
* MUST be a non-empty string
- Examples:
- The ID of the entity that the event is associated with
- Constraints:
- REQUIRED
- MUST be a non-empty string
2 changes: 1 addition & 1 deletion extensions/sampled-rate.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ they impose additional sampling.
would be 30 (29 not sent and 1 sent). A value of `1` is the equivalent of this
extension not being used at all.
- Constraints
- The rate MUST be greater than zero.
- The rate MUST be greater than zero.
5 changes: 2 additions & 3 deletions http-webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ it.

Reaching the delivery agreement is realized using the following validation
handshake. The handshake can either be executed immediately at registration time
or as a "pre-flight" request immediately preceding a delivery.
or as a "pre-flight" request immediately preceding a delivery.

It is important to understand is that the handshake does not aim to establish an
authentication or authorization context. It only serves to protect the sender
Expand Down Expand Up @@ -346,8 +346,7 @@ WebHook-Allowed-Rate: 100
- [RFC7540][rfc7540] Hypertext Transfer Protocol Version 2 (HTTP/2)

[ce]: ./spec.md
[webhooks]:
http://progrium.com/blog/2007/05/03/web-hooks-to-revolutionize-the-web/
[webhooks]: http://progrium.com/blog/2007/05/03/web-hooks-to-revolutionize-the-web/
[content-type]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5
[retry-after]: https://tools.ietf.org/html/rfc7231#section-7.1.3
[authorization]: https://tools.ietf.org/html/rfc7235#section-4.2
Expand Down
41 changes: 20 additions & 21 deletions json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ with exceptions noted below.

| CloudEvents | JSON |
| ------------- | -------------------------------------------------------------- |
| Boolean | [boolean][json-bool]
| Boolean | [boolean][json-bool] |
| Integer | [number][json-number], only the `int` component is permitted |
| String | [string][json-string] |
| Binary | [string][json-string], [Base64-encoded][base64] binary |
Expand Down Expand Up @@ -93,14 +93,14 @@ respective CloudEvents type when the mapping rules are fulfilled.

The following table shows exemplary attribute mappings:

| CloudEvents | Type | Exemplary JSON Value |
| --------------- | ------------- | ------------------------------- |
| type | String | "com.example.someevent" |
| specversion | String | "1.0-rc1" |
| source | URI-reference | "/mycontext" |
| id | String | "1234-1234-1234" |
| time | Timestamp | "2018-04-05T17:31:00Z" |
| datacontenttype | String | "application/json" |
| CloudEvents | Type | Exemplary JSON Value |
| --------------- | ------------- | ----------------------- |
| type | String | "com.example.someevent" |
| specversion | String | "1.0-rc1" |
| source | URI-reference | "/mycontext" |
| id | String | "1234-1234-1234" |
| time | Timestamp | "2018-04-05T17:31:00Z" |
| datacontenttype | String | "application/json" |

### 2.4. JSONSchema Validation

Expand All @@ -120,26 +120,26 @@ the [type system mapping](#22-type-system-mapping).

### 3.1. Handling of "data"

Before taking action, a JSON serializer MUST first determine the runtime data
type of the `data` content.
Before taking action, a JSON serializer MUST first determine the runtime data
type of the `data` content.

If the implementation determines that the type of `data` is `Binary`, the value
MUST be represented as a [JSON string][json-string] expression containing the
MUST be represented as a [JSON string][json-string] expression containing the
[Base64][base64] encoded binary value, and use the member name `data_base64`
to store it inside the JSON object.
to store it inside the JSON object.

For any other type, the implementation MUST translate the `data` value into
For any other type, the implementation MUST translate the `data` value into
a [JSON value][json-value], and use the member name `data`
to store it inside the JSON object.
to store it inside the JSON object.

Out of this follows that use of the `data` and `data_base64` members is
mutually exclusive in a JSON serialized CloudEvent.
mutually exclusive in a JSON serialized CloudEvent.

When a CloudEvents is deserialized from JSON, the presence of the `data_base64`
member clearly indicates that the value is a Base64 encoded binary data, which
the serializer MUST decode into a binary runtime data type. When a `data`
member is present, it is decoded using the default JSON type mapping for the
used runtime.
the serializer MUST decode into a binary runtime data type. When a `data`
member is present, it is decoded using the default JSON type mapping for the
used runtime.

Unlike attributes, for which value types are restricted to strings per
the [type-system mapping](#22-type-system-mapping), the resulting `data` member
Expand Down Expand Up @@ -284,8 +284,7 @@ also valid in a request):
[ce-types]: ./spec.md#type-system
[content-type]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5
[json-format]: ./json-format.md
[json-geoseq]:
https://www.iana.org/assignments/media-types/application/geo+json-seq
[json-geoseq]: https://www.iana.org/assignments/media-types/application/geo+json-seq
[json-object]: https://tools.ietf.org/html/rfc7159#section-4
[json-seq]: https://www.iana.org/assignments/media-types/application/json-seq
[json-bool]: https://tools.ietf.org/html/rfc7159#section-3
Expand Down
Loading

0 comments on commit 374d06e

Please sign in to comment.