{
  "$id": "https://json.schemastore.org/httpmockrc.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A tool for mock local requests or proxy remote requests.",
  "properties": {
    "mockFileName": {
      "default": "mocks",
      "type": "string",
      "description": "Root of mock files"
    },
    "requestHeaders": {
      "type": "object",
      "description": "Custom request header"
    },
    "responseHeaders": {
      "type": "object",
      "description": "Custom response header"
    },
    "parseBody": {
      "type": "boolean",
      "description": "Parse post body by express.json()"
    },
    "routes": {
      "type": "object",
      "description": "Rules for proxy and mock",
      "patternProperties": {
        "^.*$": {
          "type": "object",
          "description": "Rule of Matching route",
          "properties": {
            "path": {
              "type": "string",
              "description": "Where Mock result file located"
            },
            "ignore": {
              "type": "boolean",
              "description": "Whether to ignore this rule, generally used for remote interfaces instead of mock in the local"
            },
            "delay": {
              "type": "number",
              "description": "How many milliseconds are delayed to return a request, general used for control the request sequence"
            },
            "validate": {
              "type": "object",
              "description": "Validate params in body by key and typeof value"
            }
          },
          "required": ["path"]
        }
      }
    }
  },
  "required": ["mockFileName", "routes"],
  "title": "Http-mocker configuration.",
  "type": "object"
}
