Package org.springdoc.webmvc.ui
Class SwaggerWelcomeWebMvc
- java.lang.Object
-
- org.springdoc.ui.AbstractSwaggerWelcome
-
- org.springdoc.webmvc.ui.SwaggerWelcomeCommon
-
- org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc
-
@Controller public class SwaggerWelcomeWebMvc extends SwaggerWelcomeCommon
The type Swagger welcome.- Author:
- bnasslahsen
-
-
Constructor Summary
Constructors Constructor Description SwaggerWelcomeWebMvc(org.springdoc.core.SwaggerUiConfigProperties swaggerUiConfig, org.springdoc.core.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.SwaggerUiConfigParameters swaggerUiConfigParameters, org.springdoc.core.providers.SpringWebProvider springWebProvider)
Instantiates a new Swagger welcome web mvc.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
buildApiDocUrl()
Build api doc url string.protected String
buildSwaggerConfigUrl()
Build swagger config url string.protected String
buildUrl(String contextPath, String docsUrl)
Build url string.protected String
buildUrlWithContextPath(String swaggerUiUrl)
protected void
calculateUiRootPath(StringBuilder... sbUrls)
Calculate ui root path.org.springframework.http.ResponseEntity<Void>
redirectToUi(javax.servlet.http.HttpServletRequest request)
Redirect to ui string.-
Methods inherited from class org.springdoc.webmvc.ui.SwaggerWelcomeCommon
calculateOauth2RedirectUrl, openapiJson
-
-
-
-
Constructor Detail
-
SwaggerWelcomeWebMvc
public SwaggerWelcomeWebMvc(org.springdoc.core.SwaggerUiConfigProperties swaggerUiConfig, org.springdoc.core.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.SwaggerUiConfigParameters swaggerUiConfigParameters, org.springdoc.core.providers.SpringWebProvider springWebProvider)
Instantiates a new Swagger welcome web mvc.- Parameters:
swaggerUiConfig
- the swagger ui configspringDocConfigProperties
- the spring doc config propertiesswaggerUiConfigParameters
- the swagger ui config parametersspringWebProvider
- the spring web provider
-
-
Method Detail
-
redirectToUi
@GetMapping("${springdoc.swagger-ui.path:#{T(org.springdoc.core.Constants).DEFAULT_SWAGGER_UI_PATH}}") public org.springframework.http.ResponseEntity<Void> redirectToUi(javax.servlet.http.HttpServletRequest request)
Redirect to ui string.- Overrides:
redirectToUi
in classSwaggerWelcomeCommon
- Parameters:
request
- the request- Returns:
- the string
-
calculateUiRootPath
protected void calculateUiRootPath(StringBuilder... sbUrls)
Calculate ui root path.- Specified by:
calculateUiRootPath
in classorg.springdoc.ui.AbstractSwaggerWelcome
- Parameters:
sbUrls
- the sb urls
-
buildUrl
protected String buildUrl(String contextPath, String docsUrl)
Build url string.- Overrides:
buildUrl
in classorg.springdoc.ui.AbstractSwaggerWelcome
- Parameters:
contextPath
- the context pathdocsUrl
- the docs url- Returns:
- the string
-
buildApiDocUrl
protected String buildApiDocUrl()
Build api doc url string.- Specified by:
buildApiDocUrl
in classorg.springdoc.ui.AbstractSwaggerWelcome
- Returns:
- the string
-
buildUrlWithContextPath
protected String buildUrlWithContextPath(String swaggerUiUrl)
- Specified by:
buildUrlWithContextPath
in classorg.springdoc.ui.AbstractSwaggerWelcome
-
buildSwaggerConfigUrl
protected String buildSwaggerConfigUrl()
Build swagger config url string.- Specified by:
buildSwaggerConfigUrl
in classorg.springdoc.ui.AbstractSwaggerWelcome
- Returns:
- the string
-
-