Class: GrapeSwagger::DocMethods::StatusCodes

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

Class Method Summary collapse

Class Method Details

.getObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/grape-swagger/doc_methods/status_codes.rb', line 7

def get
  {
    get: { code: 200, message: 'get {item}(s)' },
    post: { code: 201, message: 'created {item}' },
    put: { code: 200, message: 'updated {item}' },
    patch: { code: 200, message: 'patched {item}' },
    delete: { code: 200, message: 'deleted {item}' },
    head: { code: 200, message: 'head {item}' },
    options: { code: 200, message: 'option {item}' }
  }
end