Class AbstractSwaggerConfigurer

java.lang.Object
org.springdoc.ui.AbstractSwaggerConfigurer

public abstract class AbstractSwaggerConfigurer extends Object
The type Abstract swagger configurer.
  • 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 config
      springWebProperties - the spring web config
  • Method Details

    • getSwaggerHandlerConfigs

      protected AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig[] getSwaggerHandlerConfigs()
      Gets the handler configs for mapping Swagger UI resources.
      Returns:
      the Swagger UI handler configs.
    • getSwaggerWebjarHandlerConfigs

      protected AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig[] getSwaggerWebjarHandlerConfigs()
      Gets the handler configs for mapping webjar resources for the Swagger UI.
      Returns:
      the Swagger UI webjar handler configs.
    • getUiRootPath

      protected abstract String getUiRootPath()
      Gets the root path for the Swagger UI.
      Returns:
      the Swagger UI root path.
    • getWebjarsPathPattern

      protected abstract String getWebjarsPathPattern()
      Gets the path pattern for webjar resources.
      Returns:
      the webjars path pattern.
    • combinePatterns

      protected String combinePatterns(String... patterns)
      Combines pattern strings into a new pattern according to the rules of PathPattern.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:
      • PathPattern.combine(org.springframework.web.util.pattern.PathPattern)