Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 336. Options

download PDF

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.

OptionTypeDescription

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 protocol://host:port/context-path/base.path

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 protocol://host:port/context-path/api.path So using relative paths is much easier. See above for an example.

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

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.