[
https://issues.apache.org/jira/browse/TC-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15645031#comment-15645031
]
ASF GitHub Bot commented on TC-28:
----------------------------------
GitHub user mitchell852 opened a pull request:
https://github.com/apache/incubator-trafficcontrol/pull/55
[TC-28] removes changes applied to specific api endpoints that made the
respo…
…nse nested or hierarchical.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mitchell852/incubator-trafficcontrol
revert-api
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafficcontrol/pull/55.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #55
----
commit 4fefb88194d43d37e11d88cfbfdc95b33067fc2c
Author: Jeremy Mitchell <[email protected]>
Date: 2016-11-07T18:45:53Z
removes changes applied to specific api endpoints that made the response
nested or hierarchical.
----
> API response structure should be hierarchical instead of flat
> -------------------------------------------------------------
>
> Key: TC-28
> URL: https://issues.apache.org/jira/browse/TC-28
> Project: Traffic Control
> Issue Type: Improvement
> Components: Traffic Ops API
> Affects Versions: 1.8.0
> Reporter: Jeremy Mitchell
> Priority: Minor
> Fix For: 1.8.0
>
>
> I created a handful of api endpoints in 1.8 with a flat response structure
> like:
> {
> "response": [
> {
> "asn": "23",
> "cachegroupId": "69",
> "cachegroupName": "Foo_Cachegroup",
> "id": "60",
> "lastUpdated": "2016-10-13 12:31:43"
> }
> ]
> }
> Although this is fine, it makes it more difficult to test when using
> structures derived from the database. This structure is more friendly.
> {
> "response": [
> {
> "asn": "23",
> "cachegroup": {
> "id": "69",
> "name": "Aberdeen_17802B_Ciscos"
> },
> "id": "60",
> "lastUpdated": "2016-10-13 12:31:43"
> }
> ]
> }
> This nested structure needs to be applied to api endpoints related to asn,
> cachegroup, deliveryservice, phys_location, region, server and user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)