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

Endpoints should deduce their params/data in function of the query associated #2

Closed
thyb opened this issue Feb 23, 2016 · 1 comment

Comments

@thyb
Copy link
Member

thyb commented Feb 23, 2016

Expected behavior

If GET method:
All params from the query goes as endpoint params

If POST method:
All params from the query goes as endpoint data

If PUT method:
All params from the query goes as endpoint data

If DELETE method:
All params from the query goes as endpoint params

If there is params in the URL (e.g. /customers/:id), they are pushed as endpoint params

The actual behavior is still needed when the query is a custom Javascript function

Actual behavior

For the moment, endpoints declare their params and data while the query associated also declare its params


  • Materia Version: pre-release
@thyb thyb added this to the Alpha milestone Feb 23, 2016
thyb pushed a commit that referenced this issue Feb 23, 2016
#2
Signed-off-by: Thibaud Arnault <thyb@oauth.io>
@thyb
Copy link
Member Author

thyb commented Feb 23, 2016

I keep this open because some URL replacement are not safe.

e.g.
/customers/:id/:id_event

with id=5 and id_event=12, It will most likely replace this way:

/customers/5/5_event

Need more tests

thyb pushed a commit that referenced this issue Feb 24, 2016
#2
Signed-off-by: Thibaud Arnault <thyb@oauth.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant