Commit c38b83f6 authored by canterafonsj's avatar canterafonsj
Browse files

Schema validation

parent c9ba829f
Loading
Loading
Loading
Loading

package-lock.json

0 → 100644
+47 −0
Original line number Diff line number Diff line
{
  "name": "ngsi-ld",
  "version": "1.0.0",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
    "ajv": {
      "version": "6.5.5",
      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz",
      "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==",
      "requires": {
        "fast-deep-equal": "^2.0.1",
        "fast-json-stable-stringify": "^2.0.0",
        "json-schema-traverse": "^0.4.1",
        "uri-js": "^4.2.2"
      }
    },
    "fast-deep-equal": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
    },
    "fast-json-stable-stringify": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
    },
    "json-schema-traverse": {
      "version": "0.4.1",
      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
    },
    "punycode": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
    },
    "uri-js": {
      "version": "4.2.2",
      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
      "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
      "requires": {
        "punycode": "^2.1.0"
      }
    }
  }
}

package.json

0 → 100644
+21 −0
Original line number Diff line number Diff line
{
  "name": "ngsi-ld",
  "version": "1.0.0",
  "description": "NGSI-LD Schema Compilation",
  "main": "index.js",
  "scripts": {
    "test": "ajv compile -s schema/Entity.json -r schema/common.json -r schema/geometry-schema.json"
  },
  "repository": {
    "type": "git",
    "url": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD"
  },
  "keywords": [
    "NGSI-LD"
  ],
  "author": "Jose Manuel Cantera",
  "license": "ISC",
  "dependencies": {
    "ajv": "^6.5.5"
  }
}
+5 −0
Original line number Diff line number Diff line
#!/bin/sh

ajv compile -s $SCHEMAS/Entity.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json

ajv compile -s $SCHEMAS/Subscription.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json