Package org.apache.cxf.jaxrs.swagger
Class Swagger2Feature
- java.lang.Object
-
- javax.xml.ws.WebServiceFeature
-
- org.apache.cxf.feature.AbstractFeature
-
- org.apache.cxf.feature.DelegatingFeature<T>
-
- org.apache.cxf.jaxrs.swagger.AbstractSwaggerFeature<Swagger2Feature.Portable>
-
- org.apache.cxf.jaxrs.swagger.Swagger2Feature
-
- All Implemented Interfaces:
org.apache.cxf.feature.AbstractPortableFeature,org.apache.cxf.feature.Feature,org.apache.cxf.jaxrs.common.openapi.SwaggerProperties,org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
public class Swagger2Feature extends AbstractSwaggerFeature<Swagger2Feature.Portable> implements org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport, org.apache.cxf.jaxrs.common.openapi.SwaggerProperties
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSwagger2Feature.Portableprotected static classSwagger2Feature.SwaggerContainerRequestFilter
-
Field Summary
-
Fields inherited from interface org.apache.cxf.jaxrs.common.openapi.SwaggerProperties
CONTACT_PROPERTY, DEFAULT_LICENSE_URL, DEFAULT_LICENSE_VALUE, DEFAULT_PROPS_LOCATION, DESCRIPTION_PROPERTY, FILTER_CLASS_PROPERTY, LICENSE_PROPERTY, LICENSE_URL_PROPERTY, PRETTY_PRINT_PROPERTY, RESOURCE_PACKAGE_PROPERTY, TERMS_URL_PROPERTY, TITLE_PROPERTY, VERSION_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description Swagger2Feature()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSwaggerResource(org.apache.cxf.endpoint.Server server, org.apache.cxf.Bus bus)voidcalculateDefaultBasePath(org.apache.cxf.endpoint.Server server)StringfindSwaggerUiRoot()Swagger2CustomizergetCustomizer()protected Swagger2Feature.PortablegetDelegate()StringgetHost()StringgetIgnoreRoutes()StringgetPropertiesLocation()String[]getSchemes()org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfiggetSwaggerUiConfig()Map<String,String>getSwaggerUiMediaTypes()voidinitBeanConfig(io.swagger.jaxrs.config.BeanConfig beanConfig, Properties props)BooleanisPrettyPrint()booleanisScan()booleanisScanAllResources()BooleanisSupportSwaggerUi()BooleanisUsePathBasedConfig()voidsetBasePathByAddress(String address)voidsetCustomizer(Swagger2Customizer customizer)voidsetHost(String host)voidsetIgnoreRoutes(String ignoreRoutes)voidsetPrettyPrint(Boolean prettyPrint)voidsetPropertiesLocation(String propertiesLocation)voidsetScan(boolean scan)voidsetScanAllResources(boolean scanAllResources)voidsetSchemes(String[] schemes)voidsetSecurityDefinitions(Map<String,io.swagger.models.auth.SecuritySchemeDefinition> securityDefinitions)voidsetSupportSwaggerUi(boolean supportSwaggerUi)voidsetSwaggerUiConfig(org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig swaggerUiConfig)voidsetSwaggerUiMavenGroupAndArtifact(String swaggerUiMavenGroupAndArtifact)voidsetSwaggerUiMediaTypes(Map<String,String> swaggerUiMediaTypes)voidsetSwaggerUiVersion(String swaggerUiVersion)voidsetUsePathBasedConfig(Boolean usePathBasedConfig)-
Methods inherited from class org.apache.cxf.jaxrs.swagger.AbstractSwaggerFeature
calculateDefaultResourcePackage, getBasePath, getContact, getDescription, getFilterClass, getLicense, getLicenseUrl, getResourcePackage, getTermsOfServiceUrl, getTitle, getVersion, isActivateOnlyIfJaxrsSupported, isRunAsFilter, isSwaggerJaxRsAvailable, setActivateOnlyIfJaxrsSupported, setBasePath, setContact, setDescription, setFilterClass, setLicense, setLicenseUrl, setResourcePackage, setRunAsFilter, setTermsOfServiceUrl, setTitle, setVersion
-
Methods inherited from class org.apache.cxf.feature.DelegatingFeature
initialize, initialize, initialize, initialize, initializeProvider, setDelegate
-
Methods inherited from class org.apache.cxf.feature.AbstractFeature
doInitializeProvider, getActive, getID, isEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getDelegate
protected Swagger2Feature.Portable getDelegate()
- Overrides:
getDelegatein classorg.apache.cxf.feature.DelegatingFeature<Swagger2Feature.Portable>
-
calculateDefaultBasePath
public void calculateDefaultBasePath(org.apache.cxf.endpoint.Server server)
- Overrides:
calculateDefaultBasePathin classAbstractSwaggerFeature<Swagger2Feature.Portable>
-
addSwaggerResource
public void addSwaggerResource(org.apache.cxf.endpoint.Server server, org.apache.cxf.Bus bus)- Overrides:
addSwaggerResourcein classAbstractSwaggerFeature<Swagger2Feature.Portable>
-
initBeanConfig
public void initBeanConfig(io.swagger.jaxrs.config.BeanConfig beanConfig, Properties props)
-
isUsePathBasedConfig
public Boolean isUsePathBasedConfig()
-
setUsePathBasedConfig
public void setUsePathBasedConfig(Boolean usePathBasedConfig)
-
getHost
public String getHost()
-
setHost
public void setHost(String host)
-
getSchemes
public String[] getSchemes()
-
setSchemes
public void setSchemes(String[] schemes)
-
isPrettyPrint
public Boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(Boolean prettyPrint)
-
getCustomizer
public Swagger2Customizer getCustomizer()
-
setCustomizer
public void setCustomizer(Swagger2Customizer customizer)
-
isScanAllResources
public boolean isScanAllResources()
-
setScanAllResources
public void setScanAllResources(boolean scanAllResources)
-
getIgnoreRoutes
public String getIgnoreRoutes()
-
setIgnoreRoutes
public void setIgnoreRoutes(String ignoreRoutes)
-
setBasePathByAddress
public void setBasePathByAddress(String address)
- Overrides:
setBasePathByAddressin classAbstractSwaggerFeature<Swagger2Feature.Portable>
-
setSwaggerUiMavenGroupAndArtifact
public void setSwaggerUiMavenGroupAndArtifact(String swaggerUiMavenGroupAndArtifact)
-
setSwaggerUiVersion
public void setSwaggerUiVersion(String swaggerUiVersion)
-
setSupportSwaggerUi
public void setSupportSwaggerUi(boolean supportSwaggerUi)
-
isSupportSwaggerUi
public Boolean isSupportSwaggerUi()
- Specified by:
isSupportSwaggerUiin interfaceorg.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
-
getSwaggerUiMediaTypes
public Map<String,String> getSwaggerUiMediaTypes()
- Specified by:
getSwaggerUiMediaTypesin interfaceorg.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
-
setSecurityDefinitions
public void setSecurityDefinitions(Map<String,io.swagger.models.auth.SecuritySchemeDefinition> securityDefinitions)
-
getPropertiesLocation
public String getPropertiesLocation()
-
setPropertiesLocation
public void setPropertiesLocation(String propertiesLocation)
-
isScan
public boolean isScan()
-
setScan
public void setScan(boolean scan)
-
setSwaggerUiConfig
public void setSwaggerUiConfig(org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig swaggerUiConfig)
-
getSwaggerUiConfig
public org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig getSwaggerUiConfig()
- Specified by:
getSwaggerUiConfigin interfaceorg.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
-
findSwaggerUiRoot
public String findSwaggerUiRoot()
- Specified by:
findSwaggerUiRootin interfaceorg.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
-
-