-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Clarify what query parameters mean in thirdparty endpoints #560
Comments
Also note that Synapse seems to not even use those query parameters at all: |
I think you might be confused. The query parameters are called
It's not terribly clear, but the search fields are defined in https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-thirdparty-protocol-protocol |
Yeah, you're right, I skimmed that code too fast. However, if those parameters are just forwarded onto the appservice, then there is still a bug in either the client-server API spec or the application service API spec for the
I know that they're effectively strings with a regex constraint, but what I don't know is how to represent one or more strings in a query parameter. For example, is it: |
It's not The |
Oh wow, now I can't believe I misinterpreted that. Thanks for the clarification! Would it be useful to add an example of this to the specification? |
Yes, given it seems to be confusing people it's crying out for a good example :) |
Creating an example will be way easier once the specification uses OpenAPI 3.0, as dynamic query parameters aren't natively supported in OpenAPI 2.0. For now it's probably easier to just make the description for those |
According to our own extensions, |
Should I open a new issue, because that seems a bug in the spec itself. |
This bug is fine, it's the same issue. The spec could do with clarification, and that clarification work will also handle fixing the extensions. |
The openapi spec should now be correct with 1405184 and #1947. The text/rendering of the spec might still be unclear though. For me it wasn't immediately obvious why that is the case though, so let me explain (for future me for example):
References: |
Since things have changed a bit since this issue was opened, I've opened a new one to summarise the situation: #1993. |
The
/_matrix/client/r0/thirdparty/location/{protocol}
endpoint specifies asearchFields
query parameter with typestring
, but the description mentions it's: "one or more". What is the actual format for this query parameter?The same is also true for
/_matrix/client/r0/thirdparty/user/{protocol}
, the only difference being that the query parameter is calledfields...
. I found inapi/openapi_extensions.md
that it is supposed to mean "one or more", but no specification on the actual format.The text was updated successfully, but these errors were encountered: