Package org.apache.cxf.jaxrs.openapi
Class OpenApiFeature
- java.lang.Object
-
- javax.xml.ws.WebServiceFeature
-
- org.apache.cxf.feature.AbstractFeature
-
- org.apache.cxf.feature.DelegatingFeature<OpenApiFeature.Portable>
-
- org.apache.cxf.jaxrs.openapi.OpenApiFeature
-
- All Implemented Interfaces:
AbstractPortableFeature,Feature,SwaggerProperties,SwaggerUiSupport
public class OpenApiFeature extends DelegatingFeature<OpenApiFeature.Portable> implements SwaggerUiSupport, SwaggerProperties
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classOpenApiFeature.CustomizedSwaggerContainerRequestFilterstatic classOpenApiFeature.Portableprotected static classOpenApiFeature.SwaggerContainerRequestFilter-
Nested classes/interfaces inherited from interface org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
SwaggerUiSupport.Registration
-
-
Field Summary
-
Fields inherited from class org.apache.cxf.feature.DelegatingFeature
delegate
-
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
-
Fields inherited from interface org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
SUPPORT_UI_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description OpenApiFeature()
-
Method Summary
-
Methods inherited from class org.apache.cxf.feature.DelegatingFeature
getDelegate, 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
-
Methods inherited from interface org.apache.cxf.jaxrs.common.openapi.SwaggerProperties
getSwaggerProperties
-
Methods inherited from interface org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport
checkSupportSwaggerUiProp, getSwaggerUi
-
-
-
-
Method Detail
-
isScan
public boolean isScan()
-
setScan
public void setScan(boolean scan)
-
getFilterClass
public String getFilterClass()
-
setFilterClass
public void setFilterClass(String filterClass)
-
getVersion
public String getVersion()
-
setVersion
public void setVersion(String version)
-
getTitle
public String getTitle()
-
setTitle
public void setTitle(String title)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getContactName
public String getContactName()
-
setContactName
public void setContactName(String contactName)
-
getContactEmail
public String getContactEmail()
-
setContactEmail
public void setContactEmail(String contactEmail)
-
getContactUrl
public String getContactUrl()
-
setContactUrl
public void setContactUrl(String contactUrl)
-
getLicense
public String getLicense()
-
setLicense
public void setLicense(String license)
-
getLicenseUrl
public String getLicenseUrl()
-
setLicenseUrl
public void setLicenseUrl(String licenseUrl)
-
getTermsOfServiceUrl
public String getTermsOfServiceUrl()
-
setTermsOfServiceUrl
public void setTermsOfServiceUrl(String termsOfServiceUrl)
-
isReadAllResources
public boolean isReadAllResources()
-
setReadAllResources
public void setReadAllResources(boolean readAllResources)
-
getIgnoredRoutes
public Collection<String> getIgnoredRoutes()
-
setIgnoredRoutes
public void setIgnoredRoutes(Collection<String> ignoredRoutes)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
isRunAsFilter
public boolean isRunAsFilter()
-
isSupportSwaggerUi
public Boolean isSupportSwaggerUi()
Description copied from interface:SwaggerUiSupportChecks if Swagger UI support is available or not.- Specified by:
isSupportSwaggerUiin interfaceSwaggerUiSupport- Returns:
- "true" if Swagger UI support is available, "false" otherwise
-
setSupportSwaggerUi
public void setSupportSwaggerUi(Boolean supportSwaggerUi)
-
getSwaggerUiVersion
public String getSwaggerUiVersion()
-
setSwaggerUiVersion
public void setSwaggerUiVersion(String swaggerUiVersion)
-
getSwaggerUiMavenGroupAndArtifact
public String getSwaggerUiMavenGroupAndArtifact()
-
setSwaggerUiMavenGroupAndArtifact
public void setSwaggerUiMavenGroupAndArtifact(String swaggerUiMavenGroupAndArtifact)
-
getSwaggerUiMediaTypes
public Map<String,String> getSwaggerUiMediaTypes()
Description copied from interface:SwaggerUiSupportReturns media types supported by Swagger UI- Specified by:
getSwaggerUiMediaTypesin interfaceSwaggerUiSupport- Returns:
- media types supported by Swagger UI
-
getConfigLocation
public String getConfigLocation()
-
setConfigLocation
public void setConfigLocation(String configLocation)
-
getPropertiesLocation
public String getPropertiesLocation()
-
setPropertiesLocation
public void setPropertiesLocation(String propertiesLocation)
-
setRunAsFilter
public void setRunAsFilter(boolean runAsFilter)
-
getSecurityDefinitions
public Map<String,io.swagger.v3.oas.models.security.SecurityScheme> getSecurityDefinitions()
-
setSecurityDefinitions
public void setSecurityDefinitions(Map<String,io.swagger.v3.oas.models.security.SecurityScheme> securityDefinitions)
-
getCustomizer
public OpenApiCustomizer getCustomizer()
-
setCustomizer
public void setCustomizer(OpenApiCustomizer customizer)
-
setScanKnownConfigLocations
public void setScanKnownConfigLocations(boolean scanKnownConfigLocations)
-
isScanKnownConfigLocations
public boolean isScanKnownConfigLocations()
-
setSwaggerUiConfig
public void setSwaggerUiConfig(SwaggerUiConfig swaggerUiConfig)
-
setUseContextBasedConfig
public void setUseContextBasedConfig(boolean useContextBasedConfig)
-
isUseContextBasedConfig
public boolean isUseContextBasedConfig()
-
getScannerClass
public String getScannerClass()
-
setScannerClass
public void setScannerClass(String scannerClass)
-
getSwaggerUiConfig
public SwaggerUiConfig getSwaggerUiConfig()
Description copied from interface:SwaggerUiSupportReturns Swagger UI configuration parameters.- Specified by:
getSwaggerUiConfigin interfaceSwaggerUiSupport- Returns:
- Swagger UI configuration parameters or "null" if not available
-
findSwaggerUiRoot
public String findSwaggerUiRoot()
Description copied from interface:SwaggerUiSupportDetects the Swagger UI in root with respect to properties and configuration provided.- Specified by:
findSwaggerUiRootin interfaceSwaggerUiSupport- Returns:
- Swagger UI in root or "null" if not available
-
getUserProperties
public Properties getUserProperties(Map<String,Object> userDefinedOptions)
-
registerOpenApiResources
public void registerOpenApiResources(JAXRSServiceFactoryBean sfb, Set<String> packages, io.swagger.v3.oas.integration.api.OpenAPIConfiguration config)
-
registerServletConfigProvider
public void registerServletConfigProvider(ServerProviderFactory factory)
-
registerSwaggerUiResources
public void registerSwaggerUiResources(JAXRSServiceFactoryBean sfb, Properties properties, ServerProviderFactory factory, Bus bus)
-
getInfo
public io.swagger.v3.oas.models.info.Info getInfo(Properties properties)
-
getOrFallback
public String getOrFallback(String value, Properties properties, String property)
-
getOrFallback
public Boolean getOrFallback(Boolean value, Properties properties, String property)
-
getOrFallback
public Set<String> getOrFallback(Set<String> collection, Properties properties, String property)
-
scanResourcePackages
public Collection<String> scanResourcePackages(JAXRSServiceFactoryBean sfb)
-
combine
public static Properties combine(Properties primary, Properties secondary)
-
setOrReplace
public static void setOrReplace(Properties source, Properties destination)
-
registerComponents
public static Optional<io.swagger.v3.oas.models.Components> registerComponents(Map<String,io.swagger.v3.oas.models.security.SecurityScheme> securityDefinitions)
-
createOpenApiResource
public io.swagger.v3.jaxrs2.integration.resources.BaseOpenApiResource createOpenApiResource()
-
-