-
Notifications
You must be signed in to change notification settings - Fork 263
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
Be consistent about endpoint names #2857
Conversation
Sometimes, we called this `keys query`, sometimes `/keys/query`, and sometimes, just for variety, `keys/query`. Generally in Matrix we talk about `/keys/query` so let's standardise on that.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2857 +/- ##
=======================================
Coverage 82.37% 82.37%
=======================================
Files 211 211
Lines 21604 21604
=======================================
Hits 17796 17796
Misses 3808 3808 ☔ View full report in Codecov by Sentry. |
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.
I don't want to start a bikeshedding discussion, but… I find that adding the quotes and slashes makes the whole thing unwieldy, and more cumbersome than it ought to be. Plus, we're not doing this for every single request endpoint, so we're breaking consistency in other ways if we started doing it like that here. Also, I find it more human to talk about a "keys query response" rather than a "/keys/query
response"; the former is even more in line with our import renames e.g. KeysQueryResponse
. And, I'm 100% certain I'll forget about this new convention, since it's very not natural to me 🙃
Out of curiosity: apart from consistency with other projects, were there objective reasons to prefer this writing?
That's a compelling reason in itself tbh, especially when this SDK is just being used for a small part of a larger application :). And of course while you'll 100% forget about a convention of " IMHO the main reason to prefer " All that said: I don't care that much as long as we can agree that having log lines which switch randomly between |
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.
I'm against this change, but others in the Rust team (since we'll be the ones mostly interacting with all that code) don't feel as strongly against it, so I'll let them review.
For context, there was some discussion of this in an internal room. It felt like most other people find the "/keys/query" form helpful to reflect the fact we're talking about an actual endpoint rather than, more generally, about the "keys querying process". Still, I'm happy to find a compromise here. Some thoughts:
|
Sometimes, we called this
keys query
, sometimes/keys/query
, and sometimes, just for variety,keys/query
. Generally in Matrix we talk about/keys/query
so let's standardise on that.