@Deprecated public interface OpenAPI3RouterFactory extends RouterFactory
addHandlerByOperationId(String, Handler)
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();
}
});
this#setBodyHandler(BodyHandler)
this#addGlobalHandler(Handler)
Modifier and Type | Method and Description |
---|---|
OpenAPI3RouterFactory |
addFailureHandlerByOperationId(String operationId,
Handler<RoutingContext> failureHandler)
Deprecated.
Add a failure handler by operation_id field in Operation object
|
OpenAPI3RouterFactory |
addHandlerByOperationId(String operationId,
Handler<RoutingContext> handler)
Deprecated.
Add an handler by operation_id field in Operation object
|
OpenAPI3RouterFactory |
addSecuritySchemaScopeValidator(String securitySchemaName,
String scopeName,
Handler<RoutingContext> handler)
Deprecated.
Add a particular scope validator.
|
static Future<OpenAPI3RouterFactory> |
create(Vertx vertx,
String url)
Deprecated.
|
static void |
create(Vertx vertx,
String url,
Handler<AsyncResult<OpenAPI3RouterFactory>> handler)
Deprecated.
Create a new OpenAPI3RouterFactory
|
static Future<OpenAPI3RouterFactory> |
create(Vertx vertx,
String url,
List<JsonObject> auth)
Deprecated.
|
static void |
create(Vertx vertx,
String url,
List<JsonObject> auth,
Handler<AsyncResult<OpenAPI3RouterFactory>> handler)
Deprecated.
Create a new OpenAPI3RouterFactory
|
OpenAPI3RouterFactory |
mountOperationToEventBus(String operationId,
String address)
Deprecated.
Specify to route an incoming request for specified operation id to a Web Api Service mounted at the specified address on event bus.
|
OpenAPI3RouterFactory |
mountServiceFromTag(String tag,
String address)
Deprecated.
Specify to route an incoming request for all operations that contains the specified tag to a Web Api Service mounted at the specified address on event bus.
|
OpenAPI3RouterFactory |
mountServiceInterface(Class interfaceClass,
String address)
Deprecated.
Introspect the Web Api Service interface to route to service all matching method names with operation ids.
|
OpenAPI3RouterFactory |
mountServicesFromExtensions()
Deprecated.
Introspect the OpenAPI spec to mount handlers for all operations that specifies a x-vertx-event-bus annotation.
|
addGlobalHandler, addSecurityHandler, getOptions, getRouter, getValidationFailureHandler, setBodyHandler, setExtraOperationContextPayloadMapper, setNotImplementedFailureHandler, setOptions, setValidationFailureHandler
OpenAPI3RouterFactory addSecuritySchemaScopeValidator(String securitySchemaName, String scopeName, Handler<RoutingContext> handler)
securitySchemaName
- scopeName
- handler
- OpenAPI3RouterFactory addHandlerByOperationId(String operationId, Handler<RoutingContext> handler)
operationId
- handler
- OpenAPI3RouterFactory addFailureHandlerByOperationId(String operationId, Handler<RoutingContext> failureHandler)
operationId
- failureHandler
- OpenAPI3RouterFactory mountOperationToEventBus(String operationId, String address)
operationId
- address
- OpenAPI3RouterFactory mountServiceFromTag(String tag, String address)
tag
- address
- OpenAPI3RouterFactory mountServicesFromExtensions()
OpenAPI3RouterFactory mountServiceInterface(Class interfaceClass, String address)
static void create(Vertx vertx, String url, Handler<AsyncResult<OpenAPI3RouterFactory>> handler)
vertx
- url
- location of your spec. It can be an absolute path, a local path or remote url (with HTTP protocol)handler
- When specification is loaded, this handler will be called with AsyncResultstatic Future<OpenAPI3RouterFactory> create(Vertx vertx, String url)
vertx
- url
- location of your spec. It can be an absolute path, a local path or remote url (with HTTP protocol)create(Vertx, String, Handler)
static void create(Vertx vertx, String url, List<JsonObject> auth, Handler<AsyncResult<OpenAPI3RouterFactory>> handler)
vertx
- url
- location of your spec. It can be an absolute path, a local path or remote url (with HTTP protocol)auth
- list of authorization values needed to access the remote url. Each item should be json representation
of an AuthorizationValue
handler
- When specification is loaded, this handler will be called with AsyncResultstatic Future<OpenAPI3RouterFactory> create(Vertx vertx, String url, List<JsonObject> auth)
vertx
- url
- location of your spec. It can be an absolute path, a local path or remote url (with HTTP protocol)auth
- list of authorization values needed to access the remote url. Each item should be json representation
of an AuthorizationValue
create(Vertx, String, Handler)
Copyright © 2024 Eclipse. All rights reserved.