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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event_property_is and event_property_contains props to PushConditions #1673
Add event_property_is and event_property_contains props to PushConditions #1673
Changes from 2 commits
7a33300
56a440e
c335f2b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm. The spec displays this in a way that implies it should be an array. It looks like https://github.com/matrix-org/matrix-spec/blob/main/layouts/partials/openapi/render-object-table.html needs an update to handle this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait. According to https://swagger.io/docs/specification/data-models/data-types/, this is not valid. "
type
as a list is not valid in OpenAPI (even though it is valid in JSON Schema)".However, it is definitely a pattern we use elsewhere, such as here.
@KitsuneRal or @zecakeh, as people who know a lot more about OpenAPI than me: can you comment on this? Should we be updating the
render-object-table
to support multi-valuedtype
s? Or should we be usingoneOf
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not valid in OpenAPI 3.0, it is valid in OpenAPI 3.1, which is fully compatible with JSON Schema.
From "Migrating from OpenAPI 3.0 to 3.1.0":
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thanks for the clarification; that's very helpful.
In that case I guess we should merge this and file a separate issue to fix the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1675
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record:
I don't find the wording "a non-compound canonical JSON value" particularly clear, but it does match the existing wording in the Conditions section, so let's go with it.