-
Notifications
You must be signed in to change notification settings - Fork 11
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
It should be forbidden to invent own path variable names #128
Comments
Have you checked the old implementation? This was already fail-safe in the old JS client. |
I'm talking about what the API spec permits, not about the implementation of the JS client, so I'm a bit confused what you mean 🤔 I linked to the doc I read (the blue "say" above). |
I'm neutral on this issue. We can require it, but the current state can also easily be implemented with regular expression. So maybe let's put this on hold and wait how strict the back-ends follow this standard and reconsider changing it just before a 0.4 release. |
I'd prefer to force the back-ends to follow the spec, because that's what a spec is for, but I can deal with your suggestion. |
…ndpoint paths (#128) and more. Updated processes.
Fixed for API v0.4. |
I'm currently building a "method name -> endpoint" map for the JS client's implementation of
hasFeature
(background: #125) and realised that it'll be very important that all back-ends adhere to the same syntax and names when paths incorporate variables. E.g. I hard-codeddescribeJob
to belong toGET /jobs/{job_id}
- but if some back-end outputs/jobs/{$jobId}
as the path in itsCapabilities
, the check would result in a false-negative.The API does already say:
Measured by these rules, my "false-negative" example above would be completely valid. But it can make a lot of problems.
I don't see any reason why we should leave the possibility of inventing own names by only "recommending" that all names follow the spec. Demanding "self-speaking names" kind of cries "it's okay if you make up your own, just make sure that they're understandable". I don't see any use case for this. Only problems.
Therefore I would like to make that spec paragraph stricter by changing it to:
*)
I didn't know how to word this part, basically I want to achieve:The text was updated successfully, but these errors were encountered: