Class AbstractSwaggerWelcome


  • public abstract class AbstractSwaggerWelcome
    extends Object
    The type Abstract swagger welcome.
    Author:
    bnasslashen
    • Field Detail

      • springDocConfigProperties

        protected final SpringDocConfigProperties springDocConfigProperties
        The Spring doc config properties.
      • swaggerUiConfigParameters

        protected final SwaggerUiConfigParameters swaggerUiConfigParameters
        The Swagger ui calculated config.
      • swaggerConfigUrl

        protected String swaggerConfigUrl
        The Swagger config url.
      • apiDocsUrl

        protected String apiDocsUrl
        The Api docs url.
      • contextPath

        protected String contextPath
        The Context path.
    • Constructor Detail

      • AbstractSwaggerWelcome

        public AbstractSwaggerWelcome​(SwaggerUiConfigProperties swaggerUiConfig,
                                      SpringDocConfigProperties springDocConfigProperties,
                                      SwaggerUiConfigParameters swaggerUiConfigParameters)
        Instantiates a new Abstract swagger welcome.
        Parameters:
        swaggerUiConfig - the swagger ui config
        springDocConfigProperties - the spring doc config properties
        swaggerUiConfigParameters - the swagger ui config parameters
    • Method Detail

      • init

        protected void init()
      • buildUrl

        protected String buildUrl​(String contextPath,
                                  String docsUrl)
        Build url string.
        Parameters:
        contextPath - the context path
        docsUrl - the docs url
        Returns:
        the string
      • buildConfigUrl

        protected void buildConfigUrl​(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
        Build config url.
        Parameters:
        uriComponentsBuilder - the uri components builder
      • buildUrlWithContextPath

        protected abstract String buildUrlWithContextPath​(String swaggerUiUrl)
        Build swagger ui url string.
        Parameters:
        swaggerUiUrl - the swagger ui url
        Returns:
        the string
      • getUriComponentsBuilder

        protected org.springframework.web.util.UriComponentsBuilder getUriComponentsBuilder​(String sbUrl)
        Gets uri components builder.
        Parameters:
        sbUrl - the sb url
        Returns:
        the uri components builder
      • calculateOauth2RedirectUrl

        protected abstract void calculateOauth2RedirectUrl​(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
        Calculate oauth 2 redirect url.
        Parameters:
        uriComponentsBuilder - the uri components builder
      • calculateUiRootPath

        protected abstract void calculateUiRootPath​(StringBuilder... sbUrls)
        Calculate ui root path.
        Parameters:
        sbUrls - the sb urls
      • calculateUiRootCommon

        protected void calculateUiRootCommon​(StringBuilder sbUrl,
                                             StringBuilder[] sbUrls)
        Calculate ui root common.
        Parameters:
        sbUrl - the sb url
        sbUrls - the sb urls
      • buildApiDocUrl

        protected abstract String buildApiDocUrl()
        Build api doc url string.
        Returns:
        the string
      • buildSwaggerConfigUrl

        protected abstract String buildSwaggerConfigUrl()
        Build swagger config url string.
        Returns:
        the string
      • getOauth2RedirectUrl

        protected String getOauth2RedirectUrl()
        Gets oauth2 redirect url.
        Returns:
        the oauth2 redirect url
      • getSwaggerUiUrl

        protected String getSwaggerUiUrl()
        Gets swagger ui url.
        Returns:
        the swagger ui url