postman-rings

0.0.4 • Public • Published

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

Example documentation page

https://lamerat.github.io/Postman-Ring/

Readme

Keywords

none

Package Sidebar

Install

npm i postman-rings

Weekly Downloads

0

Version

0.0.4

License

ISC

Unpacked Size

50.6 kB

Total Files

12

Last publish

Collaborators

  • sea_flanker