How to manage multiple JSON schema files?
I'm trying to validate my JSON API using node.js + json-schema.js from commonjs-utils. Just single validation was easy but could not find right way how to manage multiple schema files to enable referencing each other. Suppose that I got two Models & two APIs. // book { "type": "object", "properties": { "title": { "type": "string" }, "author": { "type": "string" } } } // author { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" } } } // authors API { "type": "array", "items": { "$ref": "author" } } // books API: list of books written by same