Package org.springdoc.ui
Class AbstractSwaggerIndexTransformer
java.lang.Object
org.springdoc.ui.AbstractSwaggerIndexTransformer
The type Abstract swagger index transformer.
- Author:
- bnasslahsen
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.ObjectMapper
The Object mapper.protected SwaggerUiConfigProperties
The Swagger ui config.protected SwaggerUiConfigParameters
The Swagger ui config parameters.protected SwaggerUiOAuthProperties
The Swagger ui o auth properties. -
Constructor Summary
ConstructorDescriptionAbstractSwaggerIndexTransformer
(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider) Instantiates a new Abstract swagger index transformer. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Add csrf string.protected String
addCSRFLocalStorage
(String html) Add csrf string.protected String
addCSRFSessionStorage
(String html) Add csrf string from Session storage.protected String
addInitOauth
(String html) Add init oauth string.protected String
addParameters
(String html) Add parameters string.protected String
addSyntaxHighlight
(String html) Add syntax highlight string.protected String
defaultTransformations
(InputStream inputStream) Default transformations string.protected String
Overwrite swagger default url string.protected String
readFullyAsString
(InputStream inputStream) Read fully as string.protected String
Setting the url configured with swagger ui properties
-
Field Details
-
swaggerUiOAuthProperties
The Swagger ui o auth properties. -
swaggerUiConfigParameters
The Swagger ui config parameters. -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapperThe Object mapper. -
swaggerUiConfig
The Swagger ui config.
-
-
Constructor Details
-
AbstractSwaggerIndexTransformer
public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider) Instantiates a new Abstract swagger index transformer.- Parameters:
swaggerUiConfig
- the swagger ui configswaggerUiOAuthProperties
- the swagger ui o auth propertiesswaggerUiConfigParameters
- the swagger ui config parametersobjectMapperProvider
- the object mapper provider
-
-
Method Details
-
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
Read fully as string.- Parameters:
inputStream
- the input stream- Returns:
- the string
- Throws:
IOException
- the io exception
-
overwriteSwaggerDefaultUrl
Overwrite swagger default url string.- Parameters:
html
- the html- Returns:
- the string
-
setConfiguredApiDocsUrl
Setting the url configured with swagger ui properties- Parameters:
html
-- Returns:
- modifed html
-
defaultTransformations
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 Add parameters string.- Parameters:
html
- the html- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
addCSRF
Add csrf string.- Parameters:
html
- the html- Returns:
- the string
-
addCSRFLocalStorage
Add csrf string.- Parameters:
html
- the html- Returns:
- the string
-
addCSRFSessionStorage
Add csrf string from Session storage.- Parameters:
html
- the html- Returns:
- the string
-
addSyntaxHighlight
Add syntax highlight string.- Parameters:
html
- the html- Returns:
- the string
-