Interface MongoJsonSchemaCreator


public interface MongoJsonSchemaCreator
MongoJsonSchemaCreator extracts the MongoJsonSchema for a given Class by applying the following mapping rules.

Required Properties

  • Properties of primitive type
Ignored Properties Property Type Mapping
  • Object -> type : 'object'
  • Arrays -> type : 'array'
  • Collection -> type : 'array'
  • Map -> type : 'object'
  • Enum -> type : 'string', enum : [the enum values]
  • Simple Types -> type : 'the corresponding bson type'
  • Domain Types -> 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. Encrypted properties will contain encrypt information.
Since:
2.2
Author:
Christoph Strobl