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 String
The Api docs url.protected String
The Context path.protected final SpringDocConfigProperties
The Spring doc config properties.protected String
The Swagger config url.protected final SwaggerUiConfigProperties
The Swagger ui configuration.protected final SwaggerUiConfigParameters
The Swagger ui calculated config. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSwaggerWelcome
(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters) Instantiates a new Abstract swagger welcome. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Build api doc url string.protected void
buildConfigUrl
(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Build config url.protected abstract String
Build swagger config url string.protected String
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
Gets oauth2 redirect url.protected String
Gets swagger ui url.protected org.springframework.web.util.UriComponentsBuilder
getUriComponentsBuilder
(String sbUrl) Gets uri components builder.protected void
init()
Init.
-
Field Details
-
swaggerUiConfig
The Swagger ui configuration. -
springDocConfigProperties
The Spring doc config properties. -
swaggerUiConfigParameters
The Swagger ui calculated config. -
swaggerConfigUrl
The Swagger config url. -
apiDocsUrl
The Api docs url. -
contextPath
The Context path.
-
-
Constructor Details
-
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 Details
-
init
protected void init()Init. -
buildUrl
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
Build swagger ui url string.- Parameters:
swaggerUiUrl
- the swagger ui url- Returns:
- the string
-
getUriComponentsBuilder
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
Calculate ui root path.- Parameters:
sbUrls
- the sb urls
-
calculateUiRootCommon
Calculate ui root common.- Parameters:
sbUrl
- the sb urlsbUrls
- the sb urls
-
buildApiDocUrl
Build api doc url string.- Returns:
- the string
-
buildSwaggerConfigUrl
Build swagger config url string.- Returns:
- the string
-
getOauth2RedirectUrl
Gets oauth2 redirect url.- Returns:
- the oauth2 redirect url
-
getSwaggerUiUrl
Gets swagger ui url.- Returns:
- the swagger ui url
-