Skip to content

Commit

Permalink
Update fxp version
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Jan 30, 2018
1 parent aac2fa6 commit 48e360c
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 34 deletions.
11 changes: 8 additions & 3 deletions index.js
Expand Up @@ -32,12 +32,17 @@ function validateSyntax(fileName) {
} else if (fileName.endsWith(".yaml") || fileName.endsWith(".yml")) {
require('yamljs').parseFile(fileName);
console.log("Validated successfully");
}else if(fileName.endsWith(".xml"))
}else if(fileName.endsWith(".xml")){
var result = require('fast-xml-parser').validate(fs.readFileSync(fileName, {
encoding: 'utf-8'
}));
if(result === true) console.log("Validated successfully");
else {
if(result === true) {
console.log("Validated successfully");
}
else{
console.log("Validation failed");
}
}else {
console.log("Unsupported file");
}
} catch (e) {
Expand Down
11 changes: 6 additions & 5 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "stubmatic",
"preferGlobal": true,
"version": "5.0.5",
"version": "5.0.6",
"description": "A stub server to mock behaviour of HTTP(s) / REST / SOAP services",
"man": "./man/stubmatic.1",
"main": "./lib/stubmatic.js",
Expand All @@ -18,7 +18,7 @@
"author": "Amit Gupta (https://github.com/amitguptagwl)",
"dependencies": {
"fast-lorem-ipsum": "^1.0.2",
"fast-xml-parser": "^2.5.0",
"fast-xml-parser": "^2.9.3",
"hashes": "^0.1.3",
"http-proxy": "^1.16.2",
"js-joda": "^1.1.11",
Expand Down Expand Up @@ -65,9 +65,10 @@
"coveralls": "^2.11.15",
"dir-compare": "^1.3.0",
"istanbul": "^0.4.5",
"jasmine": "^2.5.2",
"jasmine-core": "^2.5.2",
"jasmine": "^2.9.0",
"jasmine-core": "^2.9.1",
"q": "^1.4.1",
"rewire": "^2.5.2"
"portfinder": "^1.0.13",
"rewire": "^3.0.2"
}
}

0 comments on commit 48e360c

Please sign in to comment.