Module: ApiDocsServlet

Includes:
Swagger::Blocks
Defined in:
lib/msf/core/web_services/servlet/api_docs_servlet.rb

Class Method Summary collapse

Class Method Details

.html_pathObject


32
33
34
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 32

def self.html_path
  '/api/v1/api-docs'
end

.json_pathObject


28
29
30
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 28

def self.json_path
  '/api/v1/api-docs.json'
end

.registered(app) ⇒ Object


36
37
38
39
40
41
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 36

def self.registered(app)
  app.get ApiDocsServlet.json_path, &get_api_docs
  app.get ApiDocsServlet.html_path do
    erb :api_docs
  end
end