public abstract class OpenApiResource extends AbstractOpenApiResource
groupName, openAPIService, springDocConfigProperties, springDocCustomizers, springDocProviders| Constructor and Description |
|---|
OpenApiResource(org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory,
AbstractRequestService requestBuilder,
GenericResponseService responseBuilder,
OperationService operationParser,
SpringDocConfigProperties springDocConfigProperties,
SpringDocProviders springDocProviders,
SpringDocCustomizers springDocCustomizers)
Instantiates a new Open api resource.
|
OpenApiResource(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 resource.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected void |
calculateServerUrl(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
Calculate server url.
|
protected void |
getPaths(Map<String,Object> restControllers,
Locale locale,
io.swagger.v3.oas.models.OpenAPI openAPI) |
protected abstract String |
getServerUrl(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl)
Gets server url.
|
byte[] |
openapiJson(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
Openapi json string.
|
byte[] |
openapiYaml(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
Openapi yaml string.
|
addHiddenRestControllers, addHiddenRestControllers, addRestControllers, calculatePath, calculatePath, calculatePath, calculatePath, containsResponseBody, customizeOperation, customizeRouterOperation, decode, getActuatorURI, getDefaultAllowedHttpMethods, getOpenApi, getRouterFunctionPaths, initOpenAPIBuilder, isActuatorRestController, isAdditionalRestController, isConditionToMatch, isFilterCondition, isHiddenRestControllers, isMethodToFilter, isPackageToScan, isPathToMatch, isRestController, mergeRouters, setModelAndViewClass, writeJsonValue, writeYamlValuepublic OpenApiResource(String groupName, org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers)
groupName - the group nameopenAPIBuilderObjectFactory - the open api builder object factoryrequestBuilder - the request builderresponseBuilder - the response builderoperationParser - the operation parserspringDocConfigProperties - the spring doc config propertiesspringDocProviders - the spring doc providersspringDocCustomizers - the spring doc customizerspublic OpenApiResource(org.springframework.beans.factory.ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers)
openAPIBuilderObjectFactory - the open api builder object factoryrequestBuilder - the request builderresponseBuilder - the response builderoperationParser - the operation parserspringDocConfigProperties - the spring doc config propertiesspringDocProviders - the spring doc providersspringDocCustomizers - the spring doc customizerspublic byte[] openapiJson(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
throws com.fasterxml.jackson.core.JsonProcessingException
request - the requestapiDocsUrl - the api docs urllocale - the localecom.fasterxml.jackson.core.JsonProcessingException - the json processing exceptionpublic byte[] openapiYaml(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
throws com.fasterxml.jackson.core.JsonProcessingException
request - the requestapiDocsUrl - the api docs urllocale - the localecom.fasterxml.jackson.core.JsonProcessingException - the json processing exceptionprotected void getPaths(Map<String,Object> restControllers, Locale locale, io.swagger.v3.oas.models.OpenAPI openAPI)
getPaths in class AbstractOpenApiResourceprotected 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)
restControllers - the rest controllersmap - the maplocale - the localeopenAPI - the open apiprotected void calculateServerUrl(javax.servlet.http.HttpServletRequest request,
String apiDocsUrl,
Locale locale)
request - the requestapiDocsUrl - the api docs urllocale - the localeCopyright © 2024. All rights reserved.