Class: Swagger::Data::Mime

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-swagger/data/mime.rb

Constant Summary collapse

@@types =
[
'text/plain',
'text/plain; charset=utf-8',
'application/json',
'application/hal+json',
'application/problem+json',
'application/postscript',
'application/pdf',
'application/postscript',
'application/octet-stream',
'application/xml',
'application/zip',
'text/xml',
'text/tab-separated-values',
'application/vnd.api+json',
'application/vnd.github+json',
'application/vnd.github.v3+json',
'application/vnd.github.v3.raw+json',
'application/vnd.github.v3.text+json',
'application/vnd.github.v3.html+json',
'application/vnd.github.v3.full+json',
'application/vnd.github.v3.diff',
'application/vnd.github.v3.patch']

Class Method Summary collapse

Class Method Details

.valid?(type) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/ruby-swagger/data/mime.rb', line 27

def self.valid?(type)
  @@types.include?(type)
end