public class OpenAPI3RouterFactory extends Object implements RouterFactory<io.swagger.v3.oas.models.OpenAPI>
addHandlerByOperationId(java.lang.String, io.vertx.core.Handler<io.vertx.rxjava.ext.web.RoutingContext>)
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();
}
});
}
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<OpenAPI3RouterFactory> |
__TYPE_ARG |
Constructor and Description |
---|
OpenAPI3RouterFactory(Object delegate) |
OpenAPI3RouterFactory(io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory delegate) |
Modifier and Type | Method and Description |
---|---|
OpenAPI3RouterFactory |
addFailureHandlerByOperationId(String operationId,
io.vertx.core.Handler<RoutingContext> failureHandler)
Deprecated.
|
RouterFactory |
addGlobalHandler(io.vertx.core.Handler<RoutingContext> globalHandler)
Deprecated.
|
OpenAPI3RouterFactory |
addHandlerByOperationId(String operationId,
io.vertx.core.Handler<RoutingContext> handler)
Deprecated.
|
RouterFactory |
addSecurityHandler(String securitySchemaName,
io.vertx.core.Handler<RoutingContext> handler)
Deprecated.
|
OpenAPI3RouterFactory |
addSecuritySchemaScopeValidator(String securitySchemaName,
String scopeName,
io.vertx.core.Handler<RoutingContext> handler)
Deprecated.
|
static void |
create(Vertx vertx,
String url)
Deprecated.
|
static void |
create(Vertx vertx,
String url,
io.vertx.core.Handler<io.vertx.core.AsyncResult<OpenAPI3RouterFactory>> handler)
Deprecated.
|
static void |
create(Vertx vertx,
String url,
List<io.vertx.core.json.JsonObject> auth)
Deprecated.
|
static void |
create(Vertx vertx,
String url,
List<io.vertx.core.json.JsonObject> auth,
io.vertx.core.Handler<io.vertx.core.AsyncResult<OpenAPI3RouterFactory>> handler)
Deprecated.
|
boolean |
equals(Object o) |
io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory |
getDelegate() |
io.vertx.ext.web.api.contract.RouterFactoryOptions |
getOptions()
Deprecated.
|
Router |
getRouter()
Deprecated.
|
io.vertx.core.Handler<RoutingContext> |
getValidationFailureHandler()
Deprecated.
|
int |
hashCode() |
OpenAPI3RouterFactory |
mountOperationToEventBus(String operationId,
String address)
Deprecated.
|
OpenAPI3RouterFactory |
mountServiceFromTag(String tag,
String address)
Deprecated.
|
OpenAPI3RouterFactory |
mountServicesFromExtensions()
Deprecated.
|
static OpenAPI3RouterFactory |
newInstance(io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory arg) |
static rx.Single<OpenAPI3RouterFactory> |
rxCreate(Vertx vertx,
String url)
Deprecated.
|
static rx.Single<OpenAPI3RouterFactory> |
rxCreate(Vertx vertx,
String url,
List<io.vertx.core.json.JsonObject> auth)
Deprecated.
|
RouterFactory |
setBodyHandler(BodyHandler bodyHandler)
Deprecated.
|
RouterFactory |
setExtraOperationContextPayloadMapper(Function<RoutingContext,io.vertx.core.json.JsonObject> extraOperationContextPayloadMapper)
Deprecated.
|
RouterFactory |
setNotImplementedFailureHandler(io.vertx.core.Handler<RoutingContext> notImplementedFailureHandler)
Deprecated.
|
RouterFactory |
setOptions(io.vertx.ext.web.api.contract.RouterFactoryOptions options)
Deprecated.
|
RouterFactory |
setValidationFailureHandler(io.vertx.core.Handler<RoutingContext> validationFailureHandler)
Deprecated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
public static final TypeArg<OpenAPI3RouterFactory> __TYPE_ARG
public OpenAPI3RouterFactory(io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory delegate)
public OpenAPI3RouterFactory(Object delegate)
public io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory getDelegate()
getDelegate
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
@Deprecated public RouterFactory addSecurityHandler(String securitySchemaName, io.vertx.core.Handler<RoutingContext> handler)
addSecurityHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
securitySchemaName
- handler
- @Deprecated public RouterFactory setOptions(io.vertx.ext.web.api.contract.RouterFactoryOptions options)
setOptions
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
options
- @Deprecated public io.vertx.ext.web.api.contract.RouterFactoryOptions getOptions()
getOptions
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
@Deprecated public Router getRouter()
getRouter
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
@Deprecated public io.vertx.core.Handler<RoutingContext> getValidationFailureHandler()
getValidationFailureHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
@Deprecated public RouterFactory setValidationFailureHandler(io.vertx.core.Handler<RoutingContext> validationFailureHandler)
setValidationFailureHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
validationFailureHandler
- @Deprecated public RouterFactory setNotImplementedFailureHandler(io.vertx.core.Handler<RoutingContext> notImplementedFailureHandler)
setNotImplementedFailureHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
notImplementedFailureHandler
- @Deprecated public RouterFactory setBodyHandler(BodyHandler bodyHandler)
setBodyHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
bodyHandler
- @Deprecated public RouterFactory addGlobalHandler(io.vertx.core.Handler<RoutingContext> globalHandler)
Router
being generated. addGlobalHandler
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
globalHandler
- @Deprecated public RouterFactory setExtraOperationContextPayloadMapper(Function<RoutingContext,io.vertx.core.json.JsonObject> extraOperationContextPayloadMapper)
OperationRequest
setExtraOperationContextPayloadMapper
in interface RouterFactory<io.swagger.v3.oas.models.OpenAPI>
extraOperationContextPayloadMapper
- @Deprecated public OpenAPI3RouterFactory addSecuritySchemaScopeValidator(String securitySchemaName, String scopeName, io.vertx.core.Handler<RoutingContext> handler)
securitySchemaName
- scopeName
- handler
- @Deprecated public OpenAPI3RouterFactory addHandlerByOperationId(String operationId, io.vertx.core.Handler<RoutingContext> handler)
operationId
- handler
- @Deprecated public OpenAPI3RouterFactory addFailureHandlerByOperationId(String operationId, io.vertx.core.Handler<RoutingContext> failureHandler)
operationId
- failureHandler
- @Deprecated public OpenAPI3RouterFactory mountOperationToEventBus(String operationId, String address)
operationId
- address
- @Deprecated public OpenAPI3RouterFactory mountServiceFromTag(String tag, String address)
tag
- address
- @Deprecated public OpenAPI3RouterFactory mountServicesFromExtensions()
@Deprecated public static void create(Vertx vertx, String url, io.vertx.core.Handler<io.vertx.core.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 AsyncResult@Deprecated public static void 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)@Deprecated public static rx.Single<OpenAPI3RouterFactory> rxCreate(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)@Deprecated public static void create(Vertx vertx, String url, List<io.vertx.core.json.JsonObject> auth, io.vertx.core.Handler<io.vertx.core.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 anhandler
- When specification is loaded, this handler will be called with AsyncResult@Deprecated public static void create(Vertx vertx, String url, List<io.vertx.core.json.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@Deprecated public static rx.Single<OpenAPI3RouterFactory> rxCreate(Vertx vertx, String url, List<io.vertx.core.json.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 anpublic static OpenAPI3RouterFactory newInstance(io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory arg)
Copyright © 2020 Eclipse. All rights reserved.