类 OpenApiHandler
java.lang.Object
org.springdoc.core.service.OpenAPIService
top.continew.starter.apidoc.handler.OpenApiHandler
- 所有已实现的接口:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class OpenApiHandler
extends org.springdoc.core.service.OpenAPIService
自定义 OpenApi 处理器(对源码功能进行修改,增强使用)
- 从以下版本开始:
- 2.4.0
- 作者:
- echo
-
构造器概要
构造器构造器说明OpenApiHandler(Optional<io.swagger.v3.oas.models.OpenAPI> openAPI, org.springdoc.core.service.SecurityService securityParser, org.springdoc.core.properties.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.utils.PropertyResolverUtils propertyResolverUtils, Optional<List<org.springdoc.core.customizers.OpenApiBuilderCustomizer>> openApiBuilderCustomizers, Optional<List<org.springdoc.core.customizers.ServerBaseUrlCustomizer>> serverBaseUrlCustomizers, Optional<org.springdoc.core.providers.JavadocProvider> javadocProvider) Instantiates a new Open api builder. -
方法概要
修饰符和类型方法说明io.swagger.v3.oas.models.OperationbuildTags(org.springframework.web.method.HandlerMethod handlerMethod, io.swagger.v3.oas.models.Operation operation, io.swagger.v3.oas.models.OpenAPI openAPI, Locale locale) static <E,T> Set<T> toSet(Collection<E> collection, Function<E, T> function) 将collection转化为Set集合,但是两者的泛型不同
Collection<E> ------> Set<T>从类继承的方法 org.springdoc.core.service.OpenAPIService
addMappings, addTag, build, buildTagsFromClass, getCachedOpenAPI, getContext, getControllerAdviceMap, getMappingsMap, getSecurityParser, isAutoTagClasses, resolveProperties, setApplicationContext, setCachedOpenAPI, setServerBaseUrl, setServersPresent, splitCamelCase, updateServers
-
构造器详细资料
-
OpenApiHandler
public OpenApiHandler(Optional<io.swagger.v3.oas.models.OpenAPI> openAPI, org.springdoc.core.service.SecurityService securityParser, org.springdoc.core.properties.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.utils.PropertyResolverUtils propertyResolverUtils, Optional<List<org.springdoc.core.customizers.OpenApiBuilderCustomizer>> openApiBuilderCustomizers, Optional<List<org.springdoc.core.customizers.ServerBaseUrlCustomizer>> serverBaseUrlCustomizers, Optional<org.springdoc.core.providers.JavadocProvider> javadocProvider) Instantiates a new Open api builder.- 参数:
openAPI- the open apisecurityParser- the security parserspringDocConfigProperties- the spring doc config propertiespropertyResolverUtils- the property resolver utilsopenApiBuilderCustomizers- the open api builder customisersserverBaseUrlCustomizers- the server base url customizersjavadocProvider- the javadoc provider
-
-
方法详细资料
-
buildTags
public io.swagger.v3.oas.models.Operation buildTags(org.springframework.web.method.HandlerMethod handlerMethod, io.swagger.v3.oas.models.Operation operation, io.swagger.v3.oas.models.OpenAPI openAPI, Locale locale) - 覆盖:
buildTags在类中org.springdoc.core.service.OpenAPIService
-
toSet
将collection转化为Set集合,但是两者的泛型不同
Collection<E> ------> Set<T>- 类型参数:
E- collection中的泛型T- Set中的泛型- 参数:
collection- 需要转化的集合function- collection中的泛型转化为set泛型的lambda表达式- 返回:
- 转化后的Set
-