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
ConstructorsConstructorDescriptionDataRestRequestService(SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer, GenericParameterService parameterBuilder, RequestBodyService requestBodyService, AbstractRequestService requestBuilder, SpringDocDataRestUtils springDocDataRestUtils) Instantiates a new Data rest request builder. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCommonParameters(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.ParameterbuildParameterFromDoc(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.voidbuildParameters(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(SpringDocParameterNameDiscoverer 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
-