Interface OpenAPIRouterHandler
- All Superinterfaces:
Handler<RoutingContext>
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic OpenAPIRouterHandlercreate(Vertx vertx, Operation operation, DeliveryOptions deliveryOptions, BiFunction<Operation, RoutingContext, JsonObject> extraPayloadMapper, ResponseValidator validator) static OpenAPIRouterHandlercreate(Vertx vertx, Operation operation, ResponseValidator validator) Creates a new OpenAPIRouterHandler to forward requests from OpenAPI Router to Web API Service Proxies.
-
Field Details
-
OPENAPI_EXTENSION
- See Also:
-
OPENAPI_EXTENSION_ADDRESS
- See Also:
-
OPENAPI_EXTENSION_METHOD_NAME
- See Also:
-
-
Method Details
-
create
Creates a new OpenAPIRouterHandler to forward requests from OpenAPI Router to Web API Service Proxies. In order to automatically parse the destination of the related Web API Service Proxy, the OpenAPI Operation must be extended with the "x-vertx-event-bus" property.{ ... "operationId": "myOperation", "x-vertx-event-bus" : "myEventbusAddress" ... }{ ... "operationId": "myOperation", "x-vertx-event-bus" : { "address" : "myEventbusAddress" } ... }{ ... "operationId": "myOperation", "x-vertx-event-bus" : { "address" : "myEventbusAddress", "method" : "myMethod" } ... }- Parameters:
vertx- The related Vert.x instance to access the Eventbusoperation- The related OpenAPI operation with the "x-vertx-event-bus" extensionvalidator- The ResponseValidator to automatically validate the response received by the Web API Service Proxy- Returns:
- a new OpenAPIRouterHandler
-
create
static OpenAPIRouterHandler create(Vertx vertx, Operation operation, DeliveryOptions deliveryOptions, BiFunction<Operation, RoutingContext, JsonObject> extraPayloadMapper, ResponseValidator validator) - Parameters:
vertx- The related Vert.x instance to access the Eventbusoperation- The related OpenAPI operation with the "x-vertx-event-bus" extensiondeliveryOptions- TheDeliveryOptionswhich will be used by this handler for every eventbus request.extraPayloadMapper- A function to extract an extra payload from incoming requests.validator- The ResponseValidator to automatically validate the response received by the Web API Service Proxy- Returns:
- a new OpenAPIRouterHandler
-