File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ use com.shopping.inandout.route#Route
1616use com.shopping.inandout.stand#Stand
1717
1818@mixin
19- @restJson1
2019service InAndOut {
2120 version : " 0.0.1"
2221 errors : [
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ use com.shopping.inandout.util#UUID
1111@documentation (" Travelling salesman problem and solution creation/retrieval" )
1212resource Route {
1313 identifiers : {
14+ storeId : UID
1415 routeId : UUID
1516 }
1617 properties : {
17- storeId : UID
1818 standIdList : IDList
1919 solutionList : SolutionList
2020 }
@@ -23,7 +23,7 @@ resource Route {
2323 delete : DeleteRoute
2424}
2525
26- @http (method : " POST" , uri : " /api/routes" )
26+ @http (method : " POST" , uri : " /api/stores/{storeId}/ routes" )
2727operation CreateRoute {
2828 input : CreateRouteInput
2929 output : RouteSummary
@@ -33,7 +33,7 @@ operation CreateRoute {
3333}
3434
3535@readonly
36- @http (method : " GET" , uri : " /api/routes/{routeId}" )
36+ @http (method : " GET" , uri : " /api/stores/{storeId}/ routes/{routeId}" )
3737operation GetRoute {
3838 input : GetRouteInput
3939 output : RouteSummary
@@ -43,7 +43,7 @@ operation GetRoute {
4343}
4444
4545@idempotent
46- @http (method : " DELETE" , uri : " /api/routes/{routeId}" )
46+ @http (method : " DELETE" , uri : " /api/stores/{storeId}/ routes/{routeId}" )
4747operation DeleteRoute {
4848 input : DeleteRouteInput
4949 output : RouteSummary
Original file line number Diff line number Diff line change @@ -8,19 +8,28 @@ use com.shopping.inandout.util#UUID
88
99structure CreateRouteInput {
1010 @required
11+ @httpLabel
1112 storeId : UID
1213
1314 @required
1415 standIdList : IDList
1516}
1617
1718structure GetRouteInput {
19+ @required
20+ @httpLabel
21+ storeId : UID
22+
1823 @required
1924 @httpLabel
2025 routeId : UUID
2126}
2227
2328structure DeleteRouteInput {
29+ @required
30+ @httpLabel
31+ storeId : UID
32+
2433 @required
2534 @httpLabel
2635 routeId : UUID
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ list SolutionList {
4646
4747structure RouteSummary {
4848 @required
49- routeId : UUID
49+ storeId : UID
5050
5151 @required
52- storeId : UID
52+ routeId : UUID
5353
5454 @required
5555 @documentation (" The initial input" )
You can’t perform that action at this time.
0 commit comments