# swagger2har **Repository Path**: mirrors_kong/swagger2har ## Basic Information - **Project Name**: swagger2har - **Description**: Generate HAR objects from Swagger specs. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # swagger2har 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 install ``` ## Usage Using as a ES module: ```js import { swagger2har } from 'swagger2har'; import swaggerJSON from 'your-swagger-api.json'; // e.g. http://petstore.swagger.io/v2/swagger.json swagger2har(swaggerJSON); ``` To create HAR Request object for one path and method pair described in a given swagger use createHar directly ```js import { createHar } from 'swagger2har'; import swaggerJSON from 'your-swagger-api.json'; // e.g. http://petstore.swagger.io/v2/swagger.json createHar(swaggerJSON, '/pet/findByTags', 'get', 'http://petstore.swagger.io'); ``` ## Testing ```bash yarn test ```