{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Dev Proxy MockResponsePlugin mocks", "description": "Mocks for the Dev Proxy MockResponsePlugin", "type": "object", "properties": { "$schema": { "type": "string", "description": "The JSON schema reference for validation." }, "mocks": { "type": "array", "description": "Array of mock definitions.", "items": { "type": "object", "properties": { "request": { "type": "object", "description": "The request to match.", "properties": { "url": { "type": "string", "description": "The URL to match. Supports wildcards." }, "method": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE" ], "description": "HTTP method to match." }, "nth": { "type": "integer", "description": "(Optional) Match the nth occurrence of the request." }, "bodyFragment": { "type": "string", "description": "(Optional) A fragment of the request body to match." } }, "required": [ "url" ] }, "response": { "type": "object", "description": "The response to return.", "properties": { "body": { "type": [ "object", "array", "string" ], "description": "The response body (object, array, or string; can reference a file with '@filename')." }, "statusCode": { "type": "integer", "description": "HTTP status code to return." }, "headers": { "type": "array", "description": "Array of response headers (name/value pairs).", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Header name." }, "value": { "type": "string", "description": "Header value." } }, "required": [ "name", "value" ] } } } } }, "required": [ "request", "response" ] } } }, "required": [ "mocks" ], "additionalProperties": false }