Class OpenApiResource

    • Method Detail

      • openapiJson

        public String openapiJson​(javax.servlet.http.HttpServletRequest request,
                                  String apiDocsUrl,
                                  Locale locale)
                           throws com.fasterxml.jackson.core.JsonProcessingException
        Openapi json string.
        Parameters:
        request - the request
        apiDocsUrl - the api docs url
        locale - the locale
        Returns:
        the string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
      • openapiYaml

        public String openapiYaml​(javax.servlet.http.HttpServletRequest request,
                                  String apiDocsUrl,
                                  Locale locale)
                           throws com.fasterxml.jackson.core.JsonProcessingException
        Openapi yaml string.
        Parameters:
        request - the request
        apiDocsUrl - the api docs url
        locale - the locale
        Returns:
        the string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
      • calculatePath

        protected void calculatePath​(Map<String,​Object> restControllers,
                                     Map<org.springframework.web.servlet.mvc.method.RequestMappingInfo,​org.springframework.web.method.HandlerMethod> map,
                                     Locale locale,
                                     io.swagger.v3.oas.models.OpenAPI openAPI)
        Calculate path.
        Parameters:
        restControllers - the rest controllers
        map - the map
        locale - the locale
        openAPI - the open api
      • calculateServerUrl

        protected void calculateServerUrl​(javax.servlet.http.HttpServletRequest request,
                                          String apiDocsUrl,
                                          Locale locale)
        Calculate server url.
        Parameters:
        request - the request
        apiDocsUrl - the api docs url
        locale - the locale
      • getServerUrl

        protected abstract String getServerUrl​(javax.servlet.http.HttpServletRequest request,
                                               String apiDocsUrl)
        Gets server url.
        Parameters:
        request - the request
        apiDocsUrl - the api docs url
        Returns:
        the server url