Method should return json tree that contains root element(if its a comment) and all his children.
Root element could be any comment or (itype_id, i_id) pair.
Make tests.
Make simple data validation (required data, incoming data types).
Request:
"itype_id": instance_type_id, # id of the instance type (0 or unspecified = comment),
"i_id": instance_id, # id of the instance,
curl -i -X GET http://local.server.com/api/comments/tree/{i_id}/
curl -i -X GET http://local.server.com/api/comments/tree/{i_id}/{itype_id}/
Method should return json tree that contains root element(if its a comment) and all his children. Root element could be any comment or (itype_id, i_id) pair.
Request:
Responses:
On Success Status Code: 200
On Error Status Code: 400, 403, 404