1.2.1 • Published 6 years ago

swagger-mock-file-generator v1.2.1

Weekly downloads
116
License
MIT
Repository
github
Last release
6 years ago

swagger-mock-file-generator

A generator of mock file base on swagger yaml or JSON,output swagger with mock data JSON file.

The mock data will pour into responses.[code].schema.example,if your original swagger file has already defined example,it will not change Spec: here

Install

npm i swagger-mock-file-generator;

API

require('swagger-mock-file-generator')(<swaggerFile>, <mockFile>[, callback])

Notice: mockFile must be a JSON format.

Example

var parser = require('swagger-mock-file-generator');
// swagger source file is both .yaml and .json is OK.
parser('./swagger.yaml','./swaggerWithMock.json', function(){
    console.log('mock json file created!')
});

This mocked file supports : https://github.com/whq731/swagger-express-middleware-with-chance and https://github.com/BigstickCarpet/swagger-express-middleware Free to choose!

1.2.1

6 years ago

1.2.0

6 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago