0.2.0 • Published 2 years ago

easy-oas3-parser v0.2.0

Weekly downloads
152
License
MIT
Repository
github
Last release
2 years ago

easy-oas3-parser

Build Status Coverage Status License Version

Installation

Install to your projects

yarn add easy-oas3-parser

Usage

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

Know issues

  • 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.
0.2.0

2 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.11

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.6

4 years ago