Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Swagger2Feature

Table of Contents

...

 

The CXF Swagger2Feature allows you to generate generate Swagger 2.0 documents  documents from JAX-RS service endpoints with a simple configuration..

For generating Swagger version 1.2 documents, you can use SwaggerFeature instead of Swagger2Feature.

These features This feature can be configured programatically in Java or using Spring or Blueprint beans.

Properties

The following optional parameters can be configured in Swagger2Feature .(note some properties are not available in SwaggerFeature)

NameDescriptionDefault
basePaththe context root path+null
contactthe contact information+"users@cxf.apache.org"
descriptionthe description+"The Application"
filterClassa security filter+null
hostthe host and port+null
ignoreRoutesexcludes specific paths when scanning all resources (see scanAllResources)++null
licensethe license+"Apache 2.0 License"
licenceUrlthe license URL+"http://www.apache.org/licenses/LICENSE-2.0.html"
prettyPrintwhen generating swagger.json, pretty-print the json document+false
resourcePackagea list of comma separated package names where resources must be scanned+a list of service classes configured at the endpoint
runAsFilterruns the feature as a filterfalse
scangenerates the swagger documentation+true
scanAllResourcesscans all resources including non-annotated JAX-RS resources++false
schemesthe protocol schemes+null
termsOfServiceUrlthe terms of service URL+null
titlethe title+"Sample REST Application"
versionthe version+"1.0.0"

...