{"id":18391457,"url":"https://github.com/figadore/json-schema-validator","last_synced_at":"2025-04-12T09:39:39.797Z","repository":{"id":143880774,"uuid":"52559127","full_name":"figadore/json-schema-validator","owner":"figadore","description":"Validate json data against json schema","archived":false,"fork":false,"pushed_at":"2016-07-19T18:07:44.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T05:12:27.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/figadore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-25T21:45:51.000Z","updated_at":"2016-02-25T21:47:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d50366fd-0edd-4807-a31e-4e0487df3ec3","html_url":"https://github.com/figadore/json-schema-validator","commit_stats":null,"previous_names":["shinymayhem/json-schema-validator"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figadore%2Fjson-schema-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figadore%2Fjson-schema-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figadore%2Fjson-schema-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figadore%2Fjson-schema-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/figadore","download_url":"https://codeload.github.com/figadore/json-schema-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248548789,"owners_count":21122765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:51:55.417Z","updated_at":"2025-04-12T09:39:39.771Z","avatar_url":"https://github.com/figadore.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hypermedia Schema validation\n\nRequires node \u003e= 0.12\n\nUse [prmd](https://github.com/interagent/prmd)  or [schema-generator](https://hub.docker.com/r/shinydocker/schema-generator/) to generate JSON schemas (this package works for JSON schemas in general, not just for prmd's hypermedia schemas). Validation is done with the [z-schema library](https://github.com/zaggino/z-schema)\n\nSchemas fetched from http uri's are cached to file if node has write permission to the `schemas` directory\n\n## Usage\n\n`npm install --save hypermedia-validator`\n\n```\nvar validator = require('hypermedia-validator');\n\nvar car = {\n  id: 33,\n  make: \"Ford\",\n  model: \"Taurus\",\n  color: \"black\"\n};\n\nvalidator.validate(car, 'http://example.com/schemas/main#definitions/car', function (err) {\n  if (err) {\n    // Validation details are stashed away in err.detail, not shown in console when thrown\n    console.log(\"Error during validation\", car, util.inspect(err, false, null));\n    throw err;\n  }\n});\n```\n\n### CLI\n```\nnpm install -g hypermedia-validator\nvalidate cars.json file://schema.json#definitions/car/definitions/cars\n\n// Or\nvalidate cars.json http://example.com/schemas/main#definitions/car/definitions/cars\n```\n\n\n\n## Development\n\n### Testing\nrun `npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigadore%2Fjson-schema-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigadore%2Fjson-schema-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigadore%2Fjson-schema-validator/lists"}