Package org.springdoc.ui
Class AbstractSwaggerConfigurer
java.lang.Object
org.springdoc.ui.AbstractSwaggerConfigurer
The type Abstract swagger configurer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordThe type Swagger resource handler config. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSwaggerConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, org.springframework.boot.autoconfigure.web.WebProperties springWebProperties) Instantiates a new Abstract swagger configurer. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcombinePatterns(String... patterns) Combines pattern strings into a new pattern according to the rules ofPathPattern.combine(org.springframework.web.util.pattern.PathPattern).Gets the handler configs for mapping Swagger UI resources.Gets the handler configs for mapping webjar resources for the Swagger UI.protected abstract StringGets the root path for the Swagger UI.protected abstract StringGets the path pattern for webjar resources.
-
Constructor Details
-
AbstractSwaggerConfigurer
protected AbstractSwaggerConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, org.springframework.boot.autoconfigure.web.WebProperties springWebProperties) Instantiates a new Abstract swagger configurer.- Parameters:
swaggerUiConfigProperties- the swagger ui calculated configspringWebProperties- the spring web config
-
-
Method Details
-
getSwaggerHandlerConfigs
Gets the handler configs for mapping Swagger UI resources.- Returns:
- the Swagger UI handler configs.
-
getSwaggerWebjarHandlerConfigs
Gets the handler configs for mapping webjar resources for the Swagger UI.- Returns:
- the Swagger UI webjar handler configs.
-
getUiRootPath
Gets the root path for the Swagger UI.- Returns:
- the Swagger UI root path.
-
getWebjarsPathPattern
Gets the path pattern for webjar resources.- Returns:
- the webjars path pattern.
-
combinePatterns
Combines pattern strings into a new pattern according to the rules ofPathPattern.combine(org.springframework.web.util.pattern.PathPattern).For example:
/webjars/**+/swagger-ui/**=>/webjars/swagger-ui/**/documentation/swagger-ui*/**+/*.js=>/documentation/swagger-ui*/*.js
- Parameters:
patterns- the patterns to combine.- Returns:
- the combination of the patterns strings.
- Throws:
IllegalArgumentException- if the patterns cannot be combined.- See Also:
-