Skip to content

Validate mongo documents on the server #8

@mycrobe

Description

@mycrobe

SOLR docs are never deserialized and thus can't be validated. However, the mongo client gives us mongo documents as Javascript objects, which are definitely validate-able.

What is the most appropriate way to handle validation, given that the REST service returns a simple array of documents?

  • Refactor response to an object with, e.g. docs and metadata subdocuments (with docs containing the array currently returned, and metadata including the validation information)?
  • Modify each document to add validation field? (This is probably not a good idea.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions