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 SpringDocConfigPropertiesThe Spring doc config properties.protected final SwaggerUiConfigPropertiesThe Swagger ui configuration. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSwaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Abstract swagger welcome. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) Build api doc url string.protected voidbuildConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Build config url.protected abstract voidbuildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) Build swagger config url string.protected StringBuild url string.protected abstract StringbuildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) Build swagger ui url string.protected abstract voidcalculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder) Calculate oauth 2 redirect url.protected voidcalculateUiRootCommon(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder sbUrl, StringBuilder[] sbUrls) Calculate ui root common.protected abstract voidcalculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) Calculate ui root path.protected StringGets oauth2 redirect url.protected StringGets swagger ui url.protected org.springframework.web.util.UriComponentsBuildergetUriComponentsBuilder(SwaggerUiConfigParameters swaggerUiConfigParameters, String sbUrl) Gets uri components builder.protected voidinit(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
-