Class DataRestRequestService


  • public class DataRestRequestService
    extends Object
    The type Data rest request builder.
    Author:
    bnasslahsen
    • Constructor Summary

      Constructors 
      Constructor Description
      DataRestRequestService​(org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer, org.springdoc.core.GenericParameterService parameterBuilder, org.springdoc.core.RequestBodyService requestBodyService, org.springdoc.core.AbstractRequestService requestBuilder, SpringDocDataRestUtils springDocDataRestUtils)
      Instantiates a new Data rest request builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void buildCommonParameters​(io.swagger.v3.oas.models.OpenAPI openAPI, org.springframework.web.bind.annotation.RequestMethod requestMethod, org.springdoc.core.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, org.springdoc.core.MethodAttributes methodAttributes, io.swagger.v3.oas.models.Operation operation, org.springframework.data.rest.core.mapping.ResourceMetadata resourceMetadata, DataRestRepository dataRestRepository)
      Build parameters.
    • Constructor Detail

      • DataRestRequestService

        public DataRestRequestService​(org.springframework.core.LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer,
                                      org.springdoc.core.GenericParameterService parameterBuilder,
                                      org.springdoc.core.RequestBodyService requestBodyService,
                                      org.springdoc.core.AbstractRequestService requestBuilder,
                                      SpringDocDataRestUtils springDocDataRestUtils)
        Instantiates a new Data rest request builder.
        Parameters:
        localSpringDocParameterNameDiscoverer - the local spring doc parameter name discoverer
        parameterBuilder - the parameter builder
        requestBodyService - the request body builder
        requestBuilder - the request builder
        springDocDataRestUtils - the spring doc data rest utils
    • Method Detail

      • buildParameters

        public void buildParameters​(io.swagger.v3.oas.models.OpenAPI openAPI,
                                    org.springframework.web.method.HandlerMethod handlerMethod,
                                    org.springframework.web.bind.annotation.RequestMethod requestMethod,
                                    org.springdoc.core.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 api
        handlerMethod - the handler method
        requestMethod - the request method
        methodAttributes - the method attributes
        operation - the operation
        resourceMetadata - the resource metadata
        dataRestRepository - the data rest repository
      • buildCommonParameters

        public void buildCommonParameters​(io.swagger.v3.oas.models.OpenAPI openAPI,
                                          org.springframework.web.bind.annotation.RequestMethod requestMethod,
                                          org.springdoc.core.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 api
        requestMethod - the request method
        methodAttributes - the method attributes
        operation - the operation
        pNames - the p names
        parameters - the parameters
        dataRestRepository - 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 doc
        components - the components
        jsonViewAnnotation - the json view annotation
        locale - the locale
        Returns:
        the parameter