An open API service indexing awesome lists of open source software.

https://github.com/neuralegion/oas2har

Transform you Swagger/OAS spec files to a series of HAR request objects.
https://github.com/neuralegion/oas2har

har javascript oas swagger

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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.

* http://swagger.io/specification/
* http://www.softwareishard.com/blog/har-12-spec/#request

## Setup

```bash
npm i --save @neuralegion/oas2har
```

## Usage

Using as a ES module:
```js
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

```bash
npm run test
```