Package org.springdoc.ui
Class AbstractSwaggerWelcome
java.lang.Object
org.springdoc.ui.AbstractSwaggerWelcome
The type Abstract swagger welcome.
- Author:
- bnasslashen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SpringDocConfigProperties
The Spring doc config properties.protected final SwaggerUiConfigProperties
The Swagger ui configuration. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractSwaggerWelcome
(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Abstract swagger welcome. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
buildApiDocUrl
(SwaggerUiConfigParameters swaggerUiConfigParameters) Build api doc url string.protected void
buildConfigUrl
(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Build config url.protected abstract void
buildSwaggerConfigUrl
(SwaggerUiConfigParameters swaggerUiConfigParameters) Build swagger config url string.protected String
Build url string.protected abstract String
buildUrlWithContextPath
(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) Build swagger ui url string.protected abstract void
calculateOauth2RedirectUrl
(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Calculate oauth 2 redirect url.protected void
calculateUiRootCommon
(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder sbUrl, StringBuilder[] sbUrls) Calculate ui root common.protected abstract void
calculateUiRootPath
(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) Calculate ui root path.protected String
Gets oauth2 redirect url.protected String
Gets swagger ui url.protected org.springframework.web.util.UriComponentsBuilder
getUriComponentsBuilder
(SwaggerUiConfigParameters swaggerUiConfigParameters, String sbUrl) Gets uri components builder.protected void
init
(SwaggerUiConfigParameters swaggerUiConfigParameters) Init.
-
Field Details
-
swaggerUiConfig
The Swagger ui configuration. -
springDocConfigProperties
The Spring doc config properties.
-
-
Constructor Details
-
AbstractSwaggerWelcome
protected AbstractSwaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Abstract swagger welcome.- Parameters:
swaggerUiConfig
- the swagger ui configspringDocConfigProperties
- the spring doc config properties
-
-
Method Details
-
init
Init.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameters
-
buildUrl
Build url string.- Parameters:
contextPath
- the context pathdocsUrl
- the docs url- Returns:
- the string
-
buildConfigUrl
protected void buildConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Build config url.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parametersuriComponentsBuilder
- the uri components builder
-
buildUrlWithContextPath
protected abstract String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) Build swagger ui url string.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parametersswaggerUiUrl
- the swagger ui url- Returns:
- the string
-
getUriComponentsBuilder
protected org.springframework.web.util.UriComponentsBuilder getUriComponentsBuilder(SwaggerUiConfigParameters swaggerUiConfigParameters, String sbUrl) Gets uri components builder.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameterssbUrl
- the sb url- Returns:
- the uri components builder
-
calculateOauth2RedirectUrl
protected abstract void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Calculate oauth 2 redirect url.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parametersuriComponentsBuilder
- the uri components builder
-
calculateUiRootPath
protected abstract void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) Calculate ui root path.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameterssbUrls
- the sb urls
-
calculateUiRootCommon
protected void calculateUiRootCommon(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder sbUrl, StringBuilder[] sbUrls) Calculate ui root common.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameterssbUrl
- the sb urlsbUrls
- the sb urls
-
buildApiDocUrl
Build api doc url string.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameters
-
buildSwaggerConfigUrl
Build swagger config url string.- Parameters:
swaggerUiConfigParameters
- the swagger ui config parameters
-
getOauth2RedirectUrl
Gets oauth2 redirect url.- Returns:
- the oauth2 redirect url
-
getSwaggerUiUrl
Gets swagger ui url.- Returns:
- the swagger ui url
-