Skip to content
Merged
Show file tree
Hide file tree
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
33 changes: 15 additions & 18 deletions subscriptions/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,53 +761,50 @@ implementations MUST support:

###### `exact` filter dialect

Use of this MUST include exactly one nested property, where the key is the
name of the CloudEvents attribute to be matched, and its value is the String
value to use in the comparison. To evaluate to true the value of the
matching CloudEvents attribute MUST exactly match the value String specified
(case sensitive).
The keys are the names of the CloudEvents attributes to be matched,
and their values are the String values to use in the comparison.
To evaluate to true the values of the matching CloudEvents attributes MUST
all exactly match with the associated value String specified (case sensitive).

The attribute name and value specified in the filter express MUST NOT be
empty strings.

For example:

```json
{ "exact": { "type": "com.github.push" } }
{ "exact": { "type": "com.github.push", "subject": "https://github.com/cloudevents/spec" } }
```

###### `prefix` filter dialect

Use of this MUST include exactly one nested property, where the key is the
name of the CloudEvents attribute to be matched, and its value is the String
value to use in the comparison. To evaluate to true the value of the
matching CloudEvents attribute MUST start with the value String specified
(case sensitive).
The keys are the names of the CloudEvents attributes to be matched,
and their values are the String values to use in the comparison.
To evaluate to true the values of the matching CloudEvents attributes MUST
all start with the associated value String specified (case sensitive).

The attribute name and value specified in the filter express MUST NOT be
empty strings.

For example:

```json
{ "prefix": { "type": "com.github." } }
{ "prefix": { "type": "com.github.", "subject": "https://github.com/cloudevents" } }
```

###### `suffix` filter dialect

Use of this MUST include exactly one nested property, where the key is the
name of the CloudEvents attribute to be matched, and its value is the String
value to use in the comparison. To evaluate to true the value of the
matching CloudEvents attribute MUST end with the value String specified
(case sensitive).
The keys are the names of the CloudEvents attributes to be matched,
and their values are the String values to use in the comparison.
To evaluate to true the values of the matching CloudEvents attributes MUST
all end with the associated value String specified (case sensitive).

The attribute name and value specified in the filter express MUST NOT be
empty strings.

For example:

```json
{ "suffix": { "type": ".created" } }
{ "suffix": { "type": ".created", "subject": "/cloudevents/spec" } }
```

###### `all` filter dialect
Expand Down
73 changes: 26 additions & 47 deletions subscriptions/subscriptions-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,54 +319,33 @@ components:
CloudEventsAttribute:
type: object
description: "CloudEvents defined attributes."
additionalProperties: false
oneOf:
- type: object
properties:
id:
type: string
description: Identifies the event.
- type: object
properties:
source:
type: string
description: Identifies the context in which an event happened.
- type: object
properties:
specversion:
type: string
description: The version of the CloudEvents specification which the event uses.
- type: object
properties:
type:
type: string
description: Describes the type of event related to the originating occurrence.
- type: object
properties:
datacontenttype:
type: string
description: Content type of the data value.
- type: object
properties:
dataschema:
type: string
description: Identifies the schema that data adheres to.
- type: object
properties:
subject:
type: string
description: Describes the subject of the event in the context of the event producer.
- type: object
properties:
time:
type: string
description: Timestamp of when the occurrence happened.
- $ref: "#/components/schemas/CloudEventAttributeExtenion"
CloudEventAttributeExtenion:
type: object
description: "CloudEvents defined attributes."
additionalProperties:
additionalProperties: # extension attributes
type: string
properties:
id:
type: string
description: Identifies the event.
source:
type: string
description: Identifies the context in which an event happened.
specversion:
type: string
description: The version of the CloudEvents specification which the event uses.
type:
type: string
description: Describes the type of event related to the originating occurrence.
datacontenttype:
type: string
description: Content type of the data value.
dataschema:
type: string
description: Identifies the schema that data adheres to.
subject:
type: string
description: Describes the subject of the event in the context of the event producer.
time:
type: string
description: Timestamp of when the occurrence happened.
ProtocolSettings:
type: object
additionalProperties: false
Expand Down