module Devops
  module API3
    module Routes
      module ApiDocsRoutes

        def self.registered(app)
          app.get "/api/docs" do
            json Devops::API3::Handler::ApiDocs.new(request).index
          end

          app.get "/swagger-ui/index.html" do
            @preffix = DevopsConfig.config[:url_prefix]
            erb :'index.html'
          end

          puts "API docs routes initialized"
        end

      end
    end
  end
end

