JSPM

  • Created
  • Published
  • Downloads 2025956
  • Score
    100M100P100Q201138F
  • License BSD-3-Clause

Resolve external $refs in OpenAPI (swagger) 2.0 / 3.x definitions

Package Exports

  • oas-resolver

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (oas-resolver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

oas-resolver

Usage

const input = yaml.safeLoad(str,{json:true});
const source = url; // or filename
resolver.resolve(input,source,options)
.then(function(options){
    fs.writeFileSync(outputFile,yaml.safeDump(options.openapi),'utf8');
})
.catch(function(ex){
  // ...
});

See here for complete documentation of the options object.