public class PersistentEntityToJsonSchemaConverter extends Object implements org.springframework.core.convert.converter.ConditionalGenericConverter
JsonSchema
instances for PersistentEntity
s.Modifier and Type | Class and Description |
---|---|
static class |
PersistentEntityToJsonSchemaConverter.ValueTypeSchemaPropertyCustomizerFactory |
Constructor and Description |
---|
PersistentEntityToJsonSchemaConverter(org.springframework.data.mapping.context.PersistentEntities entities,
Associations associations,
org.springframework.context.support.MessageSourceAccessor accessor,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
RepositoryRestConfiguration configuration,
PersistentEntityToJsonSchemaConverter.ValueTypeSchemaPropertyCustomizerFactory customizerFactory)
Creates a new
PersistentEntityToJsonSchemaConverter for the given PersistentEntities and
ResourceMappings . |
Modifier and Type | Method and Description |
---|---|
JsonSchema |
convert(Class<?> domainType)
Converts the given type into a
JsonSchema instance. |
JsonSchema |
convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> |
getConvertibleTypes() |
boolean |
matches(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
public PersistentEntityToJsonSchemaConverter(org.springframework.data.mapping.context.PersistentEntities entities, Associations associations, org.springframework.context.support.MessageSourceAccessor accessor, com.fasterxml.jackson.databind.ObjectMapper objectMapper, RepositoryRestConfiguration configuration, PersistentEntityToJsonSchemaConverter.ValueTypeSchemaPropertyCustomizerFactory customizerFactory)
PersistentEntityToJsonSchemaConverter
for the given PersistentEntities
and
ResourceMappings
.entities
- must not be null.mappings
- must not be null.accessor
- must not be null.objectMapper
- must not be null.configuration
- must not be null.public boolean matches(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
matches
in interface org.springframework.core.convert.converter.ConditionalConverter
public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
getConvertibleTypes
in interface org.springframework.core.convert.converter.GenericConverter
public JsonSchema convert(Class<?> domainType)
JsonSchema
instance.domainType
- must not be null.public JsonSchema convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
convert
in interface org.springframework.core.convert.converter.GenericConverter
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.