Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
Generate fake data with mongoose schema

I'm using mongoose schemas at application level in combination with mongodb. For testing, I want to fill my mongodb with fake data. The library mongoose-faker does not seem to be automatic. I know there are fakers for JSON-Schema, but I don't want to maintain to types of Schemas.

Is it possible to generate fake data automaticaly?

Greetings

Daniel

Edit: I'll try to generate a JSON-Schema from my Mongoose-Schema. I can test this on monday

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The Mongoose-Schema can be transformed into an JSON-Schema with the module mongoose-schema-jsonschema. Fake data can be generated with the module json-schema-faker.

It's nice to know, that the transformation can only transform standard mongoose types to JSON-Schema. Also the faker seems to have problems with generating required fields if they are in an array of objects.

But in general this solution works.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!