mockstarjs
  • 关于 MockStar
  • 安装和升级
  • 快速上手
  • 非 CLI 方式
  • 技术细节
    • 基本概念
    • 整体架构
    • 为什么需要数据模拟
    • 如何做数据模拟
  • 配置
    • mockstar.config.js 配置
    • mocker 的 config.json 配置
    • mock module 的 config.json 配置
Powered by GitBook
On this page

Was this helpful?

  1. 配置

mock module 的 config.json 配置

Previousmocker 的 config.json 配置

Last updated 6 years ago

Was this helpful?

这些参数都不是必填的参数,可以根据需要进行配置。

字段名

类型

含义描述

name

String

名字,命名规范参考 ,默认为文件夹的文件名

description

String

简要描述

priority

Number

mock server管理端页面中的列表排序权重,值越大则会越靠前展示,默认值为 0

delay

Number

延时多久返回,如果是 0,则不做延时,单位为 ms

match

Object

匹配规则,请求中需要携带的额外数据,必须同时命中这个匹配规则,才算匹配了这个 mockModule

package.json#name