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 |
buildParam(ParameterInfo parameterInfo,
io.swagger.v3.oas.models.Components components,
com.fasterxml.jackson.annotation.JsonView jsonView)
Build param parameter.
|
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,
String openApiVersion)
Build params parameter.
|
protected void |
customiseParameter(io.swagger.v3.oas.models.parameters.Parameter parameter,
ParameterInfo parameterInfo,
List<io.swagger.v3.oas.models.parameters.Parameter> operationParameters)
Customise parameter parameter.
|
static Collection<io.swagger.v3.oas.models.parameters.Parameter> |
getHeaders(MethodAttributes methodAttributes,
Map<ParameterId,io.swagger.v3.oas.models.parameters.Parameter> map)
Gets headers.
|
RequestBodyService |
getRequestBodyBuilder()
Gets request body builder.
|
boolean |
isDefaultFlatParamObject()
Is default flat param object boolean.
|
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 static Collection<io.swagger.v3.oas.models.parameters.Parameter> getHeaders(MethodAttributes methodAttributes, Map<ParameterId,io.swagger.v3.oas.models.parameters.Parameter> map)
methodAttributes - the method attributesmap - the mappublic 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 apiprotected void customiseParameter(io.swagger.v3.oas.models.parameters.Parameter parameter,
ParameterInfo parameterInfo,
List<io.swagger.v3.oas.models.parameters.Parameter> operationParameters)
parameter - the parameterparameterInfo - the parameter infooperationParameters - the operation parameterspublic 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, String openApiVersion)
parameterInfo - the parameter infocomponents - the componentsrequestMethod - the request methodjsonView - the json viewopenApiVersion - the open api versionpublic io.swagger.v3.oas.models.parameters.Parameter buildParam(ParameterInfo parameterInfo, io.swagger.v3.oas.models.Components components, com.fasterxml.jackson.annotation.JsonView jsonView)
parameterInfo - the parameter infocomponents - the componentsjsonView - 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()
public boolean isDefaultFlatParamObject()
Copyright © 2024. All rights reserved.