Class OpenAPI3RouterFactory

  • All Implemented Interfaces:
    RxDelegate, RouterFactory

    @Deprecated
    public class OpenAPI3RouterFactory
    extends Object
    implements RxDelegate, RouterFactory
    Deprecated.
    Interface for OpenAPI3RouterFactory.
    To add an handler, use addHandlerByOperationId(java.lang.String, io.vertx.core.Handler<io.vertx.rxjava3.ext.web.RoutingContext>)
    Usage example:
     OpenAPI3RouterFactory.create(vertx, "src/resources/spec.yaml", asyncResult -> {
      if (!asyncResult.succeeded()) {
         // IO failure or spec invalid else {
         OpenAPI3RouterFactory routerFactory = asyncResult.result();
         routerFactory.addHandlerByOperationId("operation_id", routingContext -> {
            // Do something
         }, routingContext -> {
            // Do something with failure handler
         });
         Router router = routerFactory.getRouter();
      }
     });
     }
     

    Handlers are loaded in this order:
    1. Body handler (Customizable with
    2. Custom global handlers configurable with
    3. Global security handlers defined in upper spec level
    4. Operation specific security handlers
    5. Generated validation handler
    6. User handlers or "Not implemented" handler

    NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.