Class OpenApiActuatorResource

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

@RestControllerEndpoint(id="openapi") @ConditionalOnProperty(name="springdoc.enable-default-api-docs", havingValue="true", matchIfMissing=true) public class OpenApiActuatorResource extends OpenApiResource
The type Open api actuator resource.
Author:
bnasslashen
  • Constructor Details

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

    • openapiJson

      @GetMapping(value="/", produces="application/json") public reactor.core.publisher.Mono<byte[]> openapiJson(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
      Openapi json mono.
      Parameters:
      serverHttpRequest - the server http request
      locale - the locale
      Returns:
      the mono
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • openapiYaml

      @GetMapping(value="/yaml", produces="application/vnd.oai.openapi") public reactor.core.publisher.Mono<byte[]> openapiYaml(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
      Openapi yaml mono.
      Parameters:
      serverHttpRequest - the server http request
      locale - the locale
      Returns:
      the mono
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • calculateServerUrl

      protected String calculateServerUrl(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
      Description copied from class: OpenApiResource
      Calculate server url.
      Overrides:
      calculateServerUrl in class OpenApiResource
      Parameters:
      serverHttpRequest - the server http request
      apiDocsUrl - the api docs url
      locale - the locale
    • getServerUrl

      protected String getServerUrl(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl)
      Description copied from class: OpenApiResource
      Gets server url.
      Specified by:
      getServerUrl in class OpenApiResource
      Parameters:
      serverHttpRequest - the server http request
      apiDocsUrl - the api docs url
      Returns:
      the server url