[
https://issues.apache.org/jira/browse/TC-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15637599#comment-15637599
]
ASF GitHub Bot commented on TC-28:
----------------------------------
GitHub user mitchell852 opened a pull request:
https://github.com/apache/incubator-trafficcontrol/pull/48
[TC-28] - new api routes uses nested objects for ease of testing
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mitchell852/incubator-trafficcontrol 1.8.x
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafficcontrol/pull/48.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 #48
----
commit aa997176dd08577b5bff9e8981fc53c7f90ee108
Author: Dewayne Richardson <[email protected]>
Date: 2016-11-02T20:22:20Z
added _by_name functionality for testing
(cherry picked from commit f550de1d878a494c90cf980285f23e290c90be48)
commit 0b37a7586f9ad5ffd2c9d14bab70f24c047b30bb
Author: Dewayne Richardson <[email protected]>
Date: 2016-11-02T20:21:27Z
added _by_name functionality for testing
(cherry picked from commit 023c5f1fa25ae780d8e5032120a23093d0d3e6ba)
commit f71e53476a4bd8a61b27cdbe7fbb68561a0ef271
Author: Dewayne Richardson <[email protected]>
Date: 2016-10-28T23:40:05Z
fixed PUT dnsssec_enabled boolean response
(cherry picked from commit ef93462731bb17b9a943bb33b90fb03b274fe4c6)
commit fc8a65a631bdf772c12d92d019a3652d1b42ffdc
Author: Dewayne Richardson <[email protected]>
Date: 2016-11-02T20:20:56Z
resolves conflict
(cherry picked from commit 71014d42cd5e94c26e46ed5f4423859113182d93)
commit b10d01a17c519e4fb9fa87db22506c5f8b8ec4da
Author: Jeremy Mitchell <[email protected]>
Date: 2016-11-04T18:34:23Z
changed the response structure of api routes introducted in 1.8 to ease
testing. the response is hierarchical now instead of flat. i.e. a region will
have a nested division property
(cherry picked from commit bd62d77587ff3b67c181d5b8e8a9b5055fb2996a)
----
> 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)