forked from malachheb/calamum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.yml
89 lines (88 loc) · 2.32 KB
/
sample.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: 'Calamum Rest Api'
url: 'http://calamum-sample:3000/api'
version: '1.0'
description: 'Calamum is a simple ruby build program to generate a REST API documentation from a YAML file definition'
resources:
user:
-
uri: '/users'
action: 'get'
authentication: 'false'
headers:
content_type: 'application/json'
description: 'Get the users list'
response: {"users":[{"id":"12354","name":"test", "mail":"[email protected]"}, {"id":"123789","name":"test2", "mail":"[email protected]"}]}
-
uri: '/users/:id'
action: 'get'
authentication: 'false'
headers:
content_type: 'application/json'
content_language: 'en-US'
params:
id:
type: 'String'
description: 'User id'
required: true
description: 'get the user'
response: {"user": {"name": "test", "mail": "[email protected]"}}
-
uri: '/users'
action: 'post'
description: 'Create a new user'
authentication: 'false'
headers:
content_type: 'application/json'
content_language: 'en-US'
params:
id:
type: 'String'
description: 'User id'
required: true
name:
type: 'String'
description: 'User name'
required: false
email:
type: 'String'
description: 'User email'
required: true
-
uri: '/users/:id'
action: 'put'
description: 'Update the user'
headers:
content_type: 'application/json'
content_language: 'en-US'
params:
id:
type: 'String'
description: 'User id'
required: true
name:
type: 'String'
description: 'User name'
required: false
email:
type: 'String'
description: 'User email'
required: true
-
uri: '/users/:id'
action: 'delete'
description: 'Delete the user'
headers:
content_type: 'application/json'
content_language: 'en-US'
params:
id:
type: 'String'
description: 'User id'
required: true
group:
-
uri: '/groups'
action: 'get'
headers:
content_type: 'application/json'
description: 'Get the list of groups'