2

I'm creating a an API, that using Devise and devise_token_auth. Those controllers and controller files are in gems, so they're not actually in my project directory. I want to be able to add documentation for those routes (sign_up, sign_in, etc.) so people using the API can have docs.

Apipie provides a way of having documentation outside of a file, but it still requires you to include your doc file in the controller file, with include UsersModule. I dont have access to the controller file (well I could put it in my path, but i'd rather not).

Another solution is to create a RegistrationController with the same actions and then just never add a route for it. This seems like a bad practice.

How can I add Docs for controllers added via gems?

Peter R
  • 3,185
  • 23
  • 43
  • `This seems like a bad practice`, to me this looks to be the simplest way to do it. Interesting question! – Andrey Deineko Sep 28 '16 at 06:11
  • 1
    It's what I'm doing for now. I've got a ReigstrationDocsController, that has no routes, and it works. But seems like something there should be a more official solution for. – Peter R Sep 28 '16 at 06:14

0 Answers0