Search code examples
javaspringrestspring-restcontroller

Is there a way to find all operations supported by a RestAPI and parameters needed for operations?


Suppose I created a Rest Service http://SomeServer/api/todo ,and installed on server. Now is there a way for the client to find out what all operations/functionality is provided by this Rest API, just by URL ?

For e.g. if you hit the URL below with get method, it will return the detail of todo item 1 http://SomeServer/api/todo/1


Solution

  • This is exactly what Swagger provides you with. It also has a UI which you can easily hook up to your REST application.

    Have a look at:

    https://swagger.io/