Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
/ oas2har Public archive

Transform you Swagger/OAS spec files to a series of HAR request objects.

License

Notifications You must be signed in to change notification settings

NeuraLegion/oas2har

Repository files navigation

oas2har

THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk

Transform you Swagger OAI spec files to a series of HAR request objects.

Setup

npm i --save @neuralegion/oas2har

Usage

Using as a ES module:

import { oasToHarList } from '@neuralegion/oas2har';
import swaggerJSON from 'your-swagger-api.json'; // e.g. http://petstore.swagger.io/v2/swagger.json

oasToHarList(swaggerJSON)
  .then((har) => {
    console.log(har);
  });

Testing

npm run test