Package org.springdoc.core.service
Class GenericParameterService
java.lang.Object
org.springdoc.core.service.GenericParameterService
The type Generic parameter builder.
- Author:
- bnasslahsen, coutin
-
Constructor Summary
ConstructorsConstructorDescriptionGenericParameterService
(PropertyResolverUtils propertyResolverUtils, Optional<DelegatingMethodParameterCustomizer> optionalDelegatingMethodParameterCustomizer, Optional<WebConversionServiceProvider> optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider) Instantiates a new Generic parameter builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFileType
(Class<?>... classes) Add file type.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.io.swagger.v3.oas.annotations.Parameter
generateParameterBySchema
(io.swagger.v3.oas.annotations.media.Schema schema) Generate parameter by schemaGets delegating method parameter customizer.Gets optional web conversion service provider.Gets property resolver utils.static boolean
Is file boolean.boolean
isFile
(org.springframework.core.MethodParameter methodParameter) Is file boolean.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.Resolve the given annotation-specified value, potentially containing placeholders and expressions.
-
Constructor Details
-
GenericParameterService
public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional<DelegatingMethodParameterCustomizer> optionalDelegatingMethodParameterCustomizer, Optional<WebConversionServiceProvider> optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider) Instantiates a new Generic parameter builder.- Parameters:
propertyResolverUtils
- the property resolver utilsoptionalDelegatingMethodParameterCustomizer
- the optional delegating method parameter customizeroptionalWebConversionServiceProvider
- the optional web conversion service providerobjectMapperProvider
- the object mapper provider
-
-
Method Details
-
addFileType
Add file type.- Parameters:
classes
- the classes
-
isFile
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 docparamCalcul
- 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 doccomponents
- the componentsjsonView
- the json viewlocale
- 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
Gets delegating method parameter customizer.- Returns:
- the delegating method parameter customizer
-
getPropertyResolverUtils
Gets property resolver utils.- Returns:
- the property resolver utils
-
getOptionalWebConversionServiceProvider
Gets optional web conversion service provider.- Returns:
- the optional web conversion service provider
-
resolveEmbeddedValuesAndExpressions
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
-