swagger-api-tester

1.1.0 • Public • Published

Build Status

swagger-api-tester

Create lightweight smoke tests against HTTP APIs using swagger docs to inform validations.

Example

'use strict'

const Tester = require('swagger-api-tester')

describe('My API', function () {
  const test = new Tester('http://petstore.swagger.io/v2/swagger.json')

  test.post('/pet', pet).respondsWith(200, 'Pet')
  test.put('/pet', pet).respondsWith(200)

  test.get('/pet/20').respondsWith(200)
})

/swagger-api-tester/

    Package Sidebar

    Install

    npm i swagger-api-tester

    Weekly Downloads

    4

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • diosmosis2