nijikokun / generate-schema

🧞 Convert JSON Objects to MySQL, JSON Schema, Mongoose, Google BigQuery, Swagger, and more.
MIT License
1.04k stars 136 forks source link

Schema reads + saves string of numbers incorrectly as date #42

Closed dhenson02 closed 6 years ago

dhenson02 commented 6 years ago

Generating a schema that runs into a string of numbers should opt for the most likely case of them being an ID or index, rather than a date.

Example:
Currently "67260" will be not only typed, but also converted to and saved as an ISO date changing it into ISODate("67260-01-01T05:00:00Z")