Class MetadataConfiguration

java.lang.Object
org.springframework.data.rest.core.config.MetadataConfiguration

public class MetadataConfiguration extends Object
Configuration for metadata exposure.
Author:
Oliver Gierke
  • 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

      public void registerJsonSchemaFormat(JsonSchemaFormat format, Class<?>... types)
    • getSchemaFormatFor

      public JsonSchemaFormat getSchemaFormatFor(Class<?> type)
      Returns the JsonSchemaFormat to be used for the given type.
      Parameters:
      type - must not be null.
      Returns:
    • registerFormattingPatternFor

      public void registerFormattingPatternFor(String pattern, Class<?> type)
      Registers the given formatting patter for the given value type.
      Parameters:
      pattern - must not be null or empty.
      type - must not be null.
    • getPatternFor

      public Pattern getPatternFor(Class<?> type)
      Returns the Pattern registered for the given value type.
      Parameters:
      type - must not be null.
      Returns: