Socket
Socket
Sign inDemoInstall

grunt-blueprint-validator

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-blueprint-validator - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

test/apiSpecs/issue.md

22

lib/validator.js

@@ -9,2 +9,10 @@ var jsonUtils = require('./utils/json-utils');

function hasJsonBody(){
return !!spec.body;
}
function hasJsonSchema(){
return !!spec.schema;
}
var errorHandler = function(prefix){

@@ -25,7 +33,15 @@ return function(err){

if (isJsonSpec) {
jsonUtils.parseBody(spec, errorHandler('JSON Body validation'));
jsonUtils.validateAndParseSchema(spec, errorHandler('JSON Schema validation'));
jsonUtils.validateJsonAgainstSchema(spec.body, spec.schema, errorHandler());
if (hasJsonBody()) {
jsonUtils.parseBody(spec, errorHandler('JSON Body validation'));
}
if (hasJsonSchema()){
jsonUtils.validateAndParseSchema(spec, errorHandler('JSON Schema validation'));
}
if (hasJsonBody() && hasJsonSchema()) {
jsonUtils.validateJsonAgainstSchema(spec.body, spec.schema, errorHandler());
}
}
};
};

2

package.json
{
"name": "grunt-blueprint-validator",
"description": "Validates Blueprint files.",
"version": "2.0.4",
"version": "2.0.5",
"homepage": "https://github.com/Aconex/grunt-blueprint-validator",

@@ -6,0 +6,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc