module OasRails

def configure_yard!

def configure_yard!
  ::YARD::Tags::Library.default_factory = YARD::OasRailsFactory
  yard_tags = {
    'Request body' => [:request_body, :with_request_body],
    'Request body Example' => [:request_body_example, :with_request_body_example],
    'Parameter' => [:parameter, :with_parameter],
    'Response' => [:response, :with_response],
    'Response Example' => [:response_example, :with_response_example],
    'Endpoint Tags' => [:tags],
    'Summary' => [:summary],
    'No Auth' => [:no_auth],
    'Auth methods' => [:auth, :with_types]
  }
  yard_tags.each do |tag_name, (method_name, handler)|
    ::YARD::Tags::Library.define_tag(tag_name, method_name, handler)
  end
end