public abstract class AbstractRequestService extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractRequestService(GenericParameterService parameterBuilder,
RequestBodyService requestBodyService,
OperationService operationService,
Optional<List<ParameterCustomizer>> parameterCustomizers,
org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer)
Instantiates a new Abstract request builder.
|
Modifier and Type | Method and Description |
---|---|
static void |
addRequestWrapperToIgnore(Class<?>... classes)
Add request wrapper to ignore.
|
void |
applyBeanValidatorAnnotations(io.swagger.v3.oas.models.parameters.Parameter parameter,
List<Annotation> annotations)
Apply bean validator annotations.
|
void |
applyBeanValidatorAnnotations(io.swagger.v3.oas.models.parameters.RequestBody requestBody,
List<Annotation> annotations,
boolean isOptional)
Apply bean validator annotations.
|
io.swagger.v3.oas.models.Operation |
build(org.springframework.web.method.HandlerMethod handlerMethod,
org.springframework.web.bind.annotation.RequestMethod requestMethod,
io.swagger.v3.oas.models.Operation operation,
MethodAttributes methodAttributes,
io.swagger.v3.oas.models.OpenAPI openAPI)
Build operation.
|
io.swagger.v3.oas.models.parameters.Parameter |
buildParams(ParameterInfo parameterInfo,
io.swagger.v3.oas.models.Components components,
org.springframework.web.bind.annotation.RequestMethod requestMethod,
com.fasterxml.jackson.annotation.JsonView jsonView)
Build params parameter.
|
protected io.swagger.v3.oas.models.parameters.Parameter |
customiseParameter(io.swagger.v3.oas.models.parameters.Parameter parameter,
ParameterInfo parameterInfo)
Customise parameter parameter.
|
static Collection<io.swagger.v3.oas.models.parameters.Parameter> |
getHeaders(MethodAttributes methodAttributes,
Map<String,io.swagger.v3.oas.models.parameters.Parameter> map)
Gets headers.
|
RequestBodyService |
getRequestBodyBuilder()
Gets request body builder.
|
boolean |
isParamToIgnore(org.springframework.core.MethodParameter parameter)
Is param to ignore boolean.
|
static boolean |
isRequestTypeToIgnore(Class<?> rawClass)
Is request type to ignore boolean.
|
boolean |
isValidParameter(io.swagger.v3.oas.models.parameters.Parameter parameter)
Is valid parameter boolean.
|
static void |
removeRequestWrapperToIgnore(Class<?>... classes)
Remove request wrapper to ignore.
|
protected AbstractRequestService(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, OperationService operationService, Optional<List<ParameterCustomizer>> parameterCustomizers, org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer)
parameterBuilder
- the parameter builderrequestBodyService
- the request body builderoperationService
- the operation builderparameterCustomizers
- the parameter customizerslocalSpringDocParameterNameDiscoverer
- the local spring doc parameter name discovererpublic static void addRequestWrapperToIgnore(Class<?>... classes)
classes
- the classespublic static void removeRequestWrapperToIgnore(Class<?>... classes)
classes
- the classespublic static boolean isRequestTypeToIgnore(Class<?> rawClass)
rawClass
- the raw classpublic io.swagger.v3.oas.models.Operation build(org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.bind.annotation.RequestMethod requestMethod, io.swagger.v3.oas.models.Operation operation, MethodAttributes methodAttributes, io.swagger.v3.oas.models.OpenAPI openAPI)
handlerMethod
- the handler methodrequestMethod
- the request methodoperation
- the operationmethodAttributes
- the method attributesopenAPI
- the open apipublic static Collection<io.swagger.v3.oas.models.parameters.Parameter> getHeaders(MethodAttributes methodAttributes, Map<String,io.swagger.v3.oas.models.parameters.Parameter> map)
methodAttributes
- the method attributesmap
- the mapprotected io.swagger.v3.oas.models.parameters.Parameter customiseParameter(io.swagger.v3.oas.models.parameters.Parameter parameter, ParameterInfo parameterInfo)
parameter
- the parameterparameterInfo
- the parameter infopublic boolean isParamToIgnore(org.springframework.core.MethodParameter parameter)
parameter
- the parameterpublic boolean isValidParameter(io.swagger.v3.oas.models.parameters.Parameter parameter)
parameter
- the parameterpublic io.swagger.v3.oas.models.parameters.Parameter buildParams(ParameterInfo parameterInfo, io.swagger.v3.oas.models.Components components, org.springframework.web.bind.annotation.RequestMethod requestMethod, com.fasterxml.jackson.annotation.JsonView jsonView)
parameterInfo
- the parameter infocomponents
- the componentsrequestMethod
- the request methodjsonView
- the json viewpublic void applyBeanValidatorAnnotations(io.swagger.v3.oas.models.parameters.Parameter parameter, List<Annotation> annotations)
parameter
- the parameterannotations
- the annotationspublic void applyBeanValidatorAnnotations(io.swagger.v3.oas.models.parameters.RequestBody requestBody, List<Annotation> annotations, boolean isOptional)
requestBody
- the request bodyannotations
- the annotationsisOptional
- the is optionalpublic RequestBodyService getRequestBodyBuilder()
Copyright © 2020. All rights reserved.