Este contenido no está disponible en el idioma seleccionado.
Chapter 336. Options
The OpenApi module can be configured using the following options. To configure using a servlet you use the init-param as shown above. When configuring directly in the rest-dsl, you use the appropriate method, such as enableCORS
, host,contextPath
, dsl. The options with api.xxx
is configured using apiProperty
dsl.
Option | Type | Description |
---|---|---|
cors | Boolean | Whether to enable CORS. Notice this only enables CORS for the api browser, and not the actual access to the REST services. Is default false. |
openapi.version | String | OpenApi spec version. Is default 3.0. |
host | String | To setup the hostname. If not configured camel-openapi-java will calculate the name as localhost based. |
schemes | String | The protocol schemes to use. Multiple values can be separated by comma such as "http,https". The default value is "http". |
base.path | String |
Required: To setup the base path where the REST services is available. The path is relative (eg do not start with http/https) and camel-openapi-java will calculate the absolute base path at runtime, which will be |
api.path | String |
To setup the path where the API is available (eg /api-docs). The path is relative (eg do not start with http/https) and camel-openapi-java will calculate the absolute base path at runtime, which will be |
api.version | String | The version of the api. Is default 0.0.0. |
api.title | String | The title of the application. |
api.description | String | A short description of the application. |
api.termsOfService | String | A URL to the Terms of Service of the API. |
api.contact.name | String | Name of person or organization to contact |
api.contact.email | String | An email to be used for API-related correspondence. |
api.contact.url | String | A URL to a website for more contact information. |
api.license.name | String | The license name used for the API. |
api.license.url | String | A URL to the license used for the API. |
apiContextIdListing | boolean | Whether to allow listing all the CamelContext names in the JVM that has REST services. When enabled then the root path of the api-doc will list all the contexts. When disabled then no context ids is listed and the root path of the api-doc lists the current CamelContext. Is default false. |
apiContextIdPattern | String | A pattern that allows to filter which CamelContext names is shown in the context listing. The pattern is using regular expression and * as wildcard. Its the same pattern matching as used by Intercept |