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 StringapiDocsUrlThe Api docs url.protected StringcontextPathThe Context path.protected SpringDocConfigPropertiesspringDocConfigPropertiesThe Spring doc config properties.protected StringswaggerConfigUrlThe Swagger config url.protected SwaggerUiConfigPropertiesswaggerUiConfigThe Swagger ui configuration.protected SwaggerUiConfigParametersswaggerUiConfigParametersThe 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 StringbuildApiDocUrl()Build api doc url string.protected voidbuildConfigUrl(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)Build config url.protected abstract StringbuildSwaggerConfigUrl()Build swagger config url string.protected StringbuildUrl(String contextPath, String docsUrl)Build url string.protected abstract StringbuildUrlWithContextPath(String swaggerUiUrl)Build swagger ui url string.protected abstract voidcalculateOauth2RedirectUrl(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)Calculate oauth 2 redirect url.protected voidcalculateUiRootCommon(StringBuilder sbUrl, StringBuilder[] sbUrls)Calculate ui root common.protected abstract voidcalculateUiRootPath(StringBuilder... sbUrls)Calculate ui root path.protected StringgetOauth2RedirectUrl()Gets oauth2 redirect url.protected StringgetSwaggerUiUrl()Gets swagger ui url.protected org.springframework.web.util.UriComponentsBuildergetUriComponentsBuilder(String sbUrl)Gets uri components builder.protected voidinit()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()
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
-
-