-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-user.js
53 lines (52 loc) · 1.25 KB
/
sample-user.js
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
/**
* @api {get} /user/id Request User information
* @apiName GetUser
* @apiGroup User
*
* @apiParam {Number} id Users unique ID.
*
* @apiSuccess {String} firstname Firstname of the User.
* @apiSuccess {String} lastname Lastname of the User.
*
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "firstname": "John",
* "lastname": "Doe"
* }
*
* @apiError UserNotFound The id of the User was not found.
*
* @apiErrorExample Error-Response:
* HTTP/1.1 404 Not Found
* {
* "error": "UserNotFound"
* }
*/
/**
* @api {patch} /user/:id/:param Update User Information
* @apiName UpdateUser
* @apiGroup User
*
* @apiParam {Number} id Users unique.
* @apiParam {String} firstname Firstname of the User.
* @apiParam {String} lastname Lastname of the User.
* @apiParam {String} username Username of the User.
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "username": "john.doe"
* "firstname": "John",
* "lastname": "Doe"
* }
*
* @apiError UserNotFound The id of the User was not found
*
* @apiErrorExample Error-Response:
* HTTP/1.1 404 Not Found
* {
* "error": "UserNotFound"
* }
*/