Package org.springdoc.webflux.api
Class OpenApiResource
- java.lang.Object
-
- io.swagger.v3.core.filter.SpecFilter
-
- org.springdoc.api.AbstractOpenApiResource
-
- org.springdoc.webflux.api.OpenApiResource
-
- Direct Known Subclasses:
OpenApiActuatorResource
,OpenApiWebfluxResource
public abstract class OpenApiResource extends AbstractOpenApiResource
The type Open api resource.- Author:
- bnasslahsen, Azige
-
-
Field Summary
-
Fields inherited from class org.springdoc.api.AbstractOpenApiResource
groupName, openAPIService, springDocConfigProperties, springDocProviders
-
-
Constructor Summary
Constructors Constructor Description OpenApiResource(String groupName, org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, Optional<List<OperationCustomizer>> operationCustomizers, Optional<List<OpenApiCustomiser>> openApiCustomisers, Optional<List<OpenApiMethodFilter>> methodFilters, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders)
Instantiates a new Open api resource.OpenApiResource(org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, Optional<List<OperationCustomizer>> operationCustomizers, Optional<List<OpenApiCustomiser>> openApiCustomisers, Optional<List<OpenApiMethodFilter>> methodFilters, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders)
Instantiates a new Open api resource.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
calculatePath(Map<String,Object> restControllers, Map<org.springframework.web.reactive.result.method.RequestMappingInfo,org.springframework.web.method.HandlerMethod> map, Locale locale)
Calculate path.protected void
calculateServerUrl(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
Calculate server url.protected void
getPaths(Map<String,Object> restControllers, Locale locale)
Gets paths.protected abstract String
getServerUrl(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl)
Gets server url.protected void
getWebFluxRouterFunctionPaths(Locale locale)
Gets web flux router function paths.protected reactor.core.publisher.Mono<String>
openapiJson(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
Openapi json mono.protected reactor.core.publisher.Mono<String>
openapiYaml(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
Openapi yaml mono.-
Methods inherited from class org.springdoc.api.AbstractOpenApiResource
addHiddenRestControllers, addHiddenRestControllers, addRestControllers, calculatePath, calculatePath, calculatePath, calculatePath, containsResponseBody, customiseOperation, decode, getActuatorURI, getDefaultAllowedHttpMethods, getOpenApi, getRouterFunctionPaths, initOpenAPIBuilder, isActuatorRestController, isAdditionalRestController, isConditionToMatch, isFilterCondition, isHiddenRestControllers, isMethodToFilter, isPackageToScan, isPathToMatch, isRestController, mergeRouters, writeJsonValue, writeYamlValue
-
-
-
-
Constructor Detail
-
OpenApiResource
public OpenApiResource(String groupName, org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, Optional<List<OperationCustomizer>> operationCustomizers, Optional<List<OpenApiCustomiser>> openApiCustomisers, Optional<List<OpenApiMethodFilter>> methodFilters, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders)
Instantiates a new Open api resource.- Parameters:
groupName
- the group nameopenAPIBuilderObjectFactory
- the open api builder object factoryrequestBuilder
- the request builderresponseBuilder
- the response builderoperationParser
- the operation parseroperationCustomizers
- the operation customizersopenApiCustomisers
- the open api customisersmethodFilters
- the method filtersspringDocConfigProperties
- the spring doc config propertiesspringDocProviders
- the spring doc providers
-
OpenApiResource
public OpenApiResource(org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, Optional<List<OperationCustomizer>> operationCustomizers, Optional<List<OpenApiCustomiser>> openApiCustomisers, Optional<List<OpenApiMethodFilter>> methodFilters, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders)
Instantiates a new Open api resource.- Parameters:
openAPIBuilderObjectFactory
- the open api builder object factoryrequestBuilder
- the request builderresponseBuilder
- the response builderoperationParser
- the operation parseroperationCustomizers
- the operation customizersopenApiCustomisers
- the open api customisersmethodFilters
- the method filtersspringDocConfigProperties
- the spring doc config propertiesspringDocProviders
- the spring doc providers
-
-
Method Detail
-
openapiJson
protected reactor.core.publisher.Mono<String> openapiJson(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
Openapi json mono.- Parameters:
serverHttpRequest
- the server http requestapiDocsUrl
- the api docs urllocale
- the locale- Returns:
- the mono
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
openapiYaml
protected reactor.core.publisher.Mono<String> openapiYaml(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
Openapi yaml mono.- Parameters:
serverHttpRequest
- the server http requestapiDocsUrl
- the api docs urllocale
- the locale- Returns:
- the mono
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
getPaths
protected void getPaths(Map<String,Object> restControllers, Locale locale)
Gets paths.- Specified by:
getPaths
in classAbstractOpenApiResource
- Parameters:
restControllers
- the rest controllerslocale
- the locale
-
calculatePath
protected void calculatePath(Map<String,Object> restControllers, Map<org.springframework.web.reactive.result.method.RequestMappingInfo,org.springframework.web.method.HandlerMethod> map, Locale locale)
Calculate path.- Parameters:
restControllers
- the rest controllersmap
- the maplocale
- the locale
-
getWebFluxRouterFunctionPaths
protected void getWebFluxRouterFunctionPaths(Locale locale)
Gets web flux router function paths.- Parameters:
locale
- the locale
-
calculateServerUrl
protected void calculateServerUrl(org.springframework.http.server.reactive.ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
Calculate server url.- Parameters:
serverHttpRequest
- the server http requestapiDocsUrl
- the api docs urllocale
- the locale
-
-