Class GenericParameterService

java.lang.Object
org.springdoc.core.service.GenericParameterService

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

    • GenericParameterService

      public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional<DelegatingMethodParameterCustomizer> optionalDelegatingMethodParameterCustomizer, Optional<WebConversionServiceProvider> optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider, Optional<JavadocProvider> javadocProviderOptional)
      Instantiates a new Generic parameter builder.
      Parameters:
      propertyResolverUtils - the property resolver utils
      optionalDelegatingMethodParameterCustomizer - the optional delegating method parameter customizer
      optionalWebConversionServiceProvider - the optional web conversion service provider
      objectMapperProvider - the object mapper provider
      javadocProviderOptional - the javadoc provider
  • Method Details

    • 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
    • mergeParameter

      public static void mergeParameter(io.swagger.v3.oas.models.parameters.Parameter paramCalcul, io.swagger.v3.oas.models.parameters.Parameter paramDoc)
      Merge parameter.
      Parameters:
      paramCalcul - the param calcul
      paramDoc - the param doc
    • 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.
      Parameters:
      value - the value
      Returns:
      the object
    • generateParameterBySchema

      public io.swagger.v3.oas.annotations.Parameter generateParameterBySchema(io.swagger.v3.oas.annotations.media.Schema schema)
      Generate parameter by schema
      Parameters:
      schema - the schema
      Returns:
      the io.swagger.v3.oas.annotations.Parameter
    • getJavadocProvider

      public JavadocProvider getJavadocProvider()
      Gets javadoc provider.
      Returns:
      the javadoc provider
    • isRequestBodyPresent

      public boolean isRequestBodyPresent(ParameterInfo parameterInfo)
      Is request body present boolean.
      Parameters:
      parameterInfo - the parameter info
      Returns:
      the boolean
    • isOpenapi31

      public boolean isOpenapi31()
      Is openapi 31 boolean.
      Returns:
      the boolean