Class: GrapeSwagger::DocMethods::ProducesConsumes

Inherits:
Object
  • Object
show all
Defined in:
lib/grape-swagger/doc_methods/produces_consumes.rb

Class Method Summary collapse

Class Method Details

.call(*args) ⇒ Object



7
8
9
10
11
# File 'lib/grape-swagger/doc_methods/produces_consumes.rb', line 7

def call(*args)
  return ['application/json'] unless args.flatten.present?

  args.flatten.map { |x| Grape::ContentTypes::CONTENT_TYPES[x] || x }.uniq
end