Skip to content

Don't use refs for nested objects #105

@dolencd

Description

@dolencd

Hi!

I have several database models defined using class-validator and I'd like to add validation inside the database itself by converting the existing models to JSONSchema. Some converters need to be changed (bsonType), but that's manageable by changing some converters.

One thing that I haven't figured out how to do is to store nested documents in this way. The default behavior of class-validator-jsonschema is to create a ref, but MongoDB doesn't support this.

Instead of creating refs I just need all the schemas to be nested. As far as I know there's currently no way to do this, but it feels like something that could be part of the config. Are there any plans for anything like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions