Interface OpenAPIRouterHandler

    • 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 Eventbus
        operation - The related OpenAPI operation with the "x-vertx-event-bus" extension
        validator - The ResponseValidator to automatically validate the response received by the Web API Service Proxy
        Returns:
        a new OpenAPIRouterHandler