@@ -27,7 +27,6 @@ import io.ktor.server.routing.delete
27
27
import io.ktor.server.routing.`get`
28
28
import io.ktor.server.routing.post
29
29
import io.ktor.server.routing.put
30
- import io.ktor.server.util.getOrFail
31
30
import io.ktor.util.converters.ConversionService
32
31
import io.ktor.util.converters.DefaultConversionService
33
32
import io.ktor.util.reflect.typeInfo
@@ -267,7 +266,7 @@ public interface ContributorsController {
267
266
controller.createContributor(xFlowId, idempotencyKey, contributor, call)
268
267
}
269
268
`get`(" /contributors/{id}" ) {
270
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
269
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
271
270
val xFlowId = call.request.headers[" X-Flow-Id" ]
272
271
val ifNoneMatch = call.request.headers[" If-None-Match" ]
273
272
val status =
@@ -278,7 +277,7 @@ public interface ContributorsController {
278
277
controller.getContributor(xFlowId, ifNoneMatch, id, status, TypedApplicationCall (call))
279
278
}
280
279
put(" /contributors/{id}" ) {
281
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
280
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
282
281
val ifMatch = call.request.headers.getOrFail(" If-Match" )
283
282
val xFlowId = call.request.headers[" X-Flow-Id" ]
284
283
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
@@ -482,7 +481,7 @@ public interface OrganisationsController {
482
481
controller.post(xFlowId, idempotencyKey, organisation, call)
483
482
}
484
483
`get`(" /organisations/{id}" ) {
485
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
484
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
486
485
val xFlowId = call.request.headers[" X-Flow-Id" ]
487
486
val ifNoneMatch = call.request.headers[" If-None-Match" ]
488
487
val status =
@@ -493,7 +492,7 @@ public interface OrganisationsController {
493
492
controller.getById(xFlowId, ifNoneMatch, id, status, TypedApplicationCall (call))
494
493
}
495
494
put(" /organisations/{id}" ) {
496
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
495
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
497
496
val ifMatch = call.request.headers.getOrFail(" If-Match" )
498
497
val xFlowId = call.request.headers[" X-Flow-Id" ]
499
498
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
@@ -683,7 +682,7 @@ public interface OrganisationsContributorsController {
683
682
*/
684
683
public fun Route.organisationsContributorsRoutes (controller : OrganisationsContributorsController ) {
685
684
`get`(" /organisations/{parent-id}/contributors" ) {
686
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
685
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
687
686
val xFlowId = call.request.headers[" X-Flow-Id" ]
688
687
val limit = call.request.queryParameters.getTyped< kotlin.Int > (" limit" )
689
688
val includeInactive =
@@ -699,23 +698,23 @@ public interface OrganisationsContributorsController {
699
698
)
700
699
}
701
700
`get`(" /organisations/{parent-id}/contributors/{id}" ) {
702
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
703
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
701
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
702
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
704
703
val xFlowId = call.request.headers[" X-Flow-Id" ]
705
704
val ifNoneMatch = call.request.headers[" If-None-Match" ]
706
705
controller.getById(xFlowId, ifNoneMatch, parentId, id, TypedApplicationCall (call))
707
706
}
708
707
put(" /organisations/{parent-id}/contributors/{id}" ) {
709
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
710
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
708
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
709
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
711
710
val ifMatch = call.request.headers.getOrFail(" If-Match" )
712
711
val xFlowId = call.request.headers[" X-Flow-Id" ]
713
712
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
714
713
controller.putById(ifMatch, xFlowId, idempotencyKey, parentId, id, call)
715
714
}
716
715
delete(" /organisations/{parent-id}/contributors/{id}" ) {
717
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
718
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
716
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
717
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
719
718
val xFlowId = call.request.headers[" X-Flow-Id" ]
720
719
controller.deleteById(xFlowId, parentId, id, call)
721
720
}
@@ -932,7 +931,7 @@ public interface RepositoriesController {
932
931
controller.post(xFlowId, idempotencyKey, repository, call)
933
932
}
934
933
`get`(" /repositories/{id}" ) {
935
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
934
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
936
935
val xFlowId = call.request.headers[" X-Flow-Id" ]
937
936
val ifNoneMatch = call.request.headers[" If-None-Match" ]
938
937
val status =
@@ -943,7 +942,7 @@ public interface RepositoriesController {
943
942
controller.getById(xFlowId, ifNoneMatch, id, status, TypedApplicationCall (call))
944
943
}
945
944
put(" /repositories/{id}" ) {
946
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
945
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
947
946
val ifMatch = call.request.headers.getOrFail(" If-Match" )
948
947
val xFlowId = call.request.headers[" X-Flow-Id" ]
949
948
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
@@ -1143,7 +1142,7 @@ public interface RepositoriesPullRequestsController {
1143
1142
*/
1144
1143
public fun Route.repositoriesPullRequestsRoutes (controller : RepositoriesPullRequestsController ) {
1145
1144
`get`(" /repositories/{parent-id}/pull-requests" ) {
1146
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
1145
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
1147
1146
val xFlowId = call.request.headers[" X-Flow-Id" ]
1148
1147
val limit = call.request.queryParameters.getTyped< kotlin.Int > (" limit" )
1149
1148
val includeInactive =
@@ -1159,22 +1158,22 @@ public interface RepositoriesPullRequestsController {
1159
1158
)
1160
1159
}
1161
1160
post(" /repositories/{parent-id}/pull-requests" ) {
1162
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
1161
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
1163
1162
val xFlowId = call.request.headers[" X-Flow-Id" ]
1164
1163
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
1165
1164
val pullRequest = call.receive<PullRequest >()
1166
1165
controller.post(xFlowId, idempotencyKey, parentId, pullRequest, call)
1167
1166
}
1168
1167
`get`(" /repositories/{parent-id}/pull-requests/{id}" ) {
1169
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
1170
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
1168
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
1169
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
1171
1170
val xFlowId = call.request.headers[" X-Flow-Id" ]
1172
1171
val ifNoneMatch = call.request.headers[" If-None-Match" ]
1173
1172
controller.getById(xFlowId, ifNoneMatch, parentId, id, TypedApplicationCall (call))
1174
1173
}
1175
1174
put(" /repositories/{parent-id}/pull-requests/{id}" ) {
1176
- val parentId = call.parameters.getOrFail < kotlin.String > (" parent-id" )
1177
- val id = call.parameters.getOrFail < kotlin.String > (" id" )
1175
+ val parentId = call.parameters.getTypedOrFail < kotlin.String > (" parent-id" )
1176
+ val id = call.parameters.getTypedOrFail < kotlin.String > (" id" )
1178
1177
val ifMatch = call.request.headers.getOrFail(" If-Match" )
1179
1178
val xFlowId = call.request.headers[" X-Flow-Id" ]
1180
1179
val idempotencyKey = call.request.headers[" Idempotency-Key" ]
0 commit comments