Skip to content

Commit

Permalink
Merge pull request #609 from hubmapconsortium/Derek-Furst/update-sibl…
Browse files Browse the repository at this point in the history
…ings

Derek furst/update siblings
  • Loading branch information
yuanzhou authored Feb 5, 2024
2 parents d66fdae + ef00b6c commit 7945f9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion entity-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ paths:
description: The target entity could not be found
'500':
description: Internal error
'/siblings/{id}':
'/entities/{id}/siblings':
get:
summary: Get the siblings list for an Entity. The siblings have the same direct ancestor. This list does not include all nodes whom have common ancestors, only the direct ancestor.
parameters:
Expand Down
10 changes: 7 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ def get_children(id):
The gateway treats this endpoint as public accessible
Result filtering based on query string
For example: /siblings/<id>?property=uuid
For example: /entities/<id>/siblings?property=uuid
Parameters
----------
Expand All @@ -1731,7 +1731,7 @@ def get_children(id):
json
A list of all the siblings of the target entity
"""
@app.route('/siblings/<id>', methods = ['GET'])
@app.route('/entities/<id>/siblings', methods = ['GET'])
def get_siblings(id):
final_result = []

Expand Down Expand Up @@ -1815,7 +1815,11 @@ def get_siblings(id):
'title',
'next_revision_uuid',
'previous_revision_uuid',
'associated_collection'
'associated_collection',
'creation_action',
'local_directory_rel_path',
'previous_revision_uuids',
'next_revision_uuids'
]

complete_entities_list = schema_manager.get_complete_entities_list(token, sibling_list, properties_to_skip)
Expand Down

0 comments on commit 7945f9d

Please sign in to comment.