{
  "author": {
    "name": "Max Kitsch",
    "email": "max.kitsch@gmail.com"
  },
  "name": "brest-maria",
  "description": "MariaDB layer with some bREST API binding",
  "version": "0.0.4",
  "repository": {
    "type": "git",
    "url": "https://github.com/MaximTovstashev/brest-maria.git"
  },
  "main": "index.js",
  "dependencies": {
    "async": "*",
    "mariasql": "*",
    "lodash": "*"
  },
  "devDependencies": {
    "async": "*",
    "lodash": "*",
    "mariasql": "*"
  },
  "keywords": [
    "api",
    "app",
    "brest",
    "express",
    "mariadb",
    "mariasql",
    "rest",
    "restful",
    "validate"
  ],
  "optionalDependencies": {},
  "engines": {
    "node": "*"
  },
  "readme": "#Brest Validator\r\n\r\n##About\r\n\r\nValidator wrapper around [REST API library](https://www.npmjs.org/package/brest).\r\n\r\n##How do I use it?\r\n\r\n###1. Install from package manager\r\n\r\nIf your project uses [package.json](https://npmjs.org/doc/json.html), simply include\r\n\r\n    \"dependencies\": {\r\n        ...\r\n        \"brest-validator\": \"*\",\r\n        ...\r\n    }\r\n\r\nand then in the shell, in project root folder execute:\r\n\r\n    $ npm install\r\n\r\nOtherwise, you can install brest globally with npm and have it available from anywhere on your machine:\r\n\r\n    $ npm install -g brest-validator\r\n    \r\nPlease note, that Brest version at least 0.1 is required for this wrapper.    \r\n\r\n###2 Setup\r\n####2.1 Application file\r\n\r\nIn your application file, once you've created Brest instance\r\n\r\n```javascript\r\n    // Require brest library\r\n    var Brest = require('brest');\r\n    var brest = new Brest(require('./settings'));\r\n    var BrestValidator = require('brest-validator');\r\n    brest.use(BrestValidator);\r\n```\r\n\r\n####2.2 API script file structure\r\n\r\nAPI scripts are expected to export object files with the following structure:\r\n\r\n```javascript\r\n{\r\n    version: 1,\r\n    description: \"Resource description\" //Description for the Docker\r\n    resources: [\r\n        //Here come the resource objects\r\n    ]\r\n}\r\n```\r\n\r\nAdd validator (or validate) method to the API description. Use express-validator notation.\r\n\r\n```javascript\r\n{\r\n    /**\r\n     * Validation method. It is supposed to use express-validator (assertion part of it), but it can be\r\n     * also used as a custom validator. Any data returned by this method will be considered as an error message\r\n     */\r\n    validator: function(req){\r\n        req.assert('fooId').notEmpty().isNumeric();\r\n    },\r\n\r\n\r\n}\r\n```\r\n\r\n##Changes\r\n\r\n###0.0.1\r\n\r\nFirst working version.\r\n\r\n##MIT License\r\n\r\nCopyright © 2013 Maxim Tovstashev <max.kitsch@gmail.com>\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
  "readmeFilename": "readme.md",
  "gitHead": "c10dc19c5f367ba1aec86bc5806712791874efdd",
  "bugs": {
    "url": "https://github.com/MaximTovstashev/brest-validate/issues"
  },
  "homepage": "https://github.com/MaximTovstashev/brest-validate",
  "_id": "brest-validate@0.0.1-b",
  "scripts": {},
  "_shasum": "fa70acca35646d47c5a5e7e24c728e2726260f6f",
  "_from": "brest-validate@0.0.1-b"
}
