Interface JsonSchemaMapper
- All Known Implementing Classes:
MongoJsonSchemaMapper
public interface JsonSchemaMapper
JsonSchemaMapper
allows mapping a given Document
containing a $jsonSchema to the fields of
a given domain type. The mapping considers Field
annotations
and other Spring Data specifics.- Since:
- 2.1
- Author:
- Christoph Strobl
-
Method Summary
-
Method Details
-
mapSchema
Map the required and properties fields the givenDocument
containing the $jsonSchema against the given domain type.
The source document remains untouched, fields that do not require mapping are simply copied over to the mapped instance.- Parameters:
jsonSchema
- theDocument
holding the raw schema representation. Must not be null.type
- the target type to map against. Must not be null.- Returns:
- a new
Document
containing the mapped $jsonSchema never null.
-