The API must also provide an endpoint that returns the family tree of a certain individual containing all possible ascendants up to that level.
These are some dependencies used in this repository:
Start image:
make start-env
Rebuild image and run
make rebuild-env
curl --request POST \
--url http://localhost:8080/v1/person \
--header 'Content-Type: application/json' \
--data '{
"name": "Eu"
}'
curl --request GET \
--url http://localhost:8080/v1/person \
--header 'Content-Type: application/json'
curl --request POST \
--url http://localhost:8080/v1/relationship \
--header 'Content-Type: application/json' \
--data '{
"parent_id": "61886a0a29cb6d591f138658",
"children_id": "61886a0429cb6d591f138654"
}'
curl --request GET \
--url http://localhost:8080/v1/relationship \
--header 'Content-Type: application/json'
curl --request GET \
--url http://localhost:8080/v1/familytree/61886a0229cb6d591f138653 \
--header 'Content-Type: application/json'