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

Use PATCH instead of PUT for update #7

Closed
johannesfritsch opened this issue Jul 12, 2017 · 5 comments
Closed

Use PATCH instead of PUT for update #7

johannesfritsch opened this issue Jul 12, 2017 · 5 comments

Comments

@johannesfritsch
Copy link

E.g. if I want to update the default loopback user model I have to specify all the attributes when using PUT, which is not even possible as I can not have my user re-enter the password every time.

I created a fork under Zoom7/aor-loopback for the time being that does simply replace PUT with PATCH, so I can proceed. Maybe this is also an option for aor-loopback.

@johannesfritsch
Copy link
Author

Just saw that there is a pending PR for this. Please consider accepting it. It seems reasonable to me :-)

@kimkha
Copy link
Owner

kimkha commented Jul 12, 2017

I'm still thinking about that PR. Is it better? I'm not sure if we change to PATCH it will work for other cases?

@kimkha
Copy link
Owner

kimkha commented Jul 12, 2017

I also merge that PR... :)

@kodepareek
Copy link

Guys this is a pretty big change. I will have to go through my entire API and make appropriate changes now. Did we follow Semver for this?

While I agree that Patch is a better option that put any day. This kind of change should have been more carefully done.

@kimkha
Copy link
Owner

kimkha commented Aug 10, 2017

I really think 'PATCH' is better than 'PUT'. That's why I accept this PR.

The difference between them is: 'PUT' can "delete" some fields. But with 'admin-on-rest', it's useless, because 'admin-on-rest' don't support "deleting field", only set to null (or empty '').

Thank you anyway.

@kimkha kimkha closed this as completed Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants