Skip to content

Instantly share code, notes, and snippets.

@cmh114933
Last active July 8, 2019 06:47
Show Gist options
  • Save cmh114933/fc274abc3a81be9bbf6b67a8d2ca77ec to your computer and use it in GitHub Desktop.
Save cmh114933/fc274abc3a81be9bbf6b67a8d2ca77ec to your computer and use it in GitHub Desktop.

V1

/users

- User[] : id, username

/users/{id}

- User

3 users User - id - username

V2

/users/{id}/lists

- List[]: id, title

User 1 has 2 lists User 2 has 1 list User 3 has no list

/lists

/lists/{id}

/users will show the lists belonging to the users too

V3

/lists/{id}/todos

- Todo[]: id, label, completed

/todos/id

User 1's lists 1 - has no items 2 - has 1 item

User 2's list has 3 items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment