我使用貘定义端点但是我得到以下编译错误。
[info] 将 3 个 Scala 源编译到 /endpoints/target/scala-2.13/classes ... [error] 发射/endpoints/Session$ 时出错 [error] 方法太大:endpoints/Session$。()V [错误] 发现一个错误 [错误] (endpoints / Compile / compileIncremental) 编译失败 [错误] 总时间: 26 s, 完成 12-Mar-2020 15:29:54
val manualReviewEndpoint: Endpoint[(SessionModel.AuthToken, SessionModel.ManualReview.ManualReviewRequest), ErrorsModel.FailureResponse, SessionModel.ManualReview.ManualReviewResponse, Nothing] = endpoint
.tag("Sessions")
.description("Triggers manual review for sessions within date range")
.post
.in(auth.bearer)
.in("sessions" / "trigger-review")
.in(jsonBody[SessionModel.ManualReview.ManualReviewRequest])
.out(jsonBody[SessionModel.ManualReview.ManualReviewResponse])
.errorOut(oneOf(
statusMapping(StatusCode.BadRequest, jsonBody[ErrorsModel.FailureResponse400]),
statusMapping(StatusCode.Unauthorized, jsonBody[ErrorsModel.FailureResponse401]),
statusMapping(StatusCode.NotFound, jsonBody[ErrorsModel.FailureResponse404]),
statusMapping(StatusCode.UnprocessableEntity, jsonBody[ErrorsModel.FailureResponse422]),
statusMapping(StatusCode.FailedDependency, jsonBody[ErrorsModel.FailureResponse424]),
statusMapping(StatusCode.InternalServerError, jsonBody[ErrorsModel.FailureResponse500]),
))