Class GenericParameterService


  • public class GenericParameterService
    extends Object
    The type Generic parameter builder.
    Author:
    bnasslahsen, coutin
    • Constructor Detail

      • GenericParameterService

        public GenericParameterService​(PropertyResolverUtils propertyResolverUtils,
                                       Optional<DelegatingMethodParameterCustomizer> optionalDelegatingMethodParameterCustomizer,
                                       Optional<WebConversionServiceProvider> optionalWebConversionServiceProvider)
        Instantiates a new Generic parameter builder.
        Parameters:
        propertyResolverUtils - the property resolver utils
        optionalDelegatingMethodParameterCustomizer - the optional delegating method parameter customizer
        optionalWebConversionServiceProvider -
    • Method Detail

      • addFileType

        public static void addFileType​(Class<?>... classes)
        Add file type.
        Parameters:
        classes - the classes
      • isFile

        public static boolean isFile​(Class type)
        Is file boolean.
        Parameters:
        type - the type
        Returns:
        the boolean
      • mergeParameter

        public static io.swagger.v3.oas.models.parameters.Parameter mergeParameter​(List<io.swagger.v3.oas.models.parameters.Parameter> existingParamDoc,
                                                                                   io.swagger.v3.oas.models.parameters.Parameter paramCalcul)
        Merge parameter parameter.
        Parameters:
        existingParamDoc - the existing param doc
        paramCalcul - the param calcul
        Returns:
        the parameter
      • 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 jsonView,
                                                                                   Locale locale)
        Build parameter from doc parameter.
        Parameters:
        parameterDoc - the parameter doc
        components - the components
        jsonView - the json view
        locale - the locale
        Returns:
        the parameter
      • isFile

        public boolean isFile​(org.springframework.core.MethodParameter methodParameter)
        Is file boolean.
        Parameters:
        methodParameter - the method parameter
        Returns:
        the boolean
      • getDelegatingMethodParameterCustomizer

        public Optional<DelegatingMethodParameterCustomizer> getDelegatingMethodParameterCustomizer()
        Gets delegating method parameter customizer.
        Returns:
        the delegating method parameter customizer
      • getPropertyResolverUtils

        public PropertyResolverUtils getPropertyResolverUtils()
        Gets property resolver utils.
        Returns:
        the property resolver utils
      • getOptionalWebConversionServiceProvider

        public Optional<WebConversionServiceProvider> getOptionalWebConversionServiceProvider()
        Gets optional web conversion service provider.
        Returns:
        the optional web conversion service provider
      • resolveEmbeddedValuesAndExpressions

        public Object resolveEmbeddedValuesAndExpressions​(String value)
        Resolve the given annotation-specified value, potentially containing placeholders and expressions.