Skip to content

Commit

Permalink
[update] added swager rout for new method
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukemenonai committed Apr 30, 2020
1 parent 65340d3 commit 3c43514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/v1/views/amenities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


@app_views.route('/amenities', methods=['GET'], strict_slashes=False)
@swag_from('documentation/amenity/get_amenity.yml', methods=['GET'])
@swag_from('documentation/amenity/all_amenities.yml')
def get_amenities():
"""
Retrieves a list of all amenities
Expand All @@ -22,6 +22,7 @@ def get_amenities():

@app_views.route('/amenities/<amenity_id>/', methods=['GET'],
strict_slashes=False)
@swag_from('documentation/amenity/get_amenity.yml', methods=['GET'])
def get_amenity(amenity_id):
""" Retrieves an amenity """
amenity = storage.get(Amenity, amenity_id)
Expand Down
4 changes: 2 additions & 2 deletions api/v1/views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


@app_views.route('/users', methods=['GET'], strict_slashes=False)
@swag_from('documentation/user/get_user.yml', methods=['GET'])
@swag_from('documentation/user/all_users.yml')
def get_users():
"""
Retrieves the list of all user objects
Expand All @@ -22,6 +22,7 @@ def get_users():


@app_views.route('/users/<user_id>', methods=['GET'], strict_slashes=False)
@swag_from('documentation/user/get_user.yml', methods=['GET'])
def get_user(user_id):
""" Retrieves an user """
user = storage.get(User, user_id)
Expand All @@ -36,7 +37,6 @@ def get_user(user_id):
@swag_from('documentation/user/delete_user.yml', methods=['DELETE'])
def delete_user(user_id):
"""
Deletes a user Object
"""

Expand Down

0 comments on commit 3c43514

Please sign in to comment.