switch from json-schema-ref-parser's bundle method to dereference

This commit is contained in:
Mirko Lindner 2017-11-20 13:34:37 +08:00
parent 49695c62c9
commit 160a5315ca

View File

@ -44,7 +44,7 @@ export class SpecManager {
load(urlOrObject: string|Object) {
let promise = new Promise((resolve, reject) => {
this.parser = new JsonSchemaRefParser();
this.parser.bundle(urlOrObject, {http: {withCredentials: false}})
this.parser.dereference(urlOrObject, {http: {withCredentials: false}})
.then(schema => {
if (typeof urlOrObject === 'string') {
this.specUrl = urlOrObject;