loic911 / Rest-api-doc

MIT License
21 stars 32 forks source link

Support grails Restful controller #18

Closed anthony-foulfoin closed 9 years ago

anthony-foulfoin commented 10 years ago

Hi,

Given a resource, for instance a Book, grails allows to extend a class named RestfulController allowing to automatically redirect GET, PUT, DELETE, POST method to the right method, without having to specify an URL mapping for each method : http://grails.org/doc/latest/guide/webServices.html#extendingRestfulController

Given the following url mapping :

 "/v1/classified"(resources: "classifiedAd", namespace: 'v1')

And the controller :

class ClassifiedAdController extends RestfulController {
   @RestApiMethod ...
   def show(String id) {
   }
} 

restapidoc computes the following url :

/classified ad/show.json

While the correct one is :

GET /classified/{id}
loic911 commented 9 years ago

Its in 0.5. Sorry for the delay! Thanks