{"id":16531400,"url":"https://github.com/marcbachmann/metalman-schema","last_synced_at":"2025-08-22T23:11:38.048Z","repository":{"id":12550782,"uuid":"72154359","full_name":"marcbachmann/metalman-schema","owner":"marcbachmann","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T02:29:33.000Z","size":179,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:40:25.594Z","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/marcbachmann.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-10-27T22:48:09.000Z","updated_at":"2023-03-09T00:13:55.000Z","dependencies_parsed_at":"2023-12-15T03:32:00.028Z","dependency_job_id":"40600118-6ce7-4601-b2b7-0da78dd482da","html_url":"https://github.com/marcbachmann/metalman-schema","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmetalman-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmetalman-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmetalman-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmetalman-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbachmann","download_url":"https://codeload.github.com/marcbachmann/metalman-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249602,"owners_count":20908211,"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-10-11T18:08:43.899Z","updated_at":"2025-04-04T20:42:45.658Z","avatar_url":"https://github.com/marcbachmann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# metalman-schema\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/marcbachmann/metalman-schema.svg)](https://greenkeeper.io/)\n\nA JSON schema validation middleware for the metalman module.\n\n\n```js\nvar metalman = require('metalman')\nvar action = require('metalman-action')\n\nvar command = metalman([validate])\nvar fn = command({\n  schema: {\n    type: 'object',\n    required: ['foo'],\n    additionalProperties: false,\n    properties: {\n      foo: {type: 'number'}\n    }\n  }\n})\n\nfn({foo: 'bar'}, function (err) {\n  // err instanceof Error\n  // err.name equals 'ValidationError'\n  // err.message equals \"Value at path '/foo' should be number\"\n})\n\nfn({foo: 1}, function (err) {\n  // err equals null if the schema is valid\n})\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fmetalman-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbachmann%2Fmetalman-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fmetalman-schema/lists"}