Package org.springdoc.ui
Class AbstractSwaggerIndexTransformer
- java.lang.Object
-
- org.springdoc.ui.AbstractSwaggerIndexTransformer
-
public class AbstractSwaggerIndexTransformer extends Object
The type Abstract swagger index transformer.- Author:
- bnasslahsen
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
The Object mapper.protected SwaggerUiConfigProperties
swaggerUiConfig
The Swagger ui config.protected SwaggerUiConfigParameters
swaggerUiConfigParameters
The Swagger ui config parameters.protected SwaggerUiOAuthProperties
swaggerUiOAuthProperties
The Swagger ui o auth properties.
-
Constructor Summary
Constructors Constructor Description AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Instantiates a new Abstract swagger index transformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
addCSRF(String html)
Add csrf string.protected String
addCSRFLocalStorage(String html)
Add csrf string.protected String
addInitOauth(String html)
Add init oauth string.protected String
addParameters(String html)
protected String
addSyntaxHighlight(String html)
Add syntax highlight string.protected String
defaultTransformations(InputStream inputStream)
Default transformations string.protected String
overwriteSwaggerDefaultUrl(String html)
Overwrite swagger default url string.protected String
readFullyAsString(InputStream inputStream)
Read fully as string string.
-
-
-
Field Detail
-
swaggerUiOAuthProperties
protected SwaggerUiOAuthProperties swaggerUiOAuthProperties
The Swagger ui o auth properties.
-
swaggerUiConfigParameters
protected SwaggerUiConfigParameters swaggerUiConfigParameters
The Swagger ui config parameters.
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
The Object mapper.
-
swaggerUiConfig
protected SwaggerUiConfigProperties swaggerUiConfig
The Swagger ui config.
-
-
Constructor Detail
-
AbstractSwaggerIndexTransformer
public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Instantiates a new Abstract swagger index transformer.- Parameters:
swaggerUiConfig
- the swagger ui configswaggerUiOAuthProperties
- the swagger ui o auth propertiesswaggerUiConfigParameters
- the swagger ui config parametersobjectMapper
- the object mapper
-
-
Method Detail
-
addInitOauth
protected String addInitOauth(String html) throws com.fasterxml.jackson.core.JsonProcessingException
Add init oauth string.- Parameters:
html
- the html- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
readFullyAsString
protected String readFullyAsString(InputStream inputStream) throws IOException
Read fully as string string.- Parameters:
inputStream
- the input stream- Returns:
- the string
- Throws:
IOException
- the io exception
-
overwriteSwaggerDefaultUrl
protected String overwriteSwaggerDefaultUrl(String html)
Overwrite swagger default url string.- Parameters:
html
- the html- Returns:
- the string
-
defaultTransformations
protected String defaultTransformations(InputStream inputStream) throws IOException
Default transformations string.- Parameters:
inputStream
- the input stream- Returns:
- the string
- Throws:
IOException
- the io exception
-
addParameters
protected String addParameters(String html) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
addCSRF
protected String addCSRF(String html)
Add csrf string.- Parameters:
html
- the html- Returns:
- the string
-
addCSRFLocalStorage
protected String addCSRFLocalStorage(String html)
Add csrf string.- Parameters:
html
- the html- Returns:
- the string
-
-