oas-resolver
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -100,3 +100,2 @@ 'use strict'; | ||
if (typeof obj.$fixed !== 'undefined') delete obj.$fixed; | ||
if (!options.preserveMiro) delete obj['x-miro']; | ||
} | ||
@@ -430,2 +429,7 @@ }); | ||
} | ||
recurse(options.openapi,{},function(obj,key,state){ | ||
if (isRef(obj, key)) { | ||
if (!options.preserveMiro) delete obj['x-miro']; | ||
} | ||
}); | ||
res(options); | ||
@@ -432,0 +436,0 @@ } |
{ | ||
"name": "oas-resolver", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Resolve external $refs in OpenAPI (swagger) 2.0 / 3.x definitions", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "229b07984cc88bce1d40aa984c5f73eeac3acb1a" | ||
"gitHead": "fe58671de09ce25b7a7756d621746dfe57d0d9a0" | ||
} |
@@ -6,7 +6,8 @@ # oas-resolver | ||
```js | ||
const input = yaml.safeLoad(str,{json:true}); | ||
const yaml = require('yaml'); | ||
const input = yaml.parse(str); | ||
const source = url; // or filename | ||
resolver.resolve(input,source,options) | ||
.then(function(options){ | ||
fs.writeFileSync(outputFile,yaml.safeDump(options.openapi),'utf8'); | ||
fs.writeFileSync(outputFile,yaml.stringify(options.openapi),'utf8'); | ||
}) | ||
@@ -13,0 +14,0 @@ .catch(function(ex){ |
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
27120
514
19