Class: OpenAPI3RouterFactory

vertx-web-api-contract-js/open_api3_router_factory~ OpenAPI3RouterFactory

new OpenAPI3RouterFactory()

Interface for OpenAPI3RouterFactory.
Source:

Methods

addFailureHandler(method, path, failureHandler) → {RouterFactory}

Add a failure handler to a path with a method. If combination path/method is not available in specification, it will throw a . Deprecated in favour of operation id
Parameters:
Name Type Description
method Object
path string
failureHandler function
Source:
Returns:
Type
RouterFactory

addFailureHandlerByOperationId(operationId, failureHandler) → {OpenAPI3RouterFactory}

Add a failure handler by operation_id field in Operation object
Parameters:
Name Type Description
operationId string
failureHandler function
Source:
Returns:
this factory
Type
OpenAPI3RouterFactory

addHandler(method, path, handler) → {RouterFactory}

Add an handler to a path with a method. If combination path/method is not available in specification, it will throw a . Deprecated in favour of operation id
Parameters:
Name Type Description
method Object
path string
handler function
Source:
Returns:
Type
RouterFactory

addHandlerByOperationId(operationId, handler) → {OpenAPI3RouterFactory}

Add an handler by operation_id field in Operation object
Parameters:
Name Type Description
operationId string
handler function
Source:
Returns:
this factory
Type
OpenAPI3RouterFactory

addSecurityHandler(securitySchemaName, handler) → {RouterFactory}

Mount to paths that have to follow a security schema a security handler
Parameters:
Name Type Description
securitySchemaName string
handler function
Source:
Returns:
Type
RouterFactory

addSecuritySchemaScopeValidator(securitySchemaName, scopeName, handler) → {OpenAPI3RouterFactory}

Add a particular scope validator. The main security schema will not be called if a specific scope validator is configured
Parameters:
Name Type Description
securitySchemaName string
scopeName string
handler function
Source:
Returns:
this factory
Type
OpenAPI3RouterFactory

enableValidationFailureHandler(enable) → {RouterFactory}

Deprecated. Instantiate and load it using
Parameters:
Name Type Description
enable boolean
Source:
Returns:
Type
RouterFactory

getOptions() → {Object}

Get options of router factory. For more info
Source:
Returns:
Type
Object

getRouter() → {Router}

Construct a new router based on spec. It will fail if you are trying to mount a spec with security schemes without assigned handlers
Note: Router is constructed in this function, so it will be respected the path definition ordering.
Source:
Returns:
Type
Router

mountOperationsWithoutHandlers(enable) → {RouterFactory}

Deprecated. Instantiate and load it using
Parameters:
Name Type Description
enable boolean
Source:
Returns:
Type
RouterFactory

setOptions(options) → {RouterFactory}

Override options
Parameters:
Name Type Description
options Object
Source:
Returns:
Type
RouterFactory

setValidationFailureHandler(handler) → {RouterFactory}

Deprecated. Instantiate and load it using
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RouterFactory