stretchr / goweb

A lightweight RESTful web framework for Go
632 stars 61 forks source link

RestfulManyUpdater has wrong mapping #62

Closed pengux closed 10 years ago

pengux commented 10 years ago

In the docs (http://godoc.org/github.com/stretchr/goweb/controllers#RestfulManyUpdater), the RestfulManyUpdater has this mapping:

GET /resources/{id}

Which is not correct and should instead be:

PUT /resources

I haven't check if it is only an error in documentation or if the implementation is incorrect also

nelsam commented 10 years ago

Yep, that documentation is wrong.

For the time being, I did a quick check - RestfulManyUpdater is correct in the code (see: https://github.com/stretchr/goweb/blob/master/handlers/mapping.go#L288), so it's safe to use. It's only the documentation that's screwed up.

pengux commented 10 years ago

I also saw this issue after posting

https://github.com/stretchr/goweb/pull/60

does this mean that it is a PATCH method for RestfulManyUpdater now?

nelsam commented 10 years ago

That pull request hasn't been merged, yet, so those changes are not yet in the code. Currently, it's using PUT, not PATCH.

matryer commented 10 years ago

Is this fixed now? Can someone close this issue?

matryer commented 10 years ago

Closing issue as it seems to be fixed.