Cannot create a schema with a subdocument containing the key "type" #13154
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
7.0.1
Node.js version
18
MongoDB server version
4.4
Typescript version (if applicable)
No response
Description
I can't create a schema with a subdocument containing the key "type". See below for examples
Steps to Reproduce
This code fails to create a schema:
The intention is to produce a document type like this:
It gives the error:
Expected Behavior
Schema should successfully get created
The text was updated successfully, but these errors were encountered: