Skip to content

Commit

Permalink
docs: oas-resolver README update yaml syntax, refs #151 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Feb 17, 2019
1 parent 8964d38 commit 177438c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/oas-resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
## Usage

```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');
})
.catch(function(ex){
// ...
Expand Down

0 comments on commit 177438c

Please sign in to comment.