silkapp / rest

Packages for defining APIs, running them, generating client code and documentation.
http://silkapp.github.io/rest
390 stars 52 forks source link

Support for PATCH #101

Open Philonous opened 9 years ago

Philonous commented 9 years ago

As far as I can see, rest-core does not support PATCH-ing resources. Is this intentional? Could it be implemented in the future?

hesselink commented 9 years ago

This is just because we haven't needed it yet. Do you have good use case, and/or an implementation in mind?

bergmark commented 9 years ago

Had a discussion with @hesselink and we could use this. for a User resource you could then PUT { name :: Text, email :: Text, [..] }, or PATCH with { name :: Maybe Text, email :: Maybe Text, [...] }.

I'm guessing this can be implemented exactly as update.

jhedev commented 8 years ago

Any updates on this?

I would like to add a rest implementation of the todobackend to my todobackend-haskell project. Unfortunately this requires PATCH methods.

hesselink commented 8 years ago

That sounds like a good use case! How should the PATCH method work in this case? We haven't done anything about this since we haven't needed it ourselves, but given a good description of how it should work (or even a pull request) I think it would fit in pretty well.

jhedev commented 8 years ago

It has been a while since I used rest the last time. So I'll need check it out again and come back with my thoughts then :)

I'm not sure if I would be able to implement it, though. Maybe with a bit of guidance it could work... We'll see.

hesselink commented 8 years ago

I'd be happy to help implement it or even implement it myself. I just meant to say I'd need some use case or design to drive it, I guess. So if you're at a point where you can say: "I have this, and now I'd want PATCH because without it I can't ..." that would be very useful.