Skip to content

Create stricter Schema type to only allow structs #18

@devmatteini

Description

@devmatteini

It would be nice to have errors when you try to pass any Schema but a Struct like mongodb expects.

Db.collection("any", Schema.Struct({ name: Schema.String })) // ok

Db.collection("any", Schema.String) // error (already working)

Db.collection("any", Schema.Array(Schema.String)) // errors (not working)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions