Skip to content

Commit

Permalink
[update] added schema documentation for state city user and amenity
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukemenonai committed Apr 30, 2020
1 parent d708b53 commit b4678c4
Show file tree
Hide file tree
Showing 8 changed files with 246 additions and 96 deletions.
30 changes: 23 additions & 7 deletions api/v1/views/documentation/amenity/all_amenities.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
gets all amenities of a place
---
tags:
- Amenities
responses:
200:
description: request executed successfully
gets all amenities of a place
---
tags:
- Amenities
responses:
200:
description: request executed successfully
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
name:
type: string
description: amenity name
46 changes: 31 additions & 15 deletions api/v1/views/documentation/amenity/get_amenity.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
gets amenity by ID
---
tags:
- Amenities
parameters:
- name: amenity_id
in: path
type: string
required: true
description: The id of the amenity
responses:
404:
description: amenity not found.
200:
description: request executed successfully
gets amenity by ID
---
tags:
- Amenities
parameters:
- name: amenity_id
in: path
type: string
required: true
description: The id of the amenity
responses:
404:
description: amenity not found.
200:
description: request executed successfully
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
name:
type: string
description: amenity name
49 changes: 34 additions & 15 deletions api/v1/views/documentation/city/cities_by_state.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
get a list of cities based on the state_id
---
tags:
- Cities
parameters:
- name: state_id
in: path
type: string
required: true
description: The uniqe id of the state
responses:
404:
description: No state is linked to the ID!
200:
description: Request completed successfully
get a list of cities based on the state_id
---
tags:
- Cities
parameters:
- name: state_id
in: path
type: string
required: true
description: The uniqe id of the state
responses:
404:
description: No state is linked to the ID!
200:
description: Request completed successfully
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
state_id:
type: string
description: uuid of the city's state
name:
type: string
description: city name
47 changes: 32 additions & 15 deletions api/v1/views/documentation/city/get_city.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
get a specific city based on the state_id
---
tags:
- Cities
parameters:
- name: city_id
in: path
type: string
required: true
description: The uniqe id of the city
responses:
404:
description: City not found!
200:
description: Request completed successfully
get a specific city based on the state_id
---
tags:
- Cities
parameters:
- name: city_id
in: path
type: string
required: true
description: The uniqe id of the city
responses:
200:
description: Successful request
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
state_id:
type: string
description: uuid of the city's state
name:
type: string
description: city name
46 changes: 31 additions & 15 deletions api/v1/views/documentation/state/get_id_state.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
Gets a specific state by ID or the list of all states if no ID is specied
---
tags:
- States
parameters:
- name: state_id
in: path
type: string
required: false
description: the unique id of the state
responses:
404:
description: State not found
200:
description: Successful request
Gets a specific state by ID or the list of all states if no ID is specied
---
tags:
- States
parameters:
- name: state_id
in: path
type: string
required: false
description: the unique id of the state
responses:
404:
description: State not found
200:
description: Successful request
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the state instance
name:
type: string
description: State name
30 changes: 23 additions & 7 deletions api/v1/views/documentation/state/get_state.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
Gets the list of all states
---
tags:
- States
responses:
200:
description: Successful request
Gets the list of all states
---
tags:
- States
responses:
200:
description: Successful request
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the state instance
name:
type: string
description: State name
39 changes: 32 additions & 7 deletions api/v1/views/documentation/user/all_users.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
retrieves a list of all users.
---
tags:
- Users
retrieves a list of all users.
---
tags:
- Users

responses:
200:
description: request executed successfully
responses:
200:
description: request executed successfully
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
email:
type: string
description: user's email
password:
type: string
description: user's password
first_name:
type: string
description: user's first name
last_name:
type: string
description: user's last name
55 changes: 40 additions & 15 deletions api/v1/views/documentation/user/get_user.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
retrieves a specific user.
---
tags:
- Users
parameters:
- name: user_id
in: path
type: string
required: true
description: The id of the user to retrieve
responses:
404:
description: user not found!
200:
description: request executed successfully
retrieves a specific user.
---
tags:
- Users
parameters:
- name: user_id
in: path
type: string
required: true
description: The id of the user to retrieve
responses:
404:
description: user not found!
200:
description: request executed successfully
schema:
properties:
__class__:
type: string
created_at:
type: string
description: time of creation of the instance
updated_at:
type: string
description: time of last update of the instance
id:
type: string
description: The uuid of the instance
email:
type: string
description: user's email
password:
type: string
description: user's password
first_name:
type: string
description: user's first name
last_name:
type: string
description: user's last name

0 comments on commit b4678c4

Please sign in to comment.