Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions docs/index.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion paths/add_user_to_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ post:
type: object
additionalProperties:
type: array
items:
type: string
examples:
Success:
value:
success: true
user: {}
errors: []
errors: {}
Failure:
value:
success: false
Expand Down
23 changes: 16 additions & 7 deletions paths/create_friends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ post:
- "$ref": "../schemas/friend.yaml"
- title: User
errors:
type: array
example: []
type: object
additionalProperties:
type: array
items:
type: string
'400':
description: Bad Request
content:
Expand All @@ -50,18 +53,24 @@ post:
properties:
users:
type: array
items:
allOf:
- "$ref": "../schemas/friend.yaml"
- title: User
example: []
errors:
type: object
additionalProperties:
type: array
items:
type: string
example:
base:
- Please supply a name for this user
example:
users: []
errors:
base:
- That user cannot be a member of this group
example:
users: []
errors:
base:
- That user cannot be a member of this group
'401':
"$ref": "../responses/unauthorized.yaml"
2 changes: 1 addition & 1 deletion paths/delete_comment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
post:
params:
parameters:
- in: path
name: id
schema:
Expand Down
15 changes: 10 additions & 5 deletions paths/delete_expense.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
---
params:
- in: query
name: id
description: ID of the expense to delete
post:
tags:
- expenses
summary: Delete an expense
description: "**Note**: 200 OK does not indicate a successful response. The operation
was successful only if `success` is true.\n"
parameters:
- in: path
name: id
description: ID of the expense to delete
schema:
type: integer
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
required: true
errors:
type: object
required:
- success
examples:
Success:
value:
Expand Down
16 changes: 9 additions & 7 deletions paths/delete_friend.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
parameters:
- in: path
name: id
description: User ID of the friend
schema:
type: integer
required: true
post:
tags:
- friends
Expand All @@ -14,6 +7,13 @@ post:
Given a friend ID, break off the friendship between the current user and the specified user.

**Note**: 200 OK does not indicate a successful response. You must check the `success` value of the response.
parameters:
- in: path
name: id
description: User ID of the friend
schema:
type: integer
required: true
responses:
'200':
description: OK
Expand All @@ -28,6 +28,8 @@ post:
type: object
additionalProperties:
type: array
items:
type: string
examples:
Success:
value:
Expand Down
2 changes: 1 addition & 1 deletion paths/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$ref: ./get_comments.yaml
/create_comment:
$ref: ./create_comment.yaml
/delete_comment:
/delete_comment/{id}:
$ref: ./delete_comment.yaml
/get_notifications:
$ref: ./get_notifications.yaml
Expand Down
3 changes: 0 additions & 3 deletions paths/parse_sentence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ post:
properties:
input:
type: string
required: true
example: "I owe Ada 5 bucks"
description: A natural language sentence describing an expense.
autosave:
Expand All @@ -32,7 +31,6 @@ post:
properties:
input:
type: string
required: true
example: "I owe Ada 5 bucks"
description: A natural language sentence describing an expense.
friend_id:
Expand All @@ -46,7 +44,6 @@ post:
properties:
input:
type: string
required: true
example: "I owe Ada 5 bucks"
description: A natural language sentence describing an expense.
group_id:
Expand Down
4 changes: 3 additions & 1 deletion paths/remove_user_from_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ post:
type: object
additionalProperties:
type: array
items:
type: string
examples:
Success:
value:
success: true
errors: []
errors: {}
Failure:
value:
success: false
Expand Down
12 changes: 8 additions & 4 deletions paths/undelete_expense.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
---
params:
- in: query
name: id
description: ID of the expense to restore
post:
tags:
- expenses
summary: Restore an expense
description: "**Note**: 200 OK does not indicate a successful response. The operation
was successful only if `success` is true.\n"
parameters:
- in: path
name: id
description: ID of the expense to restore
schema:
type: integer
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
Expand Down
2 changes: 2 additions & 0 deletions paths/undelete_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ post:
type: boolean
errors:
type: array
items:
type: string
examples:
Success:
value:
Expand Down
11 changes: 7 additions & 4 deletions paths/update_expense.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
params:
- in: query
name: id
description: ID of the expense to update
post:
tags:
- expenses
Expand All @@ -13,6 +9,13 @@ post:
shares for the expense will be overwritten with the provided values.

**Note**: 200 OK does not indicate a successful response. The operation was successful only if `errors` is empty.
parameters:
- in: path
name: id
description: ID of the expense to update
schema:
type: integer
required: true
requestBody:
required: true
content:
Expand Down
2 changes: 1 addition & 1 deletion schemas/comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ properties:
format: date-time
nullable: true
user:
- $ref: ./comment_user.yaml
$ref: ./comment_user.yaml
2 changes: 1 addition & 1 deletion splitwise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ components:
$ref: ./responses/unauthorized.yaml
Forbidden:
$ref: ./responses/forbidden.yaml
Not Found:
Not_Found:
$ref: ./responses/not_found.yaml
schemas:
Debt:
Expand Down