Package io.vertx.ext.web.api.service
Interface OpenAPIRouterHandler
-
- All Superinterfaces:
Handler<RoutingContext>
public interface OpenAPIRouterHandler extends Handler<RoutingContext>
-
-
Field Summary
Fields Modifier and Type Field Description static String
OPENAPI_EXTENSION
static String
OPENAPI_EXTENSION_ADDRESS
static String
OPENAPI_EXTENSION_METHOD_NAME
-
Method Summary
Static Methods Modifier and Type Method Description static OpenAPIRouterHandler
create(Vertx vertx, Operation operation, DeliveryOptions deliveryOptions, java.util.function.BiFunction<Operation,RoutingContext,JsonObject> extraPayloadMapper, ResponseValidator validator)
static OpenAPIRouterHandler
create(Vertx vertx, Operation operation, ResponseValidator validator)
Creates a new OpenAPIRouterHandler to forward requests from OpenAPI Router to Web API Service Proxies.
-
-
-
Field Detail
-
OPENAPI_EXTENSION
static final String OPENAPI_EXTENSION
- See Also:
- Constant Field Values
-
OPENAPI_EXTENSION_ADDRESS
static final String OPENAPI_EXTENSION_ADDRESS
- See Also:
- Constant Field Values
-
OPENAPI_EXTENSION_METHOD_NAME
static final String OPENAPI_EXTENSION_METHOD_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
static OpenAPIRouterHandler create(Vertx vertx, Operation operation, ResponseValidator validator)
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, java.util.function.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" extensionvalidator
- The ResponseValidator to automatically validate the response received by the Web API Service ProxydeliveryOptions
- TheDeliveryOptions
which will be used by this handler for every eventbus request.extraPayloadMapper
- A function to extract an extra payload from incoming requests.- Returns:
- a new OpenAPIRouterHandler
-
-