...
Note some properties listed below are not available or used differently in SwaggerFeature, as the corresponding properties are used differently in Swagger 2.0 and Swagger 1.2. Please refer to the corresponding Swagger documentation for more information.)
Name | Description | Default |
---|---|---|
basePath | the context root path+ | null |
contact | the contact information+ | null (in CXF 3.1.x "users@cxf.apache.org") |
description | the description+ | null (in CXF 3.1.x "The Application") |
filterClass | a security filter+ | null |
host | the host and port+ | null |
ignoreRoutes | excludes specific paths when scanning all resources (see scanAllResources)++ | null |
license | the license+ | "Apache 2.0 License" |
licenceUrl | the license URL+ | "http://www.apache.org/licenses/LICENSE-2.0.html" |
prettyPrint | when generating swagger.json, pretty-print the json document+ | false |
resourcePackage | a list of comma separated package names where resources must be scanned+ | a list of service classes configured at the endpoint |
runAsFilter | runs the feature as a filter | false |
scan | generates the swagger documentation+ | true |
scanAllResources | scans all resources including non-annotated JAX-RS resources++ | false |
schemes | the protocol schemes+ | null |
termsOfServiceUrl | the terms of service URL+ | null |
title | the title+ | null (in CXF 3.1.x "Sample REST Application") |
version | the version+ | null (in CXF 3.1.x "1.0.0") |
swaggerUiConfig | Swagger UI configuration | null |
Note: those descriptions marked with + correspond to the properties defined in Swagger's BeanConfig, and those marked with ++ correspond to the properties defined in Swagger's ReaderConfig.
...
In CXF 3.1.8: set Swagger2Feature 'supportSwaggerUi' property to 'false' to disable the automatic UI activation described in the previous section
Configuring Swagger UI (from 3.2.7+)
The Swagger2Feature has a way to pre-configure certain Swagger UI parameters (https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md) through SwaggerUiConfig. Theway it is implemented is by passing those parameters as a query string so the Swagger UI could adjust itself.
Reverse Proxy
Set a CXFServlet init parameter 'use-x-forwarded-headers' to 'true' if you access Swagger JSON and/or UI via the reverse proxy. If you use CXF SpringBoot starters then this property is prefixed with a "cxf.servlet.init.", "cxf.servlet.init.use-x-forwarded-headers".
...