1.3.6 • Published 7 years ago

swagger-parser-js v1.3.6

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

swagger-parser-js

const swaggerJson = require('./path/to/your/swagger.json')
const Schema = require('swagger-parser-js')
const schema = new Schema(swaggerJson)

// get properties about the schema
schema.info()
schema.version()
schema.paths()
...
// you get it...

// the useful methods:
// returns an array of Operations
schema.operations()

// returns an array of Operations and also includes `consumes` and `produces` properties
schema.operationsWithRootInherited()

// returns a map of tags to an array of operations for that tag
schema.operationsWithTags()

// returns a map of tags to objects containing tag details and an array of operations
schema.taggedOperations()

// returns a map of tags to objects containing tag details and an array of operations
// each operation has an extra property `x-response-example`
schema.taggedOperationsWithExamples()

// TODO: document this way better
// use flow as documentation?
1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago