Adding description (Implementation Notes) for HTTP operations

This commit is contained in:
Garima Singh
2016-08-10 10:29:31 +08:00
parent cd5ba67227
commit 1bd138b0fb
7 changed files with 22 additions and 5 deletions

View File

@@ -20,6 +20,10 @@ module SwaggerRails
describe(http_verb, metadata, &block)
end
def operation_description(message)
metadata[:operation_description] = message
end
[ :get, :post, :patch, :put, :delete, :head ].each do |http_verb|
define_method(http_verb) do |summary=nil, &block|
operation(http_verb, summary, &block)