Open orlade opened 8 years ago
I absolutely agree, if I were to write this today, it would be based on a JSON schema parser and generator (there are a few packages that generator random data based on JSON schema now but this was not the case when I started this project).
This would be a very different package, though, and little of react-prop-schema would remain. I consider react-prop-schema to be 'finished' (and I haven't used it in newer projects).
Data schema libraries are great, but I am always amazed at how often they do the exact same thing with wildly different naming schemes. This one is good, but it would feel more bulletproof to a newcomer (like myself) if it was more closely aligned with a popular schema standard like JSON Schema (see validation docs for details).
Some changes this would imply:
'integer'
)maximum
orexclusiveMaximum
instead ofmax
, ormaxLength
for arrays)Obviously changing names would potentially be pretty breaking (unless they could all be aliased), so consider this a request for a future version.