Class AbstractSwaggerIndexTransformer

java.lang.Object
org.springdoc.ui.AbstractSwaggerIndexTransformer

public class AbstractSwaggerIndexTransformer extends Object
The type Abstract swagger index transformer.
Author:
bnasslahsen
  • Field Details

    • 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 Details

    • AbstractSwaggerIndexTransformer

      public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider)
      Instantiates a new Abstract swagger index transformer.
      Parameters:
      swaggerUiConfig - the swagger ui config
      swaggerUiOAuthProperties - the swagger ui o auth properties
      swaggerUiConfigParameters - the swagger ui config parameters
      objectMapperProvider - 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

      protected String readFullyAsString(InputStream inputStream) throws IOException
      Read fully as 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
    • setConfiguredApiDocsUrl

      protected String setConfiguredApiDocsUrl(String html)
      Setting the url configured with swagger ui properties
      Parameters:
      html -
      Returns:
      modifed html
    • 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
      Add parameters string.
      Parameters:
      html - the html
      Returns:
      the string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • 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
    • addCSRFSessionStorage

      protected String addCSRFSessionStorage(String html)
      Add csrf string from Session storage.
      Parameters:
      html - the html
      Returns:
      the string
    • addSyntaxHighlight

      protected String addSyntaxHighlight(String html)
      Add syntax highlight string.
      Parameters:
      html - the html
      Returns:
      the string