JSPM

openapi-http-smoke-cli

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q40017F
    • License MIT

    Generic OpenAPI HTTP smoke runner with JSON and HTML reports

    Package Exports

    • openapi-http-smoke-cli
    • openapi-http-smoke-cli/dist/cli.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openapi-http-smoke-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    openapi-http-smoke-cli

    Generic CLI to run HTTP smoke checks from an OpenAPI/Swagger spec.

    It executes API operations, prints live status in console, and saves:

    • JSON report
    • HTML report

    Install

    npm i -D openapi-http-smoke-cli

    Or run without installing (after publish):

    npx openapi-http-smoke-cli --help

    Usage

    After package installation:

    npx openapi-http-smoke --base-url http://localhost:3002 --spec openapi.json --token "<JWT>"

    Without installation (one-off run):

    npx openapi-http-smoke-cli --base-url http://localhost:3002 --spec openapi.json --token "<JWT>"

    Options

    • --base-url <url> Base URL for API requests (default: http://localhost:<SERVICE_PORT|3000>)
    • --spec <path> OpenAPI file path (default: openapi.json)
    • --token, -t <token> Auth token
    • --auth-header <name> Header name for token (default: Authorization)
    • --auth-scheme <scheme> Token scheme prefix (default: Bearer)
    • --timeout-ms <number> Request timeout in ms (default: 15000)
    • --report <path> JSON report path (default: reports/http-smoke-generic-latest.json)
    • --html-report <path> HTML report path (default: reports/http-smoke-generic-latest.html)
    • --fail-fast Stop on first failed request

    package.json example in service project

    {
      "scripts": {
        "http:smoke": "openapi-http-smoke --base-url http://localhost:3002 --spec openapi.json"
      }
    }

    Publish

    npm run build
    npm publish --access public

    For private registry, use your org registry config and publish as private package.