Package io.smallrye.openapi.api
Class OpenApiConfigImpl
java.lang.Object
io.smallrye.openapi.api.OpenApiConfigImpl
- All Implemented Interfaces:
OpenApiConfig
Implementation of the
OpenApiConfig
interface that gets config information from a
standard MP Config object.- Author:
- [email protected]
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.openapi.api.OpenApiConfig
OpenApiConfig.AutoInheritance, OpenApiConfig.DuplicateOperationIdBehavior, OpenApiConfig.OperationIdStrategy
-
Field Summary
Fields inherited from interface io.smallrye.openapi.api.OpenApiConfig
DEFAULT_COMPOSITION_EXCLUDE_PACKAGES, DUPLICATE_OPERATION_ID_BEHAVIOR_DEFAULT, MAXIMUM_STATIC_FILE_SIZE_DEFAULT, NEVER_SCAN_CLASSES, NEVER_SCAN_PACKAGES
-
Constructor Summary
ConstructorsConstructorDescriptionOpenApiConfigImpl
(org.eclipse.microprofile.config.Config config) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenApiConfig
fromConfig
(org.eclipse.microprofile.config.Config config) Deprecated.protected org.eclipse.microprofile.config.Config
<R,
T> T getConfigValue
(String propertyName, Class<R> type, Function<R, T> converter, Supplier<T> defaultValue) getConfigValueMap
(String propertyNamePrefix, Class<R> type, Function<R, T> converter) <R,
T extends Collection<R>>
TgetConfigValues
(String propertyName, Class<R> elementType, Function<List<R>, T> converter, Supplier<T> defaultValue) protected <T> Optional
<T> getOptionalValue
(String propertyName, Class<T> type) Fetch the stream of all available configuration property names.protected <T> T
void
setAllowNakedPathParameter
(Boolean allowNakedPathParameter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.smallrye.openapi.api.OpenApiConfig
applicationPathDisable, arrayReferencesEnable, customSchemaRegistryClass, doAllowNakedPathParameter, filter, getAutoInheritance, getConfigValue, getDefaultConsumes, getDefaultPrimitivesConsumes, getDefaultPrimitivesProduces, getDefaultProduces, getDefaultStreamingConsumes, getDefaultStreamingProduces, getDuplicateOperationIdBehavior, getInfoContactEmail, getInfoContactName, getInfoContactUrl, getInfoDescription, getInfoLicenseIdentifier, getInfoLicenseName, getInfoLicenseUrl, getInfoSummary, getInfoTermsOfService, getInfoTitle, getInfoVersion, getMaximumStaticFileSize, getOpenApiVersion, getOperationIdStrategy, getScanCompositionExcludePackages, getScanExcludeProfiles, getScanProfiles, getScanResourceClasses, getSchemas, modelReader, operationServers, pathServers, privatePropertiesEnable, propertyNamingStrategy, removeUnusedSchemas, scanBeanValidation, scanClasses, scanDependenciesDisable, scanDependenciesJars, scanDisable, scanExcludeClasses, scanExcludePackages, scanPackages, servers, sortedPropertiesEnable, toList, toSet
-
Constructor Details
-
OpenApiConfigImpl
public OpenApiConfigImpl(org.eclipse.microprofile.config.Config config) Constructor.- Parameters:
config
- MicroProfile Config instance
-
-
Method Details
-
fromConfig
Deprecated.useOpenApiConfig.fromConfig(Config)
instead -
getConfig
protected org.eclipse.microprofile.config.Config getConfig()- Returns:
- the MP config instance
-
getPropertyNames
Fetch the stream of all available configuration property names. -
getValue
-
getOptionalValue
-
allowNakedPathParameter
- Specified by:
allowNakedPathParameter
in interfaceOpenApiConfig
-
setAllowNakedPathParameter
- Specified by:
setAllowNakedPathParameter
in interfaceOpenApiConfig
-
getConfigValue
public <R,T> T getConfigValue(String propertyName, Class<R> type, Function<R, T> converter, Supplier<T> defaultValue) - Specified by:
getConfigValue
in interfaceOpenApiConfig
-
getConfigValues
public <R,T extends Collection<R>> T getConfigValues(String propertyName, Class<R> elementType, Function<List<R>, T> converter, Supplier<T> defaultValue) - Specified by:
getConfigValues
in interfaceOpenApiConfig
-
getConfigValueMap
public <R,T> Map<String,T> getConfigValueMap(String propertyNamePrefix, Class<R> type, Function<R, T> converter) - Specified by:
getConfigValueMap
in interfaceOpenApiConfig
-
OpenApiConfig.fromConfig(Config)
instead