lib/oas_rails.rb in oas_rails-0.2.2 vs lib/oas_rails.rb in oas_rails-0.2.3
- old
+ new
@@ -25,24 +25,27 @@
autoload :Response, "oas_rails/response"
autoload :Responses, "oas_rails/responses"
autoload :Utils, "oas_rails/utils"
- module Yard
- autoload :OasYardFactory, 'oas_rails/yard/oas_yard_factory'
+ module YARD
+ autoload :OasYARDFactory, 'oas_rails/yard/oas_yard_factory'
end
class << self
+ # Configurations for make the OasRails engine Work.
def configure
+ OasRails.configure_esquema!
+ OasRails.configure_yard!
yield config
end
def config
@config ||= Configuration.new
end
def configure_yard!
- ::YARD::Tags::Library.default_factory = Yard::OasYardFactory
+ ::YARD::Tags::Library.default_factory = YARD::OasYARDFactory
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],