@@ -1007,7 +1007,8 @@ var _ = Describe("ControllersWriter", func() {
1007
1007
payload = payloads [i ]
1008
1008
}
1009
1009
as [i ] = map [string ]interface {}{
1010
- "Name" : a ,
1010
+ "Name" : codegen .Goify (a , true ),
1011
+ "DesignName" : a ,
1011
1012
"Routes" : []* design.RouteDefinition {
1012
1013
{
1013
1014
Verb : verbs [i ],
@@ -1042,7 +1043,7 @@ var _ = Describe("ControllersWriter", func() {
1042
1043
1043
1044
Context ("with a simple controller" , func () {
1044
1045
BeforeEach (func () {
1045
- actions = []string {"List " }
1046
+ actions = []string {"list " }
1046
1047
verbs = []string {"GET" }
1047
1048
paths = []string {"/accounts/:accountID/bottles" }
1048
1049
contexts = []string {"ListBottleContext" }
@@ -1062,7 +1063,7 @@ var _ = Describe("ControllersWriter", func() {
1062
1063
1063
1064
Context ("with actions that take a payload" , func () {
1064
1065
BeforeEach (func () {
1065
- actions = []string {"List " }
1066
+ actions = []string {"list " }
1066
1067
verbs = []string {"GET" }
1067
1068
paths = []string {"/accounts/:accountID/bottles" }
1068
1069
contexts = []string {"ListBottleContext" }
@@ -1092,7 +1093,7 @@ var _ = Describe("ControllersWriter", func() {
1092
1093
})
1093
1094
Context ("with actions that take a payload with a required validation" , func () {
1094
1095
BeforeEach (func () {
1095
- actions = []string {"List " }
1096
+ actions = []string {"list " }
1096
1097
required := & dslengine.ValidationDefinition {
1097
1098
Required : []string {"id" },
1098
1099
}
@@ -1127,7 +1128,7 @@ var _ = Describe("ControllersWriter", func() {
1127
1128
1128
1129
Context ("with multiple controllers" , func () {
1129
1130
BeforeEach (func () {
1130
- actions = []string {"List " , "Show " }
1131
+ actions = []string {"list " , "show " }
1131
1132
verbs = []string {"GET" , "GET" }
1132
1133
paths = []string {"/accounts/:accountID/bottles" , "/accounts/:accountID/bottles/:id" }
1133
1134
contexts = []string {"ListBottleContext" , "ShowBottleContext" }
@@ -1147,7 +1148,7 @@ var _ = Describe("ControllersWriter", func() {
1147
1148
1148
1149
Context ("with encoder and decoder maps" , func () {
1149
1150
BeforeEach (func () {
1150
- actions = []string {"List " }
1151
+ actions = []string {"list " }
1151
1152
verbs = []string {"GET" }
1152
1153
paths = []string {"/accounts/:accountID/bottles" }
1153
1154
contexts = []string {"ListBottleContext" }
@@ -1180,7 +1181,7 @@ var _ = Describe("ControllersWriter", func() {
1180
1181
1181
1182
Context ("with multiple origins" , func () {
1182
1183
BeforeEach (func () {
1183
- actions = []string {"List " }
1184
+ actions = []string {"list " }
1184
1185
verbs = []string {"GET" }
1185
1186
paths = []string {"/accounts" }
1186
1187
contexts = []string {"ListBottleContext" }
@@ -1215,7 +1216,7 @@ var _ = Describe("ControllersWriter", func() {
1215
1216
1216
1217
Context ("with regexp origins" , func () {
1217
1218
BeforeEach (func () {
1218
- actions = []string {"List " }
1219
+ actions = []string {"list " }
1219
1220
verbs = []string {"GET" }
1220
1221
paths = []string {"/accounts" }
1221
1222
contexts = []string {"ListBottleContext" }
@@ -2358,7 +2359,7 @@ func MountBottlesController(service *goa.Service, ctrl BottlesController) {
2358
2359
}
2359
2360
return ctrl.List(rctx)
2360
2361
}
2361
- service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("List ", h, nil))
2362
+ service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("list ", h, nil))
2362
2363
service.LogInfo("mount", "ctrl", "Bottles", "action", "List", "route", "GET /accounts/:accountID/bottles")
2363
2364
}
2364
2365
`
@@ -2379,7 +2380,7 @@ func MountBottlesController(service *goa.Service, ctrl BottlesController) {
2379
2380
}
2380
2381
return ctrl.List(rctx)
2381
2382
}
2382
- service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("List ", h, nil))
2383
+ service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("list ", h, nil))
2383
2384
service.LogInfo("mount", "ctrl", "Bottles", "action", "List", "route", "GET /accounts/:accountID/bottles")
2384
2385
}
2385
2386
`
@@ -2408,7 +2409,7 @@ type BottlesController interface {
2408
2409
}
2409
2410
return ctrl.List(rctx)
2410
2411
}
2411
- service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("List ", h, nil))
2412
+ service.Mux.Handle("GET", "/accounts/:accountID/bottles", ctrl.MuxHandler("list ", h, nil))
2412
2413
service.LogInfo("mount", "ctrl", "Bottles", "action", "List", "route", "GET /accounts/:accountID/bottles")
2413
2414
2414
2415
h = func(ctx context.Context, rw http.ResponseWriter, req *http.Request) error {
@@ -2423,7 +2424,7 @@ type BottlesController interface {
2423
2424
}
2424
2425
return ctrl.Show(rctx)
2425
2426
}
2426
- service.Mux.Handle("GET", "/accounts/:accountID/bottles/:id", ctrl.MuxHandler("Show ", h, nil))
2427
+ service.Mux.Handle("GET", "/accounts/:accountID/bottles/:id", ctrl.MuxHandler("show ", h, nil))
2427
2428
service.LogInfo("mount", "ctrl", "Bottles", "action", "Show", "route", "GET /accounts/:accountID/bottles/:id")
2428
2429
}
2429
2430
`
0 commit comments