Package org.springdoc.ui
Class AbstractSwaggerIndexTransformer
java.lang.Object
org.springdoc.ui.AbstractSwaggerIndexTransformer
The type Abstract swagger index transformer.
- Author:
- bnasslahsen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.ObjectMapperThe Object mapper.protected SwaggerUiConfigPropertiesThe Swagger ui config.protected SwaggerUiConfigParametersThe Swagger ui config parameters.protected SwaggerUiOAuthPropertiesThe Swagger ui o auth properties. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider) Instantiates a new Abstract swagger index transformer. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringAdd csrf string.protected StringaddCSRFLocalStorage(String html) Add csrf string.protected StringaddCSRFSessionStorage(String html) Add csrf string from Session storage.protected StringaddInitOauth(String html) Add init oauth string.protected StringaddParameters(String html) Add parameters string.protected StringaddSyntaxHighlight(String html) Add syntax highlight string.protected StringdefaultTransformations(InputStream inputStream) Default transformations string.protected StringOverwrite swagger default url string.protected StringreadFullyAsString(InputStream inputStream) Read fully as string.protected StringSetting 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
-