-
Notifications
You must be signed in to change notification settings - Fork 385
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
Responses schema fixes #3650
Responses schema fixes #3650
Conversation
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 looks like some of these are introducing response bodies rather than clarifying them - evidence to support that synapse has always done this would be appreciated, otherwise an MSC is likely required.
I have now checked in Synapse and can confirm that all these responses have a
Is that enough for you? |
for the endpoints we mostly just need evidence that it's always returned these things prior to 1.0 (roughly). Adjusted links to account for time: |
The link here is for the
Not mentioned here are:
|
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.
this is fine except... it doesn't seem to have worked? None of the modified endpoints (with the exception of /account/3pid
, which has a non-empty body) show a response body in the preview.
also, you might want to merge in main, to pick up 97a8b0b, to fix the CI |
As I said in the review-conversation above, it does work: the artifact contains the expected bits and this can be verified by opening the file with a viewer.
This goes beyond my understanding of Github Pull Requests and Reviews, in the sense that I don’t know how to do that in a way that I am certain will not break something for someone here. With Gitlab, I know that I could just rebase the branch on top of main and everything would be fine for everyone, but I know doing this with Github makes everyone unhappy. Since we know for a fact the red thing in CI is fixed in main, has nothing to do with the changes here, and this PR will end up “Squashed and merged” anyway, do we really need to worry about this? |
no, but it's easier just to do it than verify the cause of the CI failure:
and yes, please don't rebase! |
Considering this has been confirmed to be synapse’s behaviour, is |
Yes I think so. Thanks! |
examples: | ||
application/json: {} | ||
schema: | ||
type: object | ||
properties: {} |
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 think this ends up being pretty much a no-op. An object with no properties
is the same as one with an empty properties
, and the auto-generated example looks the same as the one we are creating 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.
Maybe, but that wouldn’t be consistent with what we have for other cases. Is there anything to change here or can we mark this resolved?
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.
nope, just calling it out explicitly for future reference. I'd leave the thread open for future viewers.
(have updated the PR description to make it clear which endpoints we're fixing 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.
LGTM other than the changelog.
Co-authored-by: Richard van der Hoff <[email protected]>
Fixes #2237.
Corrects the response schemas for:
Preview: https://pr3650--matrix-org-previews.netlify.app