4.15.7. Eclipse Vert.x Web API サービスの更新
Vertx -web-api-service モジュールが更新され、vertx -web-validation モジュールとともに使用できるようになりました。Vertx -web-openapi モジュールを使用している場合、Web サービス機能は変更されません。
ただし、OpenAPI を使用しない場合は、vertx -web-validation モジュールで Web サービスモジュールを使用するには、RouteToEBServiceHandler クラスを使用する必要があります。
router.get("/api/transactions")
.handler(
ValidationHandlerBuilder.create(schemaParser)
.queryParameter(optionalParam("from", stringSchema()))
.queryParameter(optionalParam("to", stringSchema()))
.build()
).handler(
RouteToEBServiceHandler.build(eventBus, "transactions.myapplication", "getTransactionsList")
);
Vertx -web-api-service モジュールは vertx-web-api-contract をサポートしません。そのため、Eclipse Vert.x 4 にアップグレードする場合は、Eclipse Vert.x OpenAPI アプリケーションを vertx-web-openapi モジュールに移行する必要があります。