-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
83 lines (83 loc) · 2.09 KB
/
swagger.yaml
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
openapi: 3.0.0
info:
version: 0.0.1
title: Wappuchievements API
description: Server API for Wach
paths:
/achievements:
get:
description: Return a list of tasks a user can achieve
responses:
'200':
description: Successful response
/achievements/{id}:
parameters:
- in: path
name: achievementId
schema:
type: integer
required: true
description: Numeric Id of the achievement to get
get:
description: Return a single achievement
responses:
'200':
description: Successful response
/achievements/{id}/complete:
parameters:
- in: path
name: achievementId
schema:
type: integer
required: true
description: Numeric Id of the achievement to complete
post:
responses:
'200':
description: User has already completed the achievement
'201':
description: Achievement completed
'401':
description: Login required
delete:
responses:
'204':
description: Achievement marked as incomplete for the user
'401':
description: Login required
'404':
description: User has not completed the achievement
/users:
parameters:
- in: query
name: sortBy
schema:
type: string
enum:
- score
default: score
required: false
description: User sorting criteria
- in: query
name: sortOrder
schema:
type: string
enum:
- asc
- desc
description: User sorting order. Sorted by sortBy
* `asc` - Ascending order
* `desc` - Descending order
get:
description: Return all user profile
responses:
'200':
description: All users
/users/me:
get:
description: Return user profile for logged in user
responses:
'200':
description: Currently logged in user
'401':
description: Login is required to acces current user