0.0.4 • Published 1 year ago
postman-rings v0.0.4
Postman-Ring
Create simple HTML documentation (swagger style) from Postman export JSON file
Remarks
- Library can't parse Markdown syntax from Postman descriptions
- Get data from Header, Query and Path parameters
- Work only with raw JSON body
- Recognized auth methods
- API key
- Authorization header
- Bearer token
- Basic auth
- Digest auth
Installation
npm i postman-rings
Usage
// ES6
import postman from 'postman-rings'
import fs from 'fs'
const file = JSON.parse(fs.readFileSync('./examplePostman.json').toString())
const html = postman(file, { version: '1.0.2' })
// No ES6
const postman = require('postman-rings')
const file = require('./examplePostman.json')
const html = postman(file, {version: '1.0.2'})
Syntax
postman(str {, options})
Options
- version: string - Add version number in badge after API name
- additionalAddresses: string - Add custom addresses to Address section
- additionalSections: { title: string, text: string } Add custom section(s) between Addresses and Endpoints section