Skip to content
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

We need to decide if trailing slashes are optional on requests #484

Open
turt2live opened this issue Jun 10, 2019 · 3 comments
Open

We need to decide if trailing slashes are optional on requests #484

turt2live opened this issue Jun 10, 2019 · 3 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit meta Something that is not a spec change/request and is not related to the build tools

Comments

@turt2live
Copy link
Member

See https://github.com/matrix-org/matrix-doc/issues/1944
See matrix-org/matrix-spec-proposals#2061
See matrix-org/matrix-spec-proposals#2097 (comment)

Personally, I'm of the opinion that it should be optional (ie: can be included or excluded).

@turt2live turt2live added clarification An area where the expected behaviour is understood, but the spec could do with being more explicit meta Something that is not a spec change/request and is not related to the build tools labels Jun 10, 2019
@ara4n
Copy link
Member

ara4n commented Aug 1, 2019

my thoughts on this are as per matrix-org/matrix-spec-proposals#1849 (comment)

@richvdh
Copy link
Member

richvdh commented May 12, 2020

my thoughts are, fairly strongly, that there should be exactly one way to do it. Having two ways to do anything leads us to the situation where:

  • most clients do it one way, some do it the other
  • a new server implementation is written and tested against the common clients, but never against the less common clients which do it the other way.
  • some clients are compatible with some some servers some of the time. oh hai xmpp.

@KitsuneRal
Copy link
Member

Being a happy developer of a client that generates paths directly from Swagger spec (and we have at least one case of doing the same for servers) I obviously would like that the Swagger definition is strictly followed. That makes the case in matrix-org/matrix-spec-proposals#2061 somewhat stand out: Swagger mandates required: true for all path parameters so the only reasonable way to incorporate this change is, exactly as the proposal section in it states, to make a separate endpoint (another, unreasonable, way would be to say that keyId is required but can be empty which is very confusing).

I agree with Rich that for the sake of consistency across the ecosystem we have to follow exactly one way, and no trailing slashes seems to be a de-facto accepted convention requiring the least number of adjustments. I would also prefer to declare endpoints with trailing slashes as generally a no-go zone within Matrix API, to simplify tracking down bugs in clients where the last parameter on the path is empty.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit meta Something that is not a spec change/request and is not related to the build tools
Projects
None yet
Development

No branches or pull requests

4 participants