From b4678c477b4eded8a370d3ff37d7d81e095a94e0 Mon Sep 17 00:00:00 2001 From: Nukemenonai Date: Thu, 30 Apr 2020 01:46:53 +0000 Subject: [PATCH] [update] added schema documentation for state city user and amenity --- .../documentation/amenity/all_amenities.yml | 30 +++++++--- .../documentation/amenity/get_amenity.yml | 46 +++++++++++----- .../documentation/city/cities_by_state.yml | 49 ++++++++++++----- api/v1/views/documentation/city/get_city.yml | 47 +++++++++++----- .../documentation/state/get_id_state.yml | 46 +++++++++++----- .../views/documentation/state/get_state.yml | 30 +++++++--- api/v1/views/documentation/user/all_users.yml | 39 ++++++++++--- api/v1/views/documentation/user/get_user.yml | 55 ++++++++++++++----- 8 files changed, 246 insertions(+), 96 deletions(-) diff --git a/api/v1/views/documentation/amenity/all_amenities.yml b/api/v1/views/documentation/amenity/all_amenities.yml index 0bb616e..4f2afe9 100644 --- a/api/v1/views/documentation/amenity/all_amenities.yml +++ b/api/v1/views/documentation/amenity/all_amenities.yml @@ -1,7 +1,23 @@ - gets all amenities of a place - --- - tags: - - Amenities - responses: - 200: - description: request executed successfully \ No newline at end of file +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 \ No newline at end of file diff --git a/api/v1/views/documentation/amenity/get_amenity.yml b/api/v1/views/documentation/amenity/get_amenity.yml index 9af5d41..8678ffc 100644 --- a/api/v1/views/documentation/amenity/get_amenity.yml +++ b/api/v1/views/documentation/amenity/get_amenity.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/api/v1/views/documentation/city/cities_by_state.yml b/api/v1/views/documentation/city/cities_by_state.yml index 14f4bd6..c8670a4 100644 --- a/api/v1/views/documentation/city/cities_by_state.yml +++ b/api/v1/views/documentation/city/cities_by_state.yml @@ -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 \ No newline at end of file diff --git a/api/v1/views/documentation/city/get_city.yml b/api/v1/views/documentation/city/get_city.yml index 4d15825..6ec0bc1 100644 --- a/api/v1/views/documentation/city/get_city.yml +++ b/api/v1/views/documentation/city/get_city.yml @@ -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 \ No newline at end of file diff --git a/api/v1/views/documentation/state/get_id_state.yml b/api/v1/views/documentation/state/get_id_state.yml index 1d97c8f..1313a04 100644 --- a/api/v1/views/documentation/state/get_id_state.yml +++ b/api/v1/views/documentation/state/get_id_state.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/api/v1/views/documentation/state/get_state.yml b/api/v1/views/documentation/state/get_state.yml index 368801c..a0c6aec 100644 --- a/api/v1/views/documentation/state/get_state.yml +++ b/api/v1/views/documentation/state/get_state.yml @@ -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 \ No newline at end of file diff --git a/api/v1/views/documentation/user/all_users.yml b/api/v1/views/documentation/user/all_users.yml index cc2edeb..ea06e3d 100644 --- a/api/v1/views/documentation/user/all_users.yml +++ b/api/v1/views/documentation/user/all_users.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/api/v1/views/documentation/user/get_user.yml b/api/v1/views/documentation/user/get_user.yml index 20a37fd..3ea193d 100644 --- a/api/v1/views/documentation/user/get_user.yml +++ b/api/v1/views/documentation/user/get_user.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file