io.vertx.ext.web.openapi

## Class RouterFactoryOptions

- java.lang.Object
- - io.vertx.ext.web.openapi.RouterFactoryOptions

-     public class RouterFactoryOptions
      extends Object

  Author:
    Francesco Guardiani @slinkydeveloper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER` By default, RouterFactory mounts Not Implemented/Method Not Allowed handler
    `static boolean` | `DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER` By default, RouterFactory will mount ResponseContentTypeHandler when required
    `static String` | `DEFAULT_OPERATION_MODEL_KEY` By default, RouterFactory will not expose operation configuration in the the routing context
    `static boolean` | `DEFAULT_REQUIRE_SECURITY_HANDLERS` By default, RouterFactory requires security handlers to be defined while calling getRouter() or it will throw an Exception

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouterFactoryOptions()`
    `RouterFactoryOptions(JsonObject json)`
    `RouterFactoryOptions(RouterFactoryOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getOperationModelKey()`
    `boolean` | `isMountNotImplementedHandler()`
    `boolean` | `isMountResponseContentTypeHandler()`
    `boolean` | `isRequireSecurityHandlers()`
    `RouterFactoryOptions` | `setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)` If true, Router Factory will automatically mount an handler that return HTTP 405/501 status code for each operation where you didn't specify an handler.
    `RouterFactoryOptions` | `setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)` If true, when required, the factory will mount a `ResponseContentTypeHandler`
    `RouterFactoryOptions` | `setOperationModelKey(String operationModelKey)` When set, an additional handler will be created to expose the operation model in the routing context under the given key.
    `RouterFactoryOptions` | `setRequireSecurityHandlers(boolean requireSecurityHandlers)` If true, when you call `RouterFactory.createRouter()` ()} the factory will mount for every path the required security handlers and, if a security handler is not defined, it throws an `RouterFactoryException`
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER

          public static final boolean DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER

      By default, RouterFactory mounts Not Implemented/Method Not Allowed handler
      See Also:
        Constant Field Values

    - #### DEFAULT_REQUIRE_SECURITY_HANDLERS

          public static final boolean DEFAULT_REQUIRE_SECURITY_HANDLERS

      By default, RouterFactory requires security handlers to be defined while calling getRouter() or it will throw an Exception
      See Also:
        Constant Field Values

    - #### DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER

          public static final boolean DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER

      By default, RouterFactory will mount ResponseContentTypeHandler when required
      See Also:
        Constant Field Values

    - #### DEFAULT_OPERATION_MODEL_KEY

          public static final String DEFAULT_OPERATION_MODEL_KEY

      By default, RouterFactory will not expose operation configuration in the the routing context

  - ### Constructor Detail

    - #### RouterFactoryOptions

          public RouterFactoryOptions()

    - #### RouterFactoryOptions

          public RouterFactoryOptions(JsonObject json)

    - #### RouterFactoryOptions

          public RouterFactoryOptions(RouterFactoryOptions other)

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

    - #### isMountNotImplementedHandler

          public boolean isMountNotImplementedHandler()

    - #### setMountNotImplementedHandler

          public RouterFactoryOptions setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)

      If true, Router Factory will automatically mount an handler that return HTTP 405/501 status code for each operation where you didn't specify an handler. You can customize the response with `Router.errorHandler(int, Handler)`
      Parameters:
        `mountOperationsWithoutHandler` -
      Returns:
        this object

    - #### isRequireSecurityHandlers

          public boolean isRequireSecurityHandlers()

    - #### setRequireSecurityHandlers

          public RouterFactoryOptions setRequireSecurityHandlers(boolean requireSecurityHandlers)

      If true, when you call `RouterFactory.createRouter()` ()} the factory will mount for every path the required security handlers and, if a security handler is not defined, it throws an `RouterFactoryException`
      Parameters:
        `requireSecurityHandlers` -
      Returns:
        this object

    - #### isMountResponseContentTypeHandler

          public boolean isMountResponseContentTypeHandler()

    - #### setMountResponseContentTypeHandler

          public RouterFactoryOptions setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)

      If true, when required, the factory will mount a `ResponseContentTypeHandler`
      Parameters:
        `mountResponseContentTypeHandler` -
      Returns:

    - #### getOperationModelKey

          public String getOperationModelKey()

    - #### setOperationModelKey

          public RouterFactoryOptions setOperationModelKey(String operationModelKey)

      When set, an additional handler will be created to expose the operation model in the routing context under the given key. When the key is null, the handler is not added.
      Parameters:
        `operationModelKey` -
      Returns:

Copyright © 2020 Eclipse. All rights reserved.