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)
Name | Description | Default |
---|---|---|
basePath | the context root path+ | null |
contact | the contact information+ | "users@cxf.apache.org" |
description | the description+ | "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+ | "Sample REST Application" |
version | the version+ | "1.0.0" |
...