io.vertx.ext.web.openapi

## Class RouterBuilderOptions

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

-     public class RouterBuilderOptions
      extends Object

  Author:
    Francesco Guardiani @slinkydeveloper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_CONTRACT_ENDPOINT` By default, RouterBuilder won't serve the contract
    `static boolean` | `DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER` By default, RouterBuilder mounts Not Implemented/Method Not Allowed handler
    `static boolean` | `DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER` By default, RouterBuilder will mount ResponseContentTypeHandler when required
    `static String` | `DEFAULT_OPERATION_MODEL_KEY` By default, RouterBuilder will not expose operation configuration in the the routing context
    `static boolean` | `DEFAULT_REQUIRE_SECURITY_HANDLERS` By default, RouterBuilder requires security handlers to be defined while calling getRouter() or it will throw an Exception
    `static RouteNamingStrategy` | `DEFAULT_ROUTE_NAMING_STRATEGY` By default, RouterBuilder will name routes by open api path.
    `static String` | `STANDARD_CONTRACT_ENDPOINT` Standard OpenAPI contract endpoint as defined by Microprofile OpenAPI spec

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getContractEndpoint()`
    `String` | `getOperationModelKey()`
    `RouteNamingStrategy` | `getRouteNamingStrategy()`
    `boolean` | `isMountNotImplementedHandler()`
    `boolean` | `isMountResponseContentTypeHandler()`
    `boolean` | `isRequireSecurityHandlers()`
    `RouterBuilderOptions` | `setContractEndpoint(String contractEndpoint)` Configures the endpoint where the contract is served.
    `RouterBuilderOptions` | `setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)` If true, Router builder will automatically mount an handler that return HTTP 405/501 status code for each operation where you didn't specify an handler.
    `RouterBuilderOptions` | `setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)` If true, when required, the factory will mount a `ResponseContentTypeHandler`
    `RouterBuilderOptions` | `setOperationModelKey(String operationModelKey)` When set, an additional handler will be created to expose the operation model in the routing context under the given key.
    `RouterBuilderOptions` | `setRequireSecurityHandlers(boolean requireSecurityHandlers)` If true, when you call `RouterBuilder.createRouter()` ()} the factory will mount for every path the required security handlers and, if a security handler is not defined, it throws an `RouterBuilderException`
    `RouterBuilderOptions` | `setRouteNamingStrategy(RouteNamingStrategy routeNamingStrategy)` The strategy to follow when naming the generated routes.
    `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, RouterBuilder 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, RouterBuilder 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, RouterBuilder will mount ResponseContentTypeHandler when required
      See Also:
        Constant Field Values

    - #### DEFAULT_OPERATION_MODEL_KEY

          public static final String DEFAULT_OPERATION_MODEL_KEY

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

    - #### DEFAULT_ROUTE_NAMING_STRATEGY

          public static final RouteNamingStrategy DEFAULT_ROUTE_NAMING_STRATEGY

      By default, RouterBuilder will name routes by open api path.

    - #### DEFAULT_CONTRACT_ENDPOINT

          public static final String DEFAULT_CONTRACT_ENDPOINT

      By default, RouterBuilder won't serve the contract

    - #### STANDARD_CONTRACT_ENDPOINT

          public static final String STANDARD_CONTRACT_ENDPOINT

      Standard OpenAPI contract endpoint as defined by Microprofile OpenAPI spec
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RouterBuilderOptions

          public RouterBuilderOptions()

    - #### RouterBuilderOptions

          public RouterBuilderOptions(JsonObject json)

    - #### RouterBuilderOptions

          public RouterBuilderOptions(RouterBuilderOptions other)

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

    - #### isMountNotImplementedHandler

          public boolean isMountNotImplementedHandler()

    - #### setMountNotImplementedHandler

          public RouterBuilderOptions setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)

      If true, Router builder 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 RouterBuilderOptions setRequireSecurityHandlers(boolean requireSecurityHandlers)

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

    - #### isMountResponseContentTypeHandler

          public boolean isMountResponseContentTypeHandler()

    - #### setMountResponseContentTypeHandler

          public RouterBuilderOptions setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)

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

    - #### getOperationModelKey

          public String getOperationModelKey()

    - #### setOperationModelKey

          public RouterBuilderOptions 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:

    - #### getRouteNamingStrategy

          public RouteNamingStrategy getRouteNamingStrategy()

    - #### setRouteNamingStrategy

          public RouterBuilderOptions setRouteNamingStrategy(RouteNamingStrategy routeNamingStrategy)

      The strategy to follow when naming the generated routes.
      Parameters:
        `routeNamingStrategy` -
      Returns:
        this object

    - #### getContractEndpoint

          public String getContractEndpoint()

    - #### setContractEndpoint

          public RouterBuilderOptions setContractEndpoint(String contractEndpoint)

      Configures the endpoint where the contract is served. The contract is served using the Microprofile OpenAPI spec.
      Parameters:
        `contractEndpoint` -
      Returns:
        this object

Copyright © 2022 Eclipse. All rights reserved.