Closed
Description
Hi!
I think that MongoJsonSchemaCreator
is treating collection like
fields of a @Document
class incorrectly:
- for simple and enum lists (e.g.
List<String>
,List<Enum>
), information about expectedarray
type is lost and they are included in a resulting schema asarray
- complex lists (e.g.
List<ObjectType>
), are resolved as anobject
with properties taken fromObjectType
- the information that it is anarray
is lost completely (and results in not being able to insert correct document into the database).
Minimal example to reproduce the issue can be found here:
https://github.com/MateuszWicherski/spring-data-mongodb-bug