Metabin schemas validation tool
npm install metabin-schema-validator
import schemaValidator from 'metabin-schema-validator'
const schema = {
"title": "string",
"genres": [],
"author": {
"name": "string",
"age": "number"
},
"band": "$schema_hash",
"tracks": [ "$schema_hash", "number" ],
"text": [[ "e", "n", "u", "m" ]]
}
const report = schemaValidator(schema)
console.log(report)
/*
{
title: 'STRING',
genres: '!Empty array of types.',
author: { name: 'STRING', age: 'NUMBER' },
band: 'SCHEMA_LINK',
tracks: [ 'SCHEMA_LINK', 'NUMBER' ],
text: 'ENUM'
}
*/