[](https://travis-ci.org/CuberL/easy-oas3-parser) [](https://coveralls.io/github/CuberL/easy-oas3-pars
npm install easy-oas3-parser



Install to your projects
`` sh`
yarn add easy-oas3-parser
` typescript
import Parser from 'easy-oas3-parser'
import * as fs from 'fs'
const schema = fs.readFileSync('example.json');
const schema_parsed = Parser(JSON.parse(schema.toString()))
// judge if it's an object
if (schema_parsed.isObject()) {
// get properties of this object type node
console.log(schema_parsed.properties);
// get node by path
console.log(schema_parsed.get('a.b.c'));
}
`
For more examples, take a look at /example`
- All cases need to be arranged if oneOf appears in allOf. But it's too complex. Only one oneOf is allowed in allOf for now.