JSON schema for data description vs data validation vs input validation
问题 In what I can find about using JSON schema, there seems to be a confusing conflation of (or at least a lack of distinction among) the tasks of describing valid data, validating stored data, and validating input data. A typical example looks like: var schema = { type: 'object', properties: { id: { type: 'integer', required: true }, name: { type: 'string', required: true }, description: { type: 'string', required: false } } }; This works well for describing what valid data in a data store