raml-typesystem
Advanced tools
Comparing version 0.0.64 to 0.0.65
@@ -150,8 +150,2 @@ "use strict"; | ||
} | ||
if (e.message == "Cannot assign to read only property '__$validated' of object") { | ||
return ts.ok(); | ||
} | ||
if (e.message == "Object.keys called on non-object") { | ||
return ts.ok(); | ||
} | ||
if (e.message == "Maximum call stack size exceeded") { | ||
@@ -158,0 +152,0 @@ return ts.error(messageRegistry.CIRCULAR_REFS_IN_JSON_SCHEMA, this); |
/// <reference path="../typings/main.d.ts" /> | ||
"use strict"; | ||
var raml_xml_validation_1 = require("raml-xml-validation"); | ||
var raml_xml_validation_2 = require("raml-xml-validation"); | ||
var _ = require("./utils"); | ||
@@ -489,3 +487,3 @@ var xmlUtil = require('./xmlUtil'); | ||
} | ||
reference = new raml_xml_validation_2.XMLSchemaReference(fullPath, index, patchedContent); | ||
reference = xmlUtil.createXmlSchemaReference(fullPath, index, patchedContent); | ||
references[fullPath] = reference; | ||
@@ -538,3 +536,3 @@ } | ||
var index = Object.keys(references).length; | ||
reference = new raml_xml_validation_2.XMLSchemaReference(fullPath, index, patchedContent); | ||
reference = xmlUtil.createXmlSchemaReference(fullPath, index, patchedContent); | ||
references[fullPath] = reference; | ||
@@ -563,3 +561,3 @@ refElement.setAttribute('schemaLocation', "file_" + reference.virtualIndex + ".xsd"); | ||
var patchedSchema = this.collectReferences(this.schemaString, this.provider.contextPath(), references); | ||
var validator = new raml_xml_validation_1.XMLValidator(patchedSchema); | ||
var validator = xmlUtil.getValidator(patchedSchema); | ||
if (this.provider.hasAsyncRequests()) { | ||
@@ -566,0 +564,0 @@ return; |
@@ -539,3 +539,6 @@ /// <reference path="../../typings/main.d.ts" /> | ||
parameters: any; | ||
private static CLASS_IDENTIFIER_ValidationError; | ||
constructor(messageEntry: any, parameters?: any); | ||
getClassIdentifier(): string[]; | ||
static isInstance(instance: any): instance is ValidationError; | ||
} | ||
@@ -542,0 +545,0 @@ export declare function setValidationPath(_s: tsInterfaces.IStatus, _c: tsInterfaces.IValidationPath): void; |
/// <reference path="../../typings/main.d.ts" /> | ||
import { XMLValidator } from "raml-xml-validation"; | ||
import { XMLValidator, XMLSchemaReference } from "raml-xml-validation"; | ||
export declare function createXmlSchemaReference(originalPath: string, virtualIndex: number, patchedContent: string): XMLSchemaReference; | ||
export declare function getValidator(arg: string): XMLValidator; | ||
export declare function jsonToXml(jsonObject: any): any; |
@@ -20,2 +20,10 @@ /// <reference path="../typings/main.d.ts" /> | ||
} | ||
function createXmlSchemaReference(originalPath, virtualIndex, patchedContent) { | ||
return { | ||
originalPath: originalPath, | ||
virtualIndex: virtualIndex, | ||
patchedContent: patchedContent | ||
}; | ||
} | ||
exports.createXmlSchemaReference = createXmlSchemaReference; | ||
function objectToXml(object) { | ||
@@ -22,0 +30,0 @@ if (!object) { |
{ | ||
"name": "raml-typesystem", | ||
"version": "0.0.64", | ||
"version": "0.0.65", | ||
"main": "dist/src/index.js", | ||
@@ -26,3 +26,3 @@ "scripts": { | ||
"raml-xml-validation": "0.0.11", | ||
"raml-json-validation": "0.0.11" | ||
"raml-json-validation": "0.0.12" | ||
}, | ||
@@ -29,0 +29,0 @@ "browser": { |
@@ -274,2 +274,6 @@ { | ||
}, | ||
"JOSN_EXAMPLE_VALIDATION_EXCEPTION" : { | ||
"code" : "JOSN_EXAMPLE_VALIDATION_EXCEPTION", | ||
"message": "Validating example against schema caused an exception: {{msg}}" | ||
}, | ||
"UNKNOWN_PROPERTY" : { | ||
@@ -371,2 +375,6 @@ "code" : "UNKNOWN_PROPERTY", | ||
}, | ||
"JSON_SCHEMA_VALIDATION_EXCEPTION" : { | ||
"code" : "JSON_SCHEMA_VALIDATION_EXCEPTION", | ||
"message": "Schema validation exception: {{msg}}" | ||
}, | ||
"REFERENCE_NOT_FOUND" : { | ||
@@ -373,0 +381,0 @@ "code" : "REFERENCE_NOT_FOUND", |
@@ -151,8 +151,2 @@ /// <reference path="../typings/main.d.ts" /> | ||
} | ||
if (e.message=="Cannot assign to read only property '__$validated' of object"){ | ||
return ts.ok(); | ||
} | ||
if (e.message=="Object.keys called on non-object"){ | ||
return ts.ok(); | ||
} | ||
if (e.message == "Maximum call stack size exceeded"){ | ||
@@ -159,0 +153,0 @@ return ts.error(messageRegistry.CIRCULAR_REFS_IN_JSON_SCHEMA,this); |
/// <reference path="../typings/main.d.ts" /> | ||
import {XMLValidator} from "raml-xml-validation"; | ||
import {XMLSchemaReference} from "raml-xml-validation"; | ||
@@ -668,3 +667,3 @@ | ||
reference = new XMLSchemaReference(fullPath, index, patchedContent); | ||
reference = xmlUtil.createXmlSchemaReference(fullPath, index, patchedContent); | ||
@@ -740,3 +739,3 @@ references[fullPath] = reference; | ||
reference = new XMLSchemaReference(fullPath, index, patchedContent); | ||
reference = xmlUtil.createXmlSchemaReference(fullPath, index, patchedContent); | ||
@@ -775,5 +774,5 @@ references[fullPath] = reference; | ||
var patchedSchema = this.collectReferences(this.schemaString, this.provider.contextPath(), references); | ||
var validator = new XMLValidator(patchedSchema); | ||
var validator = xmlUtil.getValidator(patchedSchema); | ||
if(this.provider.hasAsyncRequests()) { | ||
@@ -780,0 +779,0 @@ return; |
/// <reference path="../typings/main.d.ts" /> | ||
import {XMLValidator} from "raml-xml-validation"; | ||
import {XMLValidator, XMLSchemaReference} from "raml-xml-validation"; | ||
@@ -27,2 +27,10 @@ declare function require(s:string):any; | ||
export function createXmlSchemaReference(originalPath: string, virtualIndex: number, patchedContent: string): XMLSchemaReference { | ||
return { | ||
originalPath: originalPath, | ||
virtualIndex: virtualIndex, | ||
patchedContent: patchedContent | ||
} | ||
} | ||
function objectToXml(object: any) { | ||
@@ -29,0 +37,0 @@ if(!object) { |
@@ -6,3 +6,3 @@ { | ||
"gitUrl" : "https://github.com/raml-org/raml-js-parser-2.git", | ||
"gitBranch" : "hotfix-for-1.1.15", | ||
"gitBranch" : "hotfix-for-1.1.16", | ||
"installTypings" : true | ||
@@ -9,0 +9,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2236251
49092