[Subscription] Remove exactly one attribute restriction for exact, prefix and suffix filters#957
Merged
duglin merged 2 commits intoFeb 24, 2022
Conversation
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>
2538c05 to
eec8009
Compare
Member
Author
|
The CI error isn't related: |
Contributor
|
Thanks for doing this! This is definitely a big improvement from a UX perspective based on the users feedback so far. Do you mind updating the openopi schema as well? https://github.com/cloudevents/spec/blob/main/subscriptions/subscriptions-openapi.yaml |
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Collaborator
|
Seems like a reasonable UX improvement/optimization |
Collaborator
|
Approved on the 2/24 call |
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.
To improve the usage of the API in the common case, I'm removing
the restriction for
exact,prefixandsuffixfilters of onlycontaining exactly one attribute.
When multiple attributes are specified, all attributes must match (
like in 1), for example, these filters:
can be written as:
Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com
Proposed Changes
Release Note