Class MetadataConfiguration
java.lang.Object
org.springframework.data.rest.core.config.MetadataConfiguration
Configuration for metadata exposure.
- Author:
- Oliver Gierke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the ALPS resources are exposed.getPatternFor(Class<?> type) Returns thePatternregistered for the given value type.getSchemaFormatFor(Class<?> type) Returns theJsonSchemaFormatto be used for the given type.booleanReturns whether to omit documentation attributes for unresolvable resource bundle keys.voidregisterFormattingPatternFor(String pattern, Class<?> type) Registers the given formatting patter for the given value type.voidregisterJsonSchemaFormat(JsonSchemaFormat format, Class<?>... types) voidsetAlpsEnabled(boolean enableAlps) Configures whether to expose the ALPS resources.voidsetOmitUnresolvableDescriptionKeys(boolean omitUnresolvableDescriptionKeys) Configures whether to omit documentation attributes for unresolvable resource bundle keys.
-
Constructor Details
-
MetadataConfiguration
public MetadataConfiguration()
-
-
Method Details
-
setOmitUnresolvableDescriptionKeys
public void setOmitUnresolvableDescriptionKeys(boolean omitUnresolvableDescriptionKeys) Configures whether to omit documentation attributes for unresolvable resource bundle keys. Defaults to true, which means that an unsuccessful attempt to resolve the message will cause no documentation entry to be rendered for the metadata resources.- Parameters:
omitUnresolvableDescriptionKeys- whether to omit documentation attributes for unresolvable resource bundle keys.
-
omitUnresolvableDescriptionKeys
public boolean omitUnresolvableDescriptionKeys()Returns whether to omit documentation attributes for unresolvable resource bundle keys.- Returns:
- the omitUnresolvableDescriptionKeys
-
setAlpsEnabled
public void setAlpsEnabled(boolean enableAlps) Configures whether to expose the ALPS resources.- Parameters:
enableAlps- whether to expose ALPS resources.
-
alpsEnabled
public boolean alpsEnabled()Returns whether the ALPS resources are exposed.- Returns:
- the alpsEnabled
-
registerJsonSchemaFormat
-
getSchemaFormatFor
Returns theJsonSchemaFormatto be used for the given type.- Parameters:
type- must not be null.- Returns:
-
registerFormattingPatternFor
Registers the given formatting patter for the given value type.- Parameters:
pattern- must not be null or empty.type- must not be null.
-
getPatternFor
Returns thePatternregistered for the given value type.- Parameters:
type- must not be null.- Returns:
-