Skip to content

Commit 047f17b

Browse files
authored
Merge pull request #63 from splitwise/fix-spec-issues
Fix spec issues
2 parents 9354421 + 2a491c8 commit 047f17b

14 files changed

Lines changed: 86 additions & 55 deletions

docs/index.html

Lines changed: 24 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

paths/add_user_to_group.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ post:
5959
type: object
6060
additionalProperties:
6161
type: array
62+
items:
63+
type: string
6264
examples:
6365
Success:
6466
value:
6567
success: true
6668
user: {}
67-
errors: []
69+
errors: {}
6870
Failure:
6971
value:
7072
success: false

paths/create_friends.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ post:
3939
- "$ref": "../schemas/friend.yaml"
4040
- title: User
4141
errors:
42-
type: array
43-
example: []
42+
type: object
43+
additionalProperties:
44+
type: array
45+
items:
46+
type: string
4447
'400':
4548
description: Bad Request
4649
content:
@@ -50,18 +53,24 @@ post:
5053
properties:
5154
users:
5255
type: array
56+
items:
57+
allOf:
58+
- "$ref": "../schemas/friend.yaml"
59+
- title: User
5360
example: []
5461
errors:
5562
type: object
5663
additionalProperties:
5764
type: array
65+
items:
66+
type: string
5867
example:
5968
base:
6069
- Please supply a name for this user
61-
example:
62-
users: []
63-
errors:
64-
base:
65-
- That user cannot be a member of this group
70+
example:
71+
users: []
72+
errors:
73+
base:
74+
- That user cannot be a member of this group
6675
'401':
6776
"$ref": "../responses/unauthorized.yaml"

paths/delete_comment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
post:
3-
params:
3+
parameters:
44
- in: path
55
name: id
66
schema:

paths/delete_expense.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
---
2-
params:
3-
- in: query
4-
name: id
5-
description: ID of the expense to delete
62
post:
73
tags:
84
- expenses
95
summary: Delete an expense
106
description: "**Note**: 200 OK does not indicate a successful response. The operation
117
was successful only if `success` is true.\n"
8+
parameters:
9+
- in: path
10+
name: id
11+
description: ID of the expense to delete
12+
schema:
13+
type: integer
14+
required: true
1215
responses:
1316
'200':
17+
description: OK
1418
content:
1519
application/json:
1620
schema:
1721
type: object
1822
properties:
1923
success:
2024
type: boolean
21-
required: true
2225
errors:
2326
type: object
27+
required:
28+
- success
2429
examples:
2530
Success:
2631
value:

paths/delete_friend.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
---
2-
parameters:
3-
- in: path
4-
name: id
5-
description: User ID of the friend
6-
schema:
7-
type: integer
8-
required: true
92
post:
103
tags:
114
- friends
@@ -14,6 +7,13 @@ post:
147
Given a friend ID, break off the friendship between the current user and the specified user.
158
169
**Note**: 200 OK does not indicate a successful response. You must check the `success` value of the response.
10+
parameters:
11+
- in: path
12+
name: id
13+
description: User ID of the friend
14+
schema:
15+
type: integer
16+
required: true
1717
responses:
1818
'200':
1919
description: OK
@@ -28,6 +28,8 @@ post:
2828
type: object
2929
additionalProperties:
3030
type: array
31+
items:
32+
type: string
3133
examples:
3234
Success:
3335
value:

paths/index.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
$ref: ./get_comments.yaml
4848
/create_comment:
4949
$ref: ./create_comment.yaml
50-
/delete_comment:
50+
/delete_comment/{id}:
5151
$ref: ./delete_comment.yaml
5252
/get_notifications:
5353
$ref: ./get_notifications.yaml

paths/parse_sentence.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ post:
2020
properties:
2121
input:
2222
type: string
23-
required: true
2423
example: "I owe Ada 5 bucks"
2524
description: A natural language sentence describing an expense.
2625
autosave:
@@ -32,7 +31,6 @@ post:
3231
properties:
3332
input:
3433
type: string
35-
required: true
3634
example: "I owe Ada 5 bucks"
3735
description: A natural language sentence describing an expense.
3836
friend_id:
@@ -46,7 +44,6 @@ post:
4644
properties:
4745
input:
4846
type: string
49-
required: true
5047
example: "I owe Ada 5 bucks"
5148
description: A natural language sentence describing an expense.
5249
group_id:

paths/remove_user_from_group.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ post:
3737
type: object
3838
additionalProperties:
3939
type: array
40+
items:
41+
type: string
4042
examples:
4143
Success:
4244
value:
4345
success: true
44-
errors: []
46+
errors: {}
4547
Failure:
4648
value:
4749
success: false

paths/undelete_expense.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
---
2-
params:
3-
- in: query
4-
name: id
5-
description: ID of the expense to restore
62
post:
73
tags:
84
- expenses
95
summary: Restore an expense
106
description: "**Note**: 200 OK does not indicate a successful response. The operation
117
was successful only if `success` is true.\n"
8+
parameters:
9+
- in: path
10+
name: id
11+
description: ID of the expense to restore
12+
schema:
13+
type: integer
14+
required: true
1215
responses:
1316
'200':
17+
description: OK
1418
content:
1519
application/json:
1620
schema:

0 commit comments

Comments
 (0)