public interface MongoJsonSchemaCreator
MongoJsonSchemaCreator extracts the MongoJsonSchema for a given Class by applying the
following mapping rules.
Required Properties
TransientObject -> type : 'object'Arrays -> type : 'array'Collection -> type : 'array'Map -> type : 'object'Enum -> type : 'string', enum : [the enum values]type : 'the corresponding bson type' type : 'object', properties : {the types properties} _id properties using types that can be converted into
ObjectId like String will be mapped to type : 'object' unless there is more
specific information available via the MongoId annotation.| Modifier and Type | Method and Description |
|---|---|
static MongoJsonSchemaCreator |
create(MongoConverter mongoConverter)
Creates a new
MongoJsonSchemaCreator that is aware of conversions applied by the given
MongoConverter. |
MongoJsonSchema |
createSchemaFor(Class<?> type)
Create the
MongoJsonSchema for the given type. |
MongoJsonSchema createSchemaFor(Class<?> type)
MongoJsonSchema for the given type.type - must not be null.static MongoJsonSchemaCreator create(MongoConverter mongoConverter)
MongoJsonSchemaCreator that is aware of conversions applied by the given
MongoConverter.mongoConverter - must not be null.MongoJsonSchemaCreator.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.