Class PersistentEntityToJsonSchemaConverter

java.lang.Object
org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.ConditionalConverter, org.springframework.core.convert.converter.ConditionalGenericConverter, org.springframework.core.convert.converter.GenericConverter

public class PersistentEntityToJsonSchemaConverter extends Object implements org.springframework.core.convert.converter.ConditionalGenericConverter
Converter to create JsonSchema instances for PersistentEntitys.
Author:
Jon Brisbin, Oliver Gierke, Greg Turnquist
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
      Specified by:
      matches in interface org.springframework.core.convert.converter.ConditionalConverter
    • getConvertibleTypes

      public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
      Specified by:
      getConvertibleTypes in interface org.springframework.core.convert.converter.GenericConverter
    • convert

      public JsonSchema convert(Class<?> domainType)
      Converts the given type into a JsonSchema instance.
      Parameters:
      domainType - must not be null.
      Returns:
    • convert

      public JsonSchema convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
      Specified by:
      convert in interface org.springframework.core.convert.converter.GenericConverter