From a667bf1dd094ae42f8af9c70a1aab5ef7c2ccf15 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 30 Aug 2016 00:05:45 +0100 Subject: Use compact json object for paramOverrides and mash up operations --- icespider/common/routes.ice | 2 ++ icespider/unittests/testRoutes.json | 42 ++++++++++++++----------------------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/icespider/common/routes.ice b/icespider/common/routes.ice index 511629c..6d022fb 100644 --- a/icespider/common/routes.ice +++ b/icespider/common/routes.ice @@ -5,6 +5,7 @@ module IceSpider { sequence StringSeq; + ["slicer:json:object"] dictionary StringMap; class Parameter { @@ -34,6 +35,7 @@ module IceSpider { StringMap paramOverrides; }; + ["slicer:json:object"] dictionary Operations; class Route { diff --git a/icespider/unittests/testRoutes.json b/icespider/unittests/testRoutes.json index 3b96a11..a7b3f82 100644 --- a/icespider/unittests/testRoutes.json +++ b/icespider/unittests/testRoutes.json @@ -74,44 +74,34 @@ "path": "/mashS/{s}/{t}/{i}", "method": "GET", "type": "TestIceSpider.Mash1", - "operations": [{ - "key": "a", - "value": { + "operations": { + "a": { "operation": "TestIceSpider.TestApi.withParams" - } - }, - { - "key": "b", - "value": { + }, + "b": { "operation": "TestIceSpider.TestApi.withParams", - "paramOverrides": [{ - "key": "s", - "value": "t" - }] + "paramOverrides": { + "s": "t" + } } - }] + } }, { "name": "mashClass", "path": "/mashC/{s}/{t}/{i}", "method": "GET", "type": "TestIceSpider.Mash2", - "operations": [{ - "key": "a", - "value": { + "operations": { + "a": { "operation": "TestIceSpider.TestApi.withParams" - } - }, - { - "key": "b", - "value": { + }, + "b": { "operation": "TestIceSpider.TestApi.withParams", - "paramOverrides": [{ - "key": "s", - "value": "t" - }] + "paramOverrides": { + "s": "t" + } } - }] + } } ], "slices": [ -- cgit v1.2.3