{"id":23021175,"url":"https://github.com/compono/mongalisa-json-schemas","last_synced_at":"2025-04-02T18:43:46.578Z","repository":{"id":52473929,"uuid":"149231514","full_name":"compono/mongalisa-json-schemas","owner":"compono","description":"JSON Schemas support for MongaLisa","archived":false,"fork":false,"pushed_at":"2024-11-25T03:01:22.000Z","size":448,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-02-08T09:26:14.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/compono.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-09-18T05:01:13.000Z","updated_at":"2024-11-25T03:00:49.000Z","dependencies_parsed_at":"2024-11-24T22:21:29.145Z","dependency_job_id":"60ee06ab-83f9-47d9-a673-3f13466f24d4","html_url":"https://github.com/compono/mongalisa-json-schemas","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compono%2Fmongalisa-json-schemas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compono%2Fmongalisa-json-schemas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compono%2Fmongalisa-json-schemas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compono%2Fmongalisa-json-schemas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compono","download_url":"https://codeload.github.com/compono/mongalisa-json-schemas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246871483,"owners_count":20847489,"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-12-15T12:16:47.362Z","updated_at":"2025-04-02T18:43:46.551Z","avatar_url":"https://github.com/compono.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MongaLisa JSON Schemas\n\nThis package adds JSON Schemas support for records validation in mongalisa\n\n```\nnpm add @compono/mongalisa-json-schemas\n```\n\n## Basic Usage\n\n```js\nconst mongalisa = require('@compono/mongalisa');\nconst jsonSchemaSupport = require('@compono/mongalisa-json-schemas');\n\nmongalisa.plugin(jsonSchemaSupport);\n\n\nplugin(jsonSchemaSupport());\n\nclass User {\n  static schema = {\n    type: 'object',\n    properties: {\n      email: {\n        type: 'string',\n        format: 'email'\n      },\n      password: {\n        type: 'string'\n      }\n    },\n    required: ['email', 'password']\n  };\n}\n\nconst users = new mongalisa.Controller(User);\n\nconst user = await users.create({\n  email: 'nikolay@rocks.com',\n  password: 'Ba(k0/\\\\/!'\n});\n\nawait users.create({ email: 'hack!' }); // throws ValidationError\n```\n\n## Copyright \u0026 License\n\nAll code in this repository is the property of Compono Pty Ltd.\n\nCopyright (C) 2018 Compono Pty Ltd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompono%2Fmongalisa-json-schemas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompono%2Fmongalisa-json-schemas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompono%2Fmongalisa-json-schemas/lists"}