Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derek furst/update siblings #609

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1
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