2018-05-03 17:16:04 -05:00
|
|
|
require 'swagger/blocks'
|
|
|
|
|
|
|
|
|
|
module MsfApiDoc
|
|
|
|
|
include Swagger::Blocks
|
|
|
|
|
|
2018-05-29 12:24:53 -05:00
|
|
|
swagger_path '/api/v1/msf/version' do
|
|
|
|
|
# Swagger documentation for /api/v1/msf/version GET
|
2018-05-03 17:16:04 -05:00
|
|
|
operation :get do
|
|
|
|
|
key :description, 'Return the current version of the running Metasploit Framework.'
|
|
|
|
|
key :tags, [ 'msf' ]
|
|
|
|
|
|
|
|
|
|
response 200 do
|
|
|
|
|
key :description, 'Returns the Metasploit Framework version.'
|
|
|
|
|
schema do
|
2018-07-25 18:01:05 -05:00
|
|
|
property :data do
|
|
|
|
|
property :metasploit_version, type: :string
|
|
|
|
|
end
|
2018-05-03 17:16:04 -05:00
|
|
|
end
|
|
|
|
|
end
|
2018-07-25 21:46:33 -05:00
|
|
|
|
2018-08-14 13:35:59 -05:00
|
|
|
response 401 do
|
2018-08-15 15:26:35 -05:00
|
|
|
key :description, RootApiDoc::DEFAULT_RESPONSE_401
|
2018-08-14 13:35:59 -05:00
|
|
|
schema do
|
|
|
|
|
key :'$ref', :AuthErrorModel
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2018-07-25 21:46:33 -05:00
|
|
|
response 500 do
|
2018-08-15 15:26:35 -05:00
|
|
|
key :description, RootApiDoc::DEFAULT_RESPONSE_500
|
2018-07-25 21:46:33 -05:00
|
|
|
schema do
|
|
|
|
|
key :'$ref', :ErrorModel
|
|
|
|
|
end
|
|
|
|
|
end
|
2018-05-03 17:16:04 -05:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|