[Subscriptions API] Multiple dialects in the filter object#803
Merged
duglin merged 3 commits intoMay 24, 2021
Conversation
duglin
reviewed
Apr 8, 2021
Collaborator
|
No strong opinion but I do suspect AND will be one of the more popular dialects. |
8 tasks
Collaborator
|
rebase needed |
Collaborator
|
we'd need to change the schema too, from: to right? |
9b9cd32 to
1172ab8
Compare
Member
Author
|
Schema fixed |
Collaborator
1172ab8 to
aa0f787
Compare
Member
Author
|
I've removed the openapi schema change as discussed during the meeting |
Renamed filter to filters Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
aa0f787 to
531ca9b
Compare
Member
Author
|
After discussing with @clemensv, I've changed this PR completely. I've updated the description of the PR accordingly |
duglin
reviewed
May 13, 2021
duglin
reviewed
May 13, 2021
Collaborator
|
Just a few minor syntax questions, otherwise SGTM |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Collaborator
|
Approved on the 5/20 call |
Member
Author
|
I'm going to push the followup change to the openapi spec soon |
slinkydeveloper
added a commit
to slinkydeveloper/spec
that referenced
this pull request
Jun 1, 2021
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
duglin
pushed a commit
that referenced
this pull request
Jun 9, 2021
[Subscriptions API] Fix OpenAPI as followup of #803
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, like in cloudevents#803, I'm removing the restriction for `exact, `prefix` and `suffix` filters of only containing exacly one attribute. When multiple attributes are specified, all filter must match, for example, these filters: ```yaml filters: - all: suffix: type: "com.github.push" - all: suffix: subject: "https//github.com/cloudevents/spec" ``` can be written as: ```yaml filters: - suffix: type: "com.github.push" subject: "https//github.com/cloudevents/spec" ``` Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, like in cloudevents#803, I'm removing the restriction for `exact, `prefix` and `suffix` filters of only containing exacly one attribute. When multiple attributes are specified, all filter must match, for example, these filters: ```yaml filters: - suffix: type: "com.github.push" - suffix: subject: "https//github.com/cloudevents/spec" ``` can be written as: ```yaml filters: - suffix: type: "com.github.push" subject: "https//github.com/cloudevents/spec" ``` Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, I'm removing
the restriction for `exact, `prefix` and `suffix` filters of only
containing exacly one attribute.
When multiple attributes are specified, all filter must match (
like in [1]), for example, these filters:
```yaml
filters:
- suffix:
type: "com.github.push"
- suffix:
subject: "https//github.com/cloudevents/spec"
```
can be written as:
```yaml
filters:
- suffix:
type: "com.github.push"
subject: "https//github.com/cloudevents/spec"
```
[1]: cloudevents#803
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, I'm removing
the restriction for `exact, `prefix` and `suffix` filters of only
containing exacly one attribute.
When multiple attributes are specified, all filter must match (
like in [1]), for example, these filters:
```yaml
filters:
- suffix:
type: "com.github.push"
- suffix:
subject: "https//github.com/cloudevents/spec"
```
can be written as:
```yaml
filters:
- suffix:
type: "com.github.push"
subject: "https//github.com/cloudevents/spec"
```
[1]: cloudevents#803
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, I'm removing
the restriction for `exact`, `prefix` and `suffix` filters of only
containing exacly one attribute.
When multiple attributes are specified, all filter must match (
like in [1]), for example, these filters:
```yaml
filters:
- suffix:
type: "com.github.push"
- suffix:
subject: "https//github.com/cloudevents/spec"
```
can be written as:
```yaml
filters:
- suffix:
type: "com.github.push"
subject: "https//github.com/cloudevents/spec"
```
[1]: cloudevents#803
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, I'm removing
the restriction for `exact`, `prefix` and `suffix` filters of only
containing exactly one attribute.
When multiple attributes are specified, all attributes must match (
like in [1]), for example, these filters:
```yaml
filters:
- suffix:
type: "com.github.push"
- suffix:
subject: "https//github.com/cloudevents/spec"
```
can be written as:
```yaml
filters:
- suffix:
type: "com.github.push"
subject: "https//github.com/cloudevents/spec"
```
[1]: cloudevents#803
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
pierDipi
added a commit
to pierDipi/spec
that referenced
this pull request
Feb 21, 2022
To improve the usage of the API in the common case, I'm removing
the restriction for `exact`, `prefix` and `suffix` filters of only
containing exactly one attribute.
When multiple attributes are specified, all attributes must match (
like in [1]), for example, these filters:
```yaml
filters:
- suffix:
type: "com.github.push"
- suffix:
subject: "https//github.com/cloudevents/spec"
```
can be written as:
```yaml
filters:
- suffix:
type: "com.github.push"
subject: "https//github.com/cloudevents/spec"
```
[1]: cloudevents#803
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
duglin
pushed a commit
that referenced
this pull request
Feb 24, 2022
…efix and suffix filters (#957) * Remove exactly one attribute restriction for exact, prefix and suffix To improve the usage of the API in the common case, I'm removing the restriction for `exact`, `prefix` and `suffix` filters of only containing exactly one attribute. When multiple attributes are specified, all attributes must match ( like in [1]), for example, these filters: ```yaml filters: - suffix: type: "com.github.push" - suffix: subject: "https//github.com/cloudevents/spec" ``` can be written as: ```yaml filters: - suffix: type: "com.github.push" subject: "https//github.com/cloudevents/spec" ``` [1]: #803 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Update subscription open API Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
clemensv
pushed a commit
to clemensv/spec
that referenced
this pull request
Aug 19, 2022
…efix and suffix filters (cloudevents#957) * Remove exactly one attribute restriction for exact, prefix and suffix To improve the usage of the API in the common case, I'm removing the restriction for `exact`, `prefix` and `suffix` filters of only containing exactly one attribute. When multiple attributes are specified, all attributes must match ( like in [1]), for example, these filters: ```yaml filters: - suffix: type: "com.github.push" - suffix: subject: "https//github.com/cloudevents/spec" ``` can be written as: ```yaml filters: - suffix: type: "com.github.push" subject: "https//github.com/cloudevents/spec" ``` [1]: cloudevents#803 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Update subscription open API Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modifies the shape of the
filtersubscription request attribute to an array of filter expressions:This:
Becomes this:
The reason to introduce this change is to improve ergonomics of the filter usage in most use cases, where at the top level the user wants to do an and of several filters. In other words this:
Can be written as:
It also renames
filtertofilters, in order to be more consistent with the change itself.The openapi schema change is going to be introduced in another PR.
Signed-off-by: Francesco Guardiani francescoguard@gmail.com