voxpupuli / json-schema

Ruby JSON Schema Validator
MIT License
1.54k stars 243 forks source link

Added type casting for limiting min/max #263

Closed elliott-davis closed 9 years ago

elliott-davis commented 9 years ago

Both 0 and "0" are valid json integers when representing min/max. I added a cast to the limit to ensure proper comparison.

RST-J commented 9 years ago

Could you please add a reference which backs your statement? To me it seems like you'd like to have it this way, but the spec clearly says it has to be a JSON number.

elliott-davis commented 9 years ago

I'm sorry - I think I pinned the blame on json-schema when it really belongs with raml-mocker. I'm going to close this as the spec is pretty clear it needs to be an integer.