swagger-har
v2.0.3
Published
A module that converts OpenAPI (aka Swagger) schema object into an array HAR request objects.
Downloads
47
Readme
swagger-har
IN DEVELOPMENT - API NOT STABLE
This module converts OpenAPI (aka Swagger) schemas object into an array of HAR request objects.
$ npm install swagger-har
const SwaggerHAR = require('swagger-har');
const options = {};
SwaggerHAR.toRequests( json, options, function( err, requestArr ){
// do something with requestArr
});
Options
const defaults = {
'useExamples': true,
'useDefaults': true,
'defaults': {
string: 'string',
integer: '0',
number: '0',
boolean: 'true',
file: 'filename.txt'
},
path: '/sum',
method: 'get'
};
Lab test
The project has integration and unit tests. To run the test within the project type one of the following commands.
$ lab
$ lab -r html -o coverage.html
$ lab -r html -o coverage.html --lint
$ lab -r console -o stdout -r html -o coverage.html --lint
Issues
If you find any issue please file here on github and I will try and fix them.