Package org.springdoc.core.data
Class DataRestRequestService
java.lang.Object
org.springdoc.core.data.DataRestRequestService
The type Data rest request builder.
- Author:
- bnasslahsen
-
Constructor Summary
ConstructorDescriptionDataRestRequestService
(org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer, GenericParameterService parameterBuilder, RequestBodyService requestBodyService, AbstractRequestService requestBuilder, SpringDocDataRestUtils springDocDataRestUtils) Instantiates a new Data rest request builder. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildCommonParameters
(io.swagger.v3.oas.models.OpenAPI openAPI, org.springframework.web.bind.annotation.RequestMethod requestMethod, MethodAttributes methodAttributes, io.swagger.v3.oas.models.Operation operation, String[] pNames, org.springframework.core.MethodParameter[] parameters, DataRestRepository dataRestRepository) Build common parameters.io.swagger.v3.oas.models.parameters.Parameter
buildParameterFromDoc
(io.swagger.v3.oas.annotations.Parameter parameterDoc, io.swagger.v3.oas.models.Components components, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation, Locale locale) Build parameter from doc parameter.void
buildParameters
(io.swagger.v3.oas.models.OpenAPI openAPI, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.bind.annotation.RequestMethod requestMethod, MethodAttributes methodAttributes, io.swagger.v3.oas.models.Operation operation, org.springframework.data.rest.core.mapping.ResourceMetadata resourceMetadata, DataRestRepository dataRestRepository) Build parameters.
-
Constructor Details
-
DataRestRequestService
public DataRestRequestService(org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer, GenericParameterService parameterBuilder, RequestBodyService requestBodyService, AbstractRequestService requestBuilder, SpringDocDataRestUtils springDocDataRestUtils) Instantiates a new Data rest request builder.- Parameters:
localSpringDocParameterNameDiscoverer
- the local spring doc parameter name discovererparameterBuilder
- the parameter builderrequestBodyService
- the request body builderrequestBuilder
- the request builderspringDocDataRestUtils
- the spring doc data rest utils
-
-
Method Details
-
buildParameters
public void buildParameters(io.swagger.v3.oas.models.OpenAPI openAPI, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.bind.annotation.RequestMethod requestMethod, MethodAttributes methodAttributes, io.swagger.v3.oas.models.Operation operation, org.springframework.data.rest.core.mapping.ResourceMetadata resourceMetadata, DataRestRepository dataRestRepository) Build parameters.- Parameters:
openAPI
- the open apihandlerMethod
- the handler methodrequestMethod
- the request methodmethodAttributes
- the method attributesoperation
- the operationresourceMetadata
- the resource metadatadataRestRepository
- the data rest repository
-
buildCommonParameters
public void buildCommonParameters(io.swagger.v3.oas.models.OpenAPI openAPI, org.springframework.web.bind.annotation.RequestMethod requestMethod, MethodAttributes methodAttributes, io.swagger.v3.oas.models.Operation operation, String[] pNames, org.springframework.core.MethodParameter[] parameters, DataRestRepository dataRestRepository) Build common parameters.- Parameters:
openAPI
- the open apirequestMethod
- the request methodmethodAttributes
- the method attributesoperation
- the operationpNames
- the p namesparameters
- the parametersdataRestRepository
- the data rest repository
-
buildParameterFromDoc
public io.swagger.v3.oas.models.parameters.Parameter buildParameterFromDoc(io.swagger.v3.oas.annotations.Parameter parameterDoc, io.swagger.v3.oas.models.Components components, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation, Locale locale) Build parameter from doc parameter.- Parameters:
parameterDoc
- the parameter doccomponents
- the componentsjsonViewAnnotation
- the json view annotationlocale
- the locale- Returns:
- the parameter
-