Class OpenApiDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="rest") public class OpenApiDefinition extends OptionalIdentifiedDefinition<OpenApiDefinition>
To use OpenApi as contract-first with Camel Rest DSL.
  • Constructor Details

    • OpenApiDefinition

      public OpenApiDefinition()
  • Method Details

    • setRest

      public void setRest(RestDefinition rest)
    • getShortName

      public String getShortName()
    • getLabel

      public String getLabel()
    • getSpecification

      public String getSpecification()
    • setSpecification

      public void setSpecification(String specification)
    • getApiContextPath

      public String getApiContextPath()
    • setApiContextPath

      public void setApiContextPath(String apiContextPath)
    • getDisabled

      public String getDisabled()
    • setDisabled

      public void setDisabled(String disabled)
      Whether to disable all the REST services from the OpenAPI contract from the route during build time. Once an REST service has been disabled then it cannot be enabled later at runtime.
    • getMissingOperation

      public String getMissingOperation()
    • setMissingOperation

      public void setMissingOperation(String missingOperation)
      Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route.
    • getMockIncludePattern

      public String getMockIncludePattern()
    • setMockIncludePattern

      public void setMockIncludePattern(String mockIncludePattern)
      Used for inclusive filtering of mock data from directories. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma.
    • getRouteId

      public String getRouteId()
    • setRouteId

      public void setRouteId(String routeId)
      Sets the id of the route
    • specification

      public OpenApiDefinition specification(String specification)
      Path to the OpenApi specification file.
    • apiContextPath

      public OpenApiDefinition apiContextPath(String apiDoc)
      Whether to enable api-doc that exposes the OpenAPI specification file as a REST endpoint. This allows clients to obtain the specification from the running Camel application.
    • disabled

      public OpenApiDefinition disabled(String disabled)
      Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime.
    • disabled

      public OpenApiDefinition disabled(boolean disabled)
      Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime.
    • disabled

      public OpenApiDefinition disabled()
      Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime.
    • missingOperation

      public OpenApiDefinition missingOperation(String missingOperation)
      Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route.
    • mockIncludePattern

      public OpenApiDefinition mockIncludePattern(String mockIncludePattern)
      Used for inclusive filtering of mock data from directories. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma.
    • routeId

      public OpenApiDefinition routeId(String routeId)
      Sets the id of the route
    • end

      public RestDefinition end()