Swagger Faker
Swagger Faker is a tool which can help you generate fake data from your swagger.json file, then it will start a mock server automatically with the generated fake data.
How to Use
- Install
npm i swagger-faker -g
- Init config file by command:
swagger-faker init
Then it will generate a config file swagger-faker.config.json in current path, update that config file:
{
"sourcePaths": ["./source/openapi.json"],
"outputFolder": "mock-server",
"timeout": 180000,
"port": 8081
}
- sourcePaths:
required, put your swagger/openapi file path here - outputFolder:
optional - timeout:
optional, - port:
optional
- Generate fake data
swagger-faker gen
- Start the mock server
swagger-faker run
Examples
git clone https://github.com/reeli/swagger-faker-examples.git
cd swagger-faker-examples
npm install
npm start
Then you’ll see:
- A
mock-serverfolder has been generated in your current path, and all mock data is setting inmock-server/datafolder, you can customize them if needed. - A mock server has been started in
http://localhost:8081, you can open your browser and visit one of the mock API byhttp://localhost:8081/api/v2/store/order/1(The mock data is setting in:mock-server/data/getOrderById.json)
Swagger Faker
Project Details
- Pingtouges/swagger-faker
- Last Updated: 9/11/2022
Recomended MCP Servers
Interface for AI agents to use your astrophotography setup using N.I.N.A advanced api
Enhanced MCP server with unrestricted system access capabilities
MCP Server for segmented revenue and congress trading
NOVA MCP is a MCP that leverages NOVA for prompt security
MCP server to manage letta server and comunicate with agents
基于 MCP 协议的腾讯云 COS MCP Server,无需编码即可让大模型快速接入腾讯云存储 (COS) 和数据万象 (CI) 能力。
Playground create my first MCP (Model Context Protocol) server
Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE...
MCP server for Delve debugger integration
这是一个金融领域相关的mcp,里面包含了金融数据查询、财经新闻查询、国家统计局数据查询等





