Package org.springdoc.ui
Class AbstractSwaggerWelcome
- java.lang.Object
-
- org.springdoc.ui.AbstractSwaggerWelcome
-
public abstract class AbstractSwaggerWelcome extends Object
The type Abstract swagger welcome.- Author:
- bnasslashen
-
-
Field Summary
Fields Modifier and Type Field Description protected String
apiDocsUrl
The Api docs url.protected String
contextPath
The Context path.protected SpringDocConfigProperties
springDocConfigProperties
The Spring doc config properties.protected String
swaggerConfigUrl
The Swagger config url.protected SwaggerUiConfigProperties
swaggerUiConfig
The Swagger ui configuration.protected SwaggerUiConfigParameters
swaggerUiConfigParameters
The Swagger ui calculated config.
-
Constructor Summary
Constructors Constructor Description AbstractSwaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters)
Instantiates a new Abstract swagger welcome.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
buildApiDocUrl()
Build api doc url string.protected void
buildConfigUrl(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
Build config url.protected abstract String
buildSwaggerConfigUrl()
Build swagger config url string.protected String
buildUrl(String contextPath, String docsUrl)
Build url string.protected abstract String
buildUrlWithContextPath(String swaggerUiUrl)
Build swagger ui url string.protected abstract void
calculateOauth2RedirectUrl(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
Calculate oauth 2 redirect url.protected void
calculateUiRootCommon(StringBuilder sbUrl, StringBuilder[] sbUrls)
Calculate ui root common.protected abstract void
calculateUiRootPath(StringBuilder... sbUrls)
Calculate ui root path.protected String
getOauth2RedirectUrl()
Gets oauth2 redirect url.protected String
getSwaggerUiUrl()
Gets swagger ui url.protected org.springframework.web.util.UriComponentsBuilder
getUriComponentsBuilder(String sbUrl)
Gets uri components builder.protected void
init()
-
-
-
Field Detail
-
swaggerUiConfig
protected final SwaggerUiConfigProperties swaggerUiConfig
The Swagger ui configuration.
-
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 configspringDocConfigProperties
- the spring doc config propertiesswaggerUiConfigParameters
- 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 pathdocsUrl
- 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 urlsbUrls
- 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
-
-