-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
147 lines (147 loc) · 3.41 KB
/
swagger.json
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{
"swagger": "2.0",
"paths": {
"/health": {
"get": {
"description": "Checks whether the service is up and running.",
"tags": [
"service"
],
"summary": "Shows the service status.",
"operationId": "health",
"responses": {
"200": {
"$ref": "#/responses/health"
}
}
}
},
"/users": {
"get": {
"description": "This will show all available users.",
"tags": [
"users"
],
"summary": "Lists users.",
"operationId": "listUsers",
"responses": {
"200": {
"$ref": "#/responses/users"
},
"404": {
"$ref": "#/responses/status"
}
}
},
"put": {
"description": "This will update the user.",
"tags": [
"users"
],
"summary": "Updates the user.",
"operationId": "updateUser",
"responses": {
"200": {
"$ref": "#/responses/user"
},
"400": {
"$ref": "#/responses/status"
},
"500": {
"$ref": "#/responses/status"
}
}
},
"post": {
"description": "This will create the user.",
"tags": [
"users"
],
"summary": "Creates the user.",
"operationId": "createUser",
"responses": {
"201": {
"$ref": "#/responses/user"
},
"400": {
"$ref": "#/responses/status"
}
}
},
"delete": {
"description": "This will delete the user.",
"tags": [
"users"
],
"summary": "Deletes the user.",
"operationId": "deleteUser",
"responses": {
"204": {
"$ref": "#/responses/status"
},
"500": {
"$ref": "#/responses/status"
}
}
}
}
},
"responses": {
"health": {
"description": "health stores information about service' name and version",
"headers": {
"svcName": {
"type": "string",
"description": "Service name"
},
"version": {
"type": "string",
"description": "Version"
}
}
},
"status": {
"description": "Status is used to produce different types of statuses with the same structure",
"headers": {
"message": {
"type": "string",
"description": "The status message"
},
"status": {
"type": "string",
"description": "HTTP status code"
}
}
},
"user": {
"description": "User holds personal user information",
"headers": {
"dateOfBirth": {
"type": "string",
"format": "date-time",
"description": "Date of birth"
},
"firstName": {
"type": "string",
"description": "First name"
},
"id": {
"type": "integer",
"format": "int64",
"description": "UID"
},
"lastName": {
"type": "string",
"description": "Last name"
},
"locationOfBirth": {
"type": "string",
"description": "Location of birth"
}
}
},
"users": {
"description": "users holds the map with the list of users and their quantity"
}
}
}