Class AbstractSwaggerIndexTransformer


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

      • swaggerUiOAuthProperties

        protected SwaggerUiOAuthProperties swaggerUiOAuthProperties
        The Swagger ui o auth properties.
      • objectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
        The Object mapper.
    • Constructor Detail

      • AbstractSwaggerIndexTransformer

        public AbstractSwaggerIndexTransformer​(SwaggerUiConfigProperties swaggerUiConfig,
                                               SwaggerUiOAuthProperties swaggerUiOAuthProperties,
                                               com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Instantiates a new Abstract swagger index transformer.
        Parameters:
        swaggerUiConfig - the swagger ui config
        swaggerUiOAuthProperties - the swagger ui o auth properties
        objectMapper - 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
      • hasDefaultTransformations

        protected boolean hasDefaultTransformations()
        Has default transformations boolean.
        Returns:
        the boolean
      • defaultTransformations

        protected String defaultTransformations​(InputStream inputStream)
                                         throws IOException
        Default transformations string.
        Parameters:
        inputStream - the input stream
        Returns:
        the string
        Throws:
        IOException - the io 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
      • addSyntaxHighlight

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