0.0.4 • Published 1 year ago

postman-rings v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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/

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago