Package org.springdoc.core.utils
Class PropertyResolverUtils
java.lang.Object
org.springdoc.core.utils.PropertyResolverUtils
The type Property resolver utils.
- Author:
- bnasslahsen
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyResolverUtils
(org.springframework.beans.factory.config.ConfigurableBeanFactory factory, org.springframework.context.MessageSource messageSource, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Property resolver utils. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.beans.factory.config.ConfigurableBeanFactory
Gets factory.io.swagger.v3.oas.models.SpecVersion
Gets spec version.Gets spring doc config properties.boolean
Is openapi 31 boolean.boolean
Is resolve extensions properties boolean.Resolve string.resolveExtensions
(Locale locale, Map<String, Object> extensions) Resolve extensions map.trimIndent
(String text) Returns a string where all leading indentation has been removed from each line.
-
Constructor Details
-
PropertyResolverUtils
public PropertyResolverUtils(org.springframework.beans.factory.config.ConfigurableBeanFactory factory, org.springframework.context.MessageSource messageSource, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Property resolver utils.- Parameters:
factory
- the factorymessageSource
- the message sourcespringDocConfigProperties
- the spring doc config properties
-
-
Method Details
-
resolve
Resolve string.- Parameters:
parameterProperty
- the parameter propertylocale
- the locale- Returns:
- the string
-
trimIndent
Returns a string where all leading indentation has been removed from each line. It detects the smallest common indentation of all the lines in the input string, and removes it. If the input text isnull
, the method returnsnull
.- Parameters:
text
- The original string with possible leading indentation.- Returns:
- The string with the smallest common leading indentation removed from each line,
or
null
if the input text isnull
.
-
getFactory
public org.springframework.beans.factory.config.ConfigurableBeanFactory getFactory()Gets factory.- Returns:
- the factory
-
getSpringDocConfigProperties
Gets spring doc config properties.- Returns:
- the spring doc config properties
-
getSpecVersion
public io.swagger.v3.oas.models.SpecVersion getSpecVersion()Gets spec version.- Returns:
- the spec version
-
isOpenapi31
public boolean isOpenapi31()Is openapi 31 boolean.- Returns:
- the boolean
-
isResolveExtensionsProperties
public boolean isResolveExtensionsProperties()Is resolve extensions properties boolean.- Returns:
- the boolean
-
resolveExtensions
Resolve extensions map.- Parameters:
locale
- the localeextensions
- the extensions- Returns:
- the map
-