1

I'm using APIPIE to document an API that I'm implementing.

I have a class called BaseController that implements the methods create, update, destroy, show, etc, in a generic way, so any controller that extends BaseController will not need to implement those methods.

With Apipie, I'm documenting like this

class API::V1::SampleController < API::V1::BaseController
  api! "Create a sample"
  param ....
  def create
    super
  end
end

I'm doing this to all controllers that extend BaseController, but I don't think it is a good idea. Is there any way to define the documentation in BaseController itself, so that Apipie generates documentation for every controller in my application that extends it?

Aleksandrus
  • 1,589
  • 2
  • 19
  • 31

0 Answers0