diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-08-30 00:05:45 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-08-30 00:05:45 +0100 | 
| commit | a667bf1dd094ae42f8af9c70a1aab5ef7c2ccf15 (patch) | |
| tree | 96cfd1222ff21512ce4c6bd8f9fe91da71f5a00e | |
| parent | Add support for mash up routes that call multiple services (diff) | |
| download | icespider-a667bf1dd094ae42f8af9c70a1aab5ef7c2ccf15.tar.bz2 icespider-a667bf1dd094ae42f8af9c70a1aab5ef7c2ccf15.tar.xz icespider-a667bf1dd094ae42f8af9c70a1aab5ef7c2ccf15.zip | |
Use compact json object for paramOverrides and mash up operations
| -rw-r--r-- | icespider/common/routes.ice | 2 | ||||
| -rw-r--r-- | 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<string> StringSeq; +	["slicer:json:object"]  	dictionary<string, string> StringMap;  	class Parameter { @@ -34,6 +35,7 @@ module IceSpider {  		StringMap paramOverrides;  	}; +	["slicer:json:object"]  	dictionary<string, Operation> 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": [ | 
