Module: Msf::WebServices::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



10
11
12
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 10

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

.json_pathObject



6
7
8
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 6

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

.registered(app) ⇒ Object



14
15
16
17
18
19
# File 'lib/msf/core/web_services/servlet/api_docs_servlet.rb', line 14

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