-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.yaml
54 lines (53 loc) · 1.61 KB
/
spec.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
openapi 3.0.0
info:
title: Reward Points API
description: Checks if user has sufficient number of reward points to redeem on coffee item, then reduces total price accordingly.
version: 0.0.1
paths:
/users/{userID}:
get:
summary: Returns a list of reward items
description: This only returns the list of reward items that the user has enough points for.
parameters:
- in: path
name: userPoints
schema:
type: integer
required: true
description: Number of reward points user has
responses:
'200':
description: A JSON array of reward items
content:
application/json:
schema:
type: array
items:
type: string
example: Cuban latte
'404':
description: No valid reward items exist (not found)
post:
summary: Creates view of rewards available to the user
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: string
responses:
'201':
description: A new view of the reward items available has been created.
'402':
description: Menu failed to be created!
delete:
summary: Deletes the view of available rewards
responses:
'202':
description: Delete view of rewards created by get
'402':
description: Reward menu failed to delete!
'404':
description: No reward menu found to delete!