Package org.apache.camel.model.rest
Class OpenApiDefinition
java.lang.Object
org.apache.camel.model.OptionalIdentifiedDefinition<OpenApiDefinition>
org.apache.camel.model.rest.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiContextPath(String apiDoc) Whether to enable api-doc that exposes the OpenAPI specification file as a REST endpoint.disabled()Whether to disable the OpenAPI entirely.disabled(boolean disabled) Whether to disable the OpenAPI entirely.Whether to disable the OpenAPI entirely.end()getLabel()missingOperation(String missingOperation) Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route.mockIncludePattern(String mockIncludePattern) Used for inclusive filtering of mock data from directories.Sets the id of the routevoidsetApiContextPath(String apiContextPath) voidsetDisabled(String disabled) Whether to disable all the REST services from the OpenAPI contract from the route during build time.voidsetMissingOperation(String missingOperation) Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route.voidsetMockIncludePattern(String mockIncludePattern) Used for inclusive filtering of mock data from directories.voidsetRest(RestDefinition rest) voidsetRouteId(String routeId) Sets the id of the routevoidsetSpecification(String specification) specification(String specification) Path to the OpenApi specification file.Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getNodePrefixId, getParent, hasCustomIdAssigned, id, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.NamedNode
acceptDebugger
-
Constructor Details
-
OpenApiDefinition
public OpenApiDefinition()
-
-
Method Details
-
setRest
-
getShortName
-
getLabel
-
getSpecification
-
setSpecification
-
getApiContextPath
-
setApiContextPath
-
getDisabled
-
setDisabled
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
-
setMissingOperation
Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route. -
getMockIncludePattern
-
setMockIncludePattern
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
-
setRouteId
Sets the id of the route -
specification
Path to the OpenApi specification file. -
apiContextPath
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
Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime. -
disabled
Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime. -
disabled
Whether to disable the OpenAPI entirely. Once the OpenAPI has been disabled then it cannot be enabled later at runtime. -
missingOperation
Whether to fail, ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route. -
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
Sets the id of the route -
end
-