
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
swagger-mock-file-generator
Advanced tools
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
npm i swagger-mock-file-generator;
require('swagger-mock-file-generator')(<swaggerFile>, <mockFile>[, callback])
Notice: mockFile must be a JSON format.
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!
FAQs
A generator of mock file base on swagger yaml or JSON
The npm package swagger-mock-file-generator receives a total of 6 weekly downloads. As such, swagger-mock-file-generator popularity was classified as not popular.
We found that swagger-mock-file-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.