Class OpenApiWebfluxResource


  • @RestController
    public class OpenApiWebfluxResource
    extends OpenApiResource
    The type Open api resource.
    Author:
    bnasslahsen
    • Method Detail

      • openapiJson

        @GetMapping(value="${springdoc.api-docs.path:#{T(org.springdoc.core.Constants).DEFAULT_API_DOCS_URL}}",
                    produces="application/json")
        public reactor.core.publisher.Mono<String> openapiJson​(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest,
                                                               @Value("${springdoc.api-docs.path:#{T(org.springdoc.core.Constants).DEFAULT_API_DOCS_URL}}")
                                                               String apiDocsUrl,
                                                               Locale locale)
                                                        throws com.fasterxml.jackson.core.JsonProcessingException
        Openapi json mono.
        Overrides:
        openapiJson in class OpenApiResource
        Parameters:
        serverHttpRequest - the server http request
        apiDocsUrl - the api docs url
        locale - the locale
        Returns:
        the mono
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
      • openapiYaml

        @GetMapping(value="${springdoc.api-docs.path:#{T(org.springdoc.core.Constants).DEFAULT_API_DOCS_URL}}.yaml",
                    produces="application/vnd.oai.openapi")
        public reactor.core.publisher.Mono<String> openapiYaml​(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest,
                                                               @Value("${springdoc.api-docs.path:#{T(org.springdoc.core.Constants).DEFAULT_API_DOCS_URL}}.yaml")
                                                               String apiDocsUrl,
                                                               Locale locale)
                                                        throws com.fasterxml.jackson.core.JsonProcessingException
        Openapi yaml mono.
        Overrides:
        openapiYaml in class OpenApiResource
        Parameters:
        serverHttpRequest - the server http request
        apiDocsUrl - the api docs url
        locale - the locale
        Returns:
        the mono
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
      • getServerUrl

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