Class OpenApiActuatorResource

java.lang.Object
io.swagger.v3.core.filter.SpecFilter

@RestControllerEndpoint(id="openapi") public class OpenApiActuatorResource extends OpenApiResource
The type Open api actuator resource.
Author:
bnasslashen
  • Constructor Details

    • OpenApiActuatorResource

      public OpenApiActuatorResource(org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers)
      Instantiates a new Open api actuator resource.
      Parameters:
      openAPIBuilderObjectFactory - the open api builder object factory
      requestBuilder - the request builder
      responseBuilder - the response builder
      operationParser - the operation parser
      springDocConfigProperties - the spring doc config properties
      springDocProviders - the spring doc providers
      springDocCustomizers - the spring doc customizers
    • OpenApiActuatorResource

      public OpenApiActuatorResource(String groupName, org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers)
      Instantiates a new Open api actuator resource.
      Parameters:
      groupName - the group name
      openAPIBuilderObjectFactory - the open api builder object factory
      requestBuilder - the request builder
      responseBuilder - the response builder
      operationParser - the operation parser
      springDocConfigProperties - the spring doc config properties
      springDocProviders - the spring doc providers
      springDocCustomizers - the spring doc customizers
  • Method Details

    • openapiJson

      @GetMapping(value="/", produces="application/json") public byte[] openapiJson(jakarta.servlet.http.HttpServletRequest request, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
      Openapi json string.
      Parameters:
      request - the request
      locale - the locale
      Returns:
      the string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • openapiYaml

      @GetMapping(value="/yaml", produces="application/vnd.oai.openapi") public byte[] openapiYaml(jakarta.servlet.http.HttpServletRequest request, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
      Openapi yaml string.
      Parameters:
      request - the request
      locale - the locale
      Returns:
      the string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • getServerUrl

      protected String getServerUrl(jakarta.servlet.http.HttpServletRequest request, String apiDocsUrl)
      Description copied from class: OpenApiResource
      Gets server url.
      Specified by:
      getServerUrl in class OpenApiResource
      Parameters:
      request - the request
      apiDocsUrl - the api docs url
      Returns:
      the server url