{
  "openapi": "3.1.0",
  "info": {
    "title": "FastMock Admin API",
    "description": "Manage stubs, inspect and verify the request journal, import API descriptions, record traffic and control chaos rules. All routes live on the admin listener under `/__admin` and need `Authorization: Bearer <token>`. Errors use `{\"error\": \"...\", \"details\": [...]}`.",
    "license": {
      "name": "Apache-2.0",
      "identifier": "Apache-2.0"
    },
    "version": "0.1.0"
  },
  "paths": {
    "/__admin/async-mocks": {
      "get": {
        "tags": [
          "asyncapi"
        ],
        "summary": "List async mocks",
        "operationId": "listAsyncMocks",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Async mocks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncMockList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/async-mocks/{id}": {
      "get": {
        "tags": [
          "asyncapi"
        ],
        "summary": "One async mock",
        "operationId": "getAsyncMock",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Async mock id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The async mock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncMock"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "asyncapi"
        ],
        "summary": "Create or replace an async mock",
        "operationId": "putAsyncMock",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Async mock id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AsyncMock"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created or replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncMock"
                }
              }
            }
          },
          "400": {
            "description": "Invalid async mock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "asyncapi"
        ],
        "summary": "Delete an async mock",
        "operationId": "deleteAsyncMock",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Async mock id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/async-mocks/{id}/trigger": {
      "post": {
        "tags": [
          "asyncapi"
        ],
        "summary": "Publish the next example now",
        "operationId": "triggerAsyncMock",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Async mock id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One message published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResult"
                }
              }
            }
          },
          "400": {
            "description": "The topic is not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "502": {
            "description": "Publishing to Kafka failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/audit": {
      "get": {
        "tags": [
          "audit"
        ],
        "summary": "Audit log of admin changes",
        "description": "Newest first. Stub updates carry the changed fields (`changes`), deletes the removed stub (`before`); secrets are masked. Needs the admin role.",
        "operationId": "listAudit",
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "description": "Exact action, or a prefix ending in `*` (for example `stub.*`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "principal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the admin role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/callbacks": {
      "get": {
        "tags": [
          "callbacks"
        ],
        "summary": "List callback deliveries",
        "description": "Newest first. Sensitive headers and body fields are masked.",
        "operationId": "listCallbacks",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "correlation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "pending, sent or failed",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Callback jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "callbacks"
        ],
        "summary": "Delete all callback jobs, including pending ones",
        "operationId": "clearCallbacks",
        "responses": {
          "200": {
            "description": "Number of deleted jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedCount"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/chaos": {
      "get": {
        "tags": [
          "chaos"
        ],
        "summary": "Active chaos rules",
        "operationId": "getChaos",
        "responses": {
          "200": {
            "description": "Rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChaosBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "chaos"
        ],
        "summary": "Replace the chaos rules",
        "operationId": "putChaos",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChaosBody"
              },
              "example": {
                "rules": [
                  {
                    "id": "slow-orders",
                    "pathPrefix": "/orders",
                    "probability": 0.2,
                    "delay": {
                      "fixedMs": 1500
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Rules stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChaosSetResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "chaos"
        ],
        "summary": "Remove every chaos rule",
        "operationId": "clearChaos",
        "responses": {
          "204": {
            "description": "Cleared"
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/contract-tests": {
      "get": {
        "tags": [
          "contract-tests"
        ],
        "summary": "List contract test runs",
        "operationId": "listContractTests",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Runs, newest first, without per-operation results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractRunList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "contract-tests"
        ],
        "summary": "Start a contract test run",
        "operationId": "startContractTest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractTestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "The run started in the background",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractTestStarted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role, or the admin role when secretHeaders is set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "specRef not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many runs in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/contract-tests/{id}": {
      "get": {
        "tags": [
          "contract-tests"
        ],
        "summary": "One contract test run with results",
        "operationId": "getContractTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Run id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run with per-operation results. Viewers get verdicts, statuses and counts only (`detailsHidden: true`): request and response excerpts, message excerpts and error texts are reserved to editors.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractRun"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "contract-tests"
        ],
        "summary": "Delete a contract test run",
        "operationId": "deleteContractTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Run id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/export": {
      "get": {
        "tags": [
          "stubs"
        ],
        "summary": "Export stubs in import format",
        "operationId": "exportStubs",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stubs without server-managed fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/files": {
      "get": {
        "tags": [
          "files"
        ],
        "summary": "List stored body files",
        "operationId": "listFiles",
        "responses": {
          "200": {
            "description": "Files, sorted by name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/files/{name}": {
      "get": {
        "tags": [
          "files"
        ],
        "summary": "Download a body file",
        "description": "Returns the raw content with the stored content type, as an attachment.",
        "operationId": "getFile",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "File name, may contain `/`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Raw file content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "minimum": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "files"
        ],
        "summary": "Upload or replace a body file",
        "description": "The raw request body is the file content (at most 10 MiB); `Content-Type` is stored with it and becomes the default response content type for stubs using `response.bodyFileName`.",
        "operationId": "putFile",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "File name: [A-Za-z0-9._-/], at most 512 bytes, no `..`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Too many files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "File larger than 10 MiB"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "files"
        ],
        "summary": "Delete a body file",
        "operationId": "deleteFile",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "File name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/grpc/descriptors": {
      "get": {
        "tags": [
          "grpc"
        ],
        "summary": "Uploaded descriptor sets and the services they serve",
        "operationId": "listGrpcDescriptors",
        "responses": {
          "200": {
            "description": "Descriptor sets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrpcDescriptorList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/grpc/descriptors/{name}": {
      "put": {
        "tags": [
          "grpc"
        ],
        "summary": "Upload a binary FileDescriptorSet",
        "description": "Produce it with `protoc --include_imports --descriptor_set_out=set.pb`. At most 16 MiB. A set that redefines services of another set with incompatible messages is rejected with 409.",
        "operationId": "putGrpcDescriptor",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Descriptor set name, [A-Za-z0-9-_.:/]{1,128}",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrpcDescriptor"
                }
              }
            }
          },
          "400": {
            "description": "Not a valid FileDescriptorSet or invalid name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Conflicts with another descriptor set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "grpc"
        ],
        "summary": "Delete a descriptor set",
        "operationId": "deleteGrpcDescriptor",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Descriptor set name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such descriptor set"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Import any supported document, detecting its format",
        "description": "Send the document itself as the body (JSON, YAML, XML or GraphQL SDL). Detected: OpenAPI 3, WireMock mappings, MockServer expectations, Postman collections, HAR, AsyncAPI, GraphQL SDL, WSDL, SoapUI projects and Microcks APIExamples. A format without a converter in this build answers 415. Options go into the query string.",
        "operationId": "importAuto",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "description": "Tag for the generated stubs (default: the detected format name; for GraphQL, WSDL, SoapUI and Microcks the service id).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replace",
            "in": "query",
            "description": "Delete stubs carrying the tag first (default true).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "Only return the generated stubs.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Force a format instead of detecting it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The document itself: JSON, YAML, XML or GraphQL SDL. The content type is not needed for detection.",
          "content": {
            "application/graphql": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/yaml": {
              "schema": {
                "type": "string"
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            },
            "text/xml": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result; AsyncAPI documents answer like `POST /import/asyncapi`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid document, tag or option",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "415": {
            "description": "Unknown format, or no converter for the detected format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/asyncapi": {
      "post": {
        "tags": [
          "asyncapi"
        ],
        "summary": "Import an AsyncAPI document",
        "operationId": "importAsyncApi",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportAsyncApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Dry run: what would be created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportAsyncApiResponse"
                }
              }
            }
          },
          "201": {
            "description": "Async mocks and WebSocket stubs created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportAsyncApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "The document is not a supported AsyncAPI document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/graphql": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from a GraphQL schema (SDL)",
        "description": "One stub per Query and Mutation field, matching requests whose root field is that field and answering `{\"data\": {<field>: <example>}}`. Examples from a Microcks APIExamples document become higher-priority stubs matching the request variables.",
        "operationId": "importGraphQl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GraphQlImport"
              },
              "example": {
                "schema": "# microcksId: Movie Graph API : 1.0\ntype Query { film(id: ID!): Film }\ntype Film { id: ID! title: String }",
                "path": "/graphql"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid schema, examples or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/har": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from a HAR 1.2 capture",
        "description": "Each distinct request (method, path, query, body) becomes a stub replaying the first recorded response. Failed entries are skipped; sensitive headers, query parameters and body fields never reach the stubs.",
        "operationId": "importHar",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HarImport"
              },
              "example": {
                "har": {
                  "log": {
                    "version": "1.2",
                    "entries": [
                      {
                        "request": {
                          "method": "GET",
                          "url": "https://api.example.com/users/7"
                        },
                        "response": {
                          "status": 200,
                          "headers": [],
                          "content": {
                            "mimeType": "application/json",
                            "text": "{\"id\":7}"
                          }
                        }
                      }
                    ]
                  }
                },
                "tag": "browser",
                "mimeTypes": [
                  "application/json"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Not a HAR document, invalid filters or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/microcks": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Apply a Microcks APIExamples or APIMetadata document to an imported service",
        "description": "The service is found by `metadata.name` and `metadata.version`. APIExamples add example stubs (tag `<service tag>:examples`, replaced on re-import). APIMetadata adds labels and per-operation delay and dispatcher overrides; for OpenAPI services the stubs are regenerated with the overrides, which are kept across re-imports.",
        "operationId": "importMicrocks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MicrocksImport"
              },
              "example": {
                "document": "apiVersion: mocks.microcks.io/v1alpha1\nkind: APIMetadata\nmetadata:\n  name: API Pastry - 2.0\n  version: 2.0.0\n  labels: {team: pastry}\noperations:\n  'GET /pastry/{name}':\n    delay: 100\n"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "The service named by the document is not imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/mockserver": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Convert MockServer expectations into stubs",
        "description": "Accepts one expectation, an array of expectations, or `{\"expectations\": ..., \"tag\": ..., \"replace\": ..., \"dryRun\": ...}`. Query parameters override the wrapper fields. Velocity and JavaScript templates and class callbacks are never executed: such expectations are skipped with a warning.",
        "operationId": "importMockServer",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "description": "Tag added to every stub (default `mockserver`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replace",
            "in": "query",
            "description": "Delete the stubs that already carry the tag first (default true).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "Convert and validate only; nothing is stored.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MockServerImportBody"
              },
              "example": {
                "expectations": [
                  {
                    "httpRequest": {
                      "method": "GET",
                      "path": "/ping"
                    },
                    "httpResponse": {
                      "statusCode": 200,
                      "body": "pong"
                    },
                    "times": {
                      "remainingTimes": 1
                    }
                  }
                ],
                "tag": "legacy"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid document or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/openapi": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from an OpenAPI 3 document",
        "operationId": "importOpenApi",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenApiImport"
              },
              "example": {
                "spec": "openapi: 3.0.3\ninfo: {title: Pets, version: '1'}\npaths: {}",
                "tag": "petstore"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid document or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/postman": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from a Postman collection",
        "description": "Every saved example response becomes a stub: method, path (`:id` and unresolved `{{var}}` segments become path parameters), enabled query parameters and, when a request has several examples, its raw body. `{{var}}` is resolved from collection and folder variables; folders become tags. Requests without saved examples are skipped with a warning. Response bodies are not templated.",
        "operationId": "importPostman",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostmanImport"
              },
              "example": {
                "collection": {
                  "info": {
                    "name": "Shop",
                    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
                  },
                  "variable": [
                    {
                      "key": "baseUrl",
                      "value": "https://api.example.com"
                    }
                  ],
                  "item": [
                    {
                      "name": "Get user",
                      "request": {
                        "method": "GET",
                        "url": "{{baseUrl}}/users/:id"
                      },
                      "response": [
                        {
                          "name": "ok",
                          "code": 200,
                          "header": [
                            {
                              "key": "Content-Type",
                              "value": "application/json"
                            }
                          ],
                          "body": "{\"id\": 1}"
                        }
                      ]
                    }
                  ]
                },
                "tag": "shop"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Not a Postman v2 collection, invalid tag or invalid stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/soapui": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from a SoapUI project (Microcks' SOAP format)",
        "description": "Mock operations and responses become stubs matched on SOAPAction (SOAP 1.1) or the content-type action (SOAP 1.2) and the body root element. Dispatch styles: SEQUENCE and RANDOM become response lists, XPATH and QUERY_MATCH become XPath body matchers; SCRIPT is never executed (warning, default response).",
        "operationId": "importSoapUi",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SoapImport"
              },
              "example": {
                "document": "<con:soapui-project xmlns:con=\"http://eviware.com/soapui/config\" name=\"Hello\">...</con:soapui-project>"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/wiremock": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Convert WireMock mappings into stubs",
        "description": "Unsupported parts come back as warnings.",
        "operationId": "importWireMock",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WireMockImport"
              },
              "example": {
                "mappings": {
                  "mappings": [
                    {
                      "request": {
                        "method": "GET",
                        "url": "/ping"
                      },
                      "response": {
                        "status": 200,
                        "body": "pong"
                      }
                    }
                  ]
                },
                "tag": "legacy"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid mappings or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/import/wsdl": {
      "post": {
        "tags": [
          "imports"
        ],
        "summary": "Generate stubs from a WSDL 1.1 document",
        "description": "One stub per operation and SOAP binding (1.1 and 1.2) answering an envelope generated from the XSD of the output message. Faults become disabled alternative stubs.",
        "operationId": "importWsdl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SoapImport"
              },
              "example": {
                "document": "<wsdl:definitions xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">...</wsdl:definitions>",
                "version": "1.0"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid WSDL or tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/info": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Server information and the caller's identity",
        "operationId": "info",
        "responses": {
          "200": {
            "description": "Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/kv/{key}": {
      "get": {
        "tags": [
          "kv"
        ],
        "summary": "Read a key from the shared key-value store",
        "operationId": "getKv",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Key, 1..512 bytes",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KvValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "kv"
        ],
        "summary": "Write a key",
        "operationId": "putKv",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Key, 1..512 bytes",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KvBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Stored"
          },
          "400": {
            "description": "Invalid key, value or TTL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "kv"
        ],
        "summary": "Delete a key",
        "operationId": "deleteKv",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Key, 1..512 bytes",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such key"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/plugins": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Enabled provider plugins",
        "operationId": "listPlugins",
        "responses": {
          "200": {
            "description": "Plugins",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/recordings": {
      "get": {
        "tags": [
          "recordings"
        ],
        "summary": "Active recording, if any",
        "operationId": "recordingStatus",
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingStatus"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/recordings/snapshot": {
      "post": {
        "tags": [
          "recordings"
        ],
        "summary": "Turn journal entries into stubs (WireMock snapshot)",
        "description": "Selects journal entries (newest 10000 passing `source`, `since`, `matched`; then `ids` and `request`), oldest first, and converts each distinct request into a stub with the recorded status and body. The journal keeps redacted, size-limited bodies, so secrets never reach the generated stubs; truncated bodies are reported as warnings.",
        "operationId": "snapshotRecording",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnapshotBody"
              },
              "example": {
                "filters": {
                  "request": {
                    "urlPathPattern": "/api/.*"
                  },
                  "since": "2026-01-01T00:00:00Z"
                },
                "captureHeaders": [
                  "accept"
                ],
                "repeatsAsScenarios": true,
                "persist": true,
                "outputFormat": "IDS",
                "tag": "snap-1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Generated stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filters or a generated stub is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/recordings/start": {
      "post": {
        "tags": [
          "recordings"
        ],
        "summary": "Proxy unmatched requests to a target and record them as stubs",
        "operationId": "startRecording",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordingStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Recording started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or blocked target URL, invalid tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/recordings/stop": {
      "post": {
        "tags": [
          "recordings"
        ],
        "summary": "Stop recording",
        "operationId": "stopRecording",
        "responses": {
          "200": {
            "description": "Recording stopped",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingStopResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests": {
      "get": {
        "tags": [
          "requests"
        ],
        "summary": "Query the request journal",
        "description": "Newest first. Headers, query parameters and bodies are stored redacted.",
        "operationId": "listRequests",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "description": "`stubs` for the generic engine, otherwise a plugin name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pathPrefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "correlation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bodyContains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "matched",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stubId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Journal entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "requests"
        ],
        "summary": "Clear the request journal",
        "operationId": "clearRequests",
        "responses": {
          "200": {
            "description": "Number of deleted entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedCount"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/count": {
      "get": {
        "tags": [
          "requests"
        ],
        "summary": "Count journal entries",
        "operationId": "countRequests",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "description": "`stubs` for the generic engine, otherwise a plugin name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pathPrefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "correlation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bodyContains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "matched",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stubId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "requests"
        ],
        "summary": "Count journal entries (filter in the body)",
        "operationId": "countRequestsByFilter",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalFilter"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/find": {
      "post": {
        "tags": [
          "verification"
        ],
        "summary": "Find journal entries matching a request pattern",
        "description": "The body is a stub `request` pattern (WireMock `POST /__admin/requests/find`). The newest 10000 entries passing `source`, `since` and the pattern's method are scanned.",
        "operationId": "findRequests",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "description": "Only entries of this source (`stubs` or a plugin name).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Only entries at or after this instant (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of entries to return (default 100).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPattern"
              },
              "example": {
                "method": "POST",
                "urlPath": "/orders",
                "body": [
                  {
                    "jsonPath": "$.amount",
                    "value": {
                      "matches": "[0-9]+"
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Matching entries, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoundRequests"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "The scan exceeds FASTMOCK_JOURNAL_SCAN_MAX_WORK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/near-misses": {
      "post": {
        "tags": [
          "requests"
        ],
        "summary": "Explain why a request does not match",
        "description": "Returns the five closest stubs with the matchers that failed.",
        "operationId": "nearMisses",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NearMissBody"
              },
              "example": {
                "method": "GET",
                "path": "/users/7",
                "headers": {
                  "accept": "application/json"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Closest stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NearMissList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "The request to explain exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/remove": {
      "post": {
        "tags": [
          "requests"
        ],
        "summary": "Delete journal entries matching a request pattern",
        "operationId": "removeRequests",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "description": "Only entries of this source (`stubs` or a plugin name).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Only entries at or after this instant (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of entries to return (default 100).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPattern"
              },
              "example": {
                "urlPathPattern": "/health.*"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Deleted entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemovedRequests"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "The scan exceeds FASTMOCK_JOURNAL_SCAN_MAX_WORK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/unmatched": {
      "get": {
        "tags": [
          "requests"
        ],
        "summary": "Requests that no stub matched",
        "description": "Same as `GET /requests?matched=false`; use `POST /requests/near-misses` to see why one did not match.",
        "operationId": "listUnmatchedRequests",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "maximum": 10000,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unmatched entries, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/requests/{id}": {
      "get": {
        "tags": [
          "requests"
        ],
        "summary": "One journal entry",
        "operationId": "getRequest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Journal entry id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntry"
                }
              }
            }
          },
          "400": {
            "description": "Invalid id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/reset": {
      "post": {
        "tags": [
          "system"
        ],
        "summary": "Clear the journal, callbacks and scenario states",
        "description": "Stubs are kept. Needs the admin role.",
        "operationId": "reset",
        "responses": {
          "200": {
            "description": "What was cleared",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the admin role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/scenarios": {
      "get": {
        "tags": [
          "scenarios"
        ],
        "summary": "Current scenario states",
        "operationId": "listScenarios",
        "responses": {
          "200": {
            "description": "Scenarios",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "scenarios"
        ],
        "summary": "Reset every scenario to Started",
        "operationId": "resetScenarios",
        "responses": {
          "200": {
            "description": "Number of reset scenarios",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetCount"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/scenarios/{name}": {
      "put": {
        "tags": [
          "scenarios"
        ],
        "summary": "Set a scenario state",
        "operationId": "setScenarioState",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Scenario name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StateBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "State set"
          },
          "400": {
            "description": "Name or state too long",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/services": {
      "get": {
        "tags": [
          "services"
        ],
        "summary": "List imported APIs and services",
        "operationId": "listServices",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Only services of this type (REST, SOAP, GRAPHQL, EVENT, GRPC, GENERIC).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "Only services carrying this label, as `key=value` or `key`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive substring of the service name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Services, most recently imported first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/services/{id}": {
      "get": {
        "tags": [
          "services"
        ],
        "summary": "One service with its operations and stub ids",
        "operationId": "getService",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Service id (`<name>:<version>` slug)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Unknown service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "services"
        ],
        "summary": "Delete a service, its stubs and its stored document",
        "operationId": "deleteService",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Service id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedService"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Unknown service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/services/{id}/spec": {
      "get": {
        "tags": [
          "services"
        ],
        "summary": "The OpenAPI or AsyncAPI document the service was imported from",
        "operationId": "getServiceSpec",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Service id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stored document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredSpec"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Unknown service or no stored document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/settings": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Read the global response settings",
        "description": "Global delays applied to every stub response and the proxy pass-through switch.",
        "operationId": "getSettings",
        "responses": {
          "200": {
            "description": "Current settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalSettings"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "system"
        ],
        "summary": "Replace the global response settings",
        "description": "`fixedDelayMs` is used when a stub has no delay of its own; `delay` is added to every stub response; `proxyPassThrough: false` stops proxy stubs from forwarding (they answer 404). Every replica applies the change within 2 seconds.",
        "operationId": "putSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlobalSettings"
              },
              "example": {
                "fixedDelayMs": 100,
                "delay": {
                  "lognormal": {
                    "medianMs": 80,
                    "sigma": 0.4
                  }
                },
                "proxyPassThrough": true
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stored settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs": {
      "get": {
        "tags": [
          "stubs"
        ],
        "summary": "List stubs",
        "description": "Newest first. Filters combine with AND; `q` searches the name and the URL path fields case-insensitively. Viewers see credentials masked: sensitive headers, query, form and JSON keys, cookies, basic auth passwords and secrets inside bodies, callbacks, proxies and messages.",
        "operationId": "listStubs",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StubList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "stubs"
        ],
        "summary": "Create a stub",
        "operationId": "createStub",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Stub"
              },
              "example": {
                "name": "get user",
                "request": {
                  "method": "GET",
                  "urlPathTemplate": "/users/{id}"
                },
                "response": {
                  "status": 200,
                  "jsonBody": {
                    "id": "{{request.pathParams.id}}"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stub"
                }
              }
            }
          },
          "400": {
            "description": "Invalid stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "A stub with this id exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "stubs"
        ],
        "summary": "Delete stubs by tag, or all stubs",
        "description": "Without `tag` every stub is deleted, which needs the admin role.",
        "operationId": "deleteStubs",
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Number of deleted stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedCount"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role, or admin without a tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/counters": {
      "get": {
        "tags": [
          "stubs"
        ],
        "summary": "List the shared stub counters",
        "description": "Counters behind `times` and response sequences, shared by all replicas.",
        "operationId": "listStubCounters",
        "responses": {
          "200": {
            "description": "Counters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StubCounterList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "stubs"
        ],
        "summary": "Reset `times` and response sequence counters",
        "operationId": "resetStubCounters",
        "responses": {
          "200": {
            "description": "Number of counters removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "reset": 3
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/find-by-metadata": {
      "post": {
        "tags": [
          "stubs"
        ],
        "summary": "Find stubs by metadata (WireMock compatible)",
        "operationId": "findStubsByMetadata",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataPattern"
              },
              "example": {
                "matchesJsonPath": "$.service",
                "equalTo": "billing"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Matching stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StubList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/import": {
      "post": {
        "tags": [
          "stubs"
        ],
        "summary": "Bulk import FastMock stubs",
        "description": "With `replaceTag`, stubs carrying that tag are deleted first and the tag is added to every imported stub, in one transaction. At most 10000 stubs.",
        "operationId": "importStubs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/remove-by-metadata": {
      "post": {
        "tags": [
          "stubs"
        ],
        "summary": "Delete stubs by metadata (WireMock compatible)",
        "operationId": "removeStubsByMetadata",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataPattern"
              },
              "example": {
                "matchesJsonPath": "$.service",
                "equalTo": "billing"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Deleted stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedIds"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/unused": {
      "get": {
        "tags": [
          "stubs"
        ],
        "summary": "Stubs that no journal entry matched",
        "description": "Computed from the request journal, so the answer only covers the journal retention window.",
        "operationId": "listUnusedStubs",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "Only journal entries at or after this instant (RFC 3339) count as hits.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unused stubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StubList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/validate": {
      "post": {
        "tags": [
          "stubs"
        ],
        "summary": "Validate a stub without saving it",
        "operationId": "validateStub",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Stub"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Validation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationResult"
                }
              }
            }
          },
          "400": {
            "description": "Not a stub document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/stubs/{id}": {
      "get": {
        "tags": [
          "stubs"
        ],
        "summary": "Get one stub",
        "operationId": "getStub",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stub id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stub"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "stubs"
        ],
        "summary": "Create or replace a stub",
        "description": "The id in the path wins over an id in the body. The audit log records the changed fields.",
        "operationId": "putStub",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stub id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Stub"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stub"
                }
              }
            }
          },
          "400": {
            "description": "Invalid stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "stubs"
        ],
        "summary": "Delete a stub",
        "operationId": "deleteStub",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stub id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "stubs"
        ],
        "summary": "Partially update a stub (JSON merge patch)",
        "description": "RFC 7396 JSON merge patch applied to the stored stub: objects merge, `null` removes a field, arrays and scalars replace. The id cannot change.",
        "operationId": "patchStub",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stub id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "enabled": false,
                "response": {
                  "status": 503
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Patched stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stub"
                }
              }
            }
          },
          "400": {
            "description": "Patch produces an invalid stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Requires the editor role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "No such stub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/verify": {
      "post": {
        "tags": [
          "verification"
        ],
        "summary": "Verify how often a request was received",
        "description": "Counts journal entries matching `request` (a stub request pattern). Without `count`/`exactly`/`atLeast`/`atMost` the expectation is `atLeast: 1`. Answers 200 when the expectation holds and 422 with the actual count and the closest non-matching requests when it does not.",
        "operationId": "verify",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyBody"
              },
              "example": {
                "request": {
                  "method": "POST",
                  "urlPath": "/orders"
                },
                "exactly": 1
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Expectation met",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern or expectation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Expectation not met (`VerifyResult`), or the scan exceeds FASTMOCK_JOURNAL_SCAN_MAX_WORK (`ErrorBody`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResult"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/verify/sequence": {
      "post": {
        "tags": [
          "verification"
        ],
        "summary": "Verify that requests arrived in a given order",
        "description": "MockServer-style sequence verification over the newest 10000 journal entries passing `source` and `since`. Answers 200 when every pattern was matched by a later request than the previous one, otherwise 422.",
        "operationId": "verifySequence",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySequenceBody"
              },
              "example": {
                "requests": [
                  {
                    "method": "POST",
                    "urlPath": "/login"
                  },
                  {
                    "method": "GET",
                    "urlPath": "/profile"
                  },
                  {
                    "method": "POST",
                    "urlPath": "/logout"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sequence found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SequenceResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Sequence not found (`SequenceResult`), or the scan exceeds FASTMOCK_JOURNAL_SCAN_MAX_WORK (`ErrorBody`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SequenceResult"
                }
              }
            }
          },
          "503": {
            "description": "Too many journal scans are running, or the scan exceeded FASTMOCK_JOURNAL_SCAN_TIMEOUT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/__admin/version": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Build version",
        "operationId": "version",
        "responses": {
          "200": {
            "description": "Version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "This OpenAPI document",
        "description": "Served on the admin listener without authentication; it contains no data.",
        "operationId": "getOpenApiSpec",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {}
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiKind": {
        "type": "string",
        "enum": [
          "REST",
          "SOAP",
          "GRAPHQL",
          "EVENT",
          "GRPC",
          "GENERIC"
        ]
      },
      "ArtifactImportResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportResult"
          },
          {
            "type": "object",
            "properties": {
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Catalog id of the imported or updated service (absent on a dry run)."
              }
            }
          }
        ]
      },
      "AsyncMessage": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "payload": {}
        },
        "additionalProperties": false
      },
      "AsyncMock": {
        "type": "object",
        "required": [
          "name",
          "channel",
          "messages"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "protocol": {
            "$ref": "#/components/schemas/AsyncProtocol"
          },
          "channel": {
            "type": "string"
          },
          "operation": {
            "type": [
              "string",
              "null"
            ]
          },
          "service": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncMessage"
            }
          },
          "frequencyMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "templated": {
            "type": "boolean"
          },
          "contentType": {
            "type": [
              "string",
              "null"
            ]
          },
          "avroSchema": {},
          "payloadSchema": {},
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "AsyncMockList": {
        "type": "object",
        "required": [
          "asyncMocks"
        ],
        "properties": {
          "asyncMocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncMock"
            }
          }
        }
      },
      "AsyncProtocol": {
        "type": "string",
        "enum": [
          "kafka",
          "ws"
        ]
      },
      "AuditEvent": {
        "type": "object",
        "required": [
          "at",
          "principal",
          "role",
          "action",
          "detail"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "principal": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "detail": {}
        }
      },
      "AuditList": {
        "type": "object",
        "required": [
          "events"
        ],
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            }
          }
        }
      },
      "AutoImportResult": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ImportResult"
          },
          {
            "$ref": "#/components/schemas/ImportAsyncApiResponse"
          }
        ]
      },
      "BasicAuth": {
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "BodyMatcher": {
        "type": "object",
        "properties": {
          "equalTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "equalToJson": {},
          "ignoreExtraElements": {
            "type": "boolean"
          },
          "ignoreExtraArrayItems": {
            "type": "boolean",
            "description": "equalToJson: an actual array may hold more items than the expected one (WireMock\n`ignoreExtraElements`, MockServer `ONLY_MATCHING_FIELDS`)."
          },
          "contains": {
            "type": [
              "string",
              "null"
            ]
          },
          "matches": {
            "type": [
              "string",
              "null"
            ]
          },
          "jsonPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "jsonPathDialect": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JsonPathDialect",
                "description": "JSONPath dialect: `rfc9535` (default) or `jayway` (WireMock: `=~`, `in`, `nin`, `length()`,\nfilters applied to objects)."
              }
            ]
          },
          "value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "valueBody": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BodyMatcher",
                "description": "A body matcher applied to each node selected by jsonPath or xpath; objects and arrays are matched as\ntheir JSON text (WireMock `matchesJsonPath` with `equalToJson`, `matchesJsonSchema`, `equalToXml`)."
              }
            ]
          },
          "jsonSchema": {},
          "xpath": {
            "type": [
              "string",
              "null"
            ]
          },
          "xpathNamespaces": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "equalToXml": {
            "type": [
              "string",
              "null"
            ]
          },
          "exemptedComparisons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enablePlaceholders": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "ignoreArrayOrder": {
            "type": "boolean"
          },
          "binaryEqualTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "absent": {
            "type": "boolean"
          },
          "negate": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BulkImportResult": {
        "type": "object",
        "required": [
          "imported",
          "removed"
        ],
        "properties": {
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "removed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CallbackDef": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "jsonBody": {},
          "delay": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Delay"
              }
            ]
          },
          "maxAttempts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "correlation": {
            "type": [
              "string",
              "null"
            ]
          },
          "hmac": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HmacSignature"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "CallbackJob": {
        "type": "object",
        "required": [
          "id",
          "source",
          "url",
          "method",
          "headers",
          "body",
          "dueAt",
          "attempts",
          "maxAttempts",
          "status",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "correlation": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "attempts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "maxAttempts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "$ref": "#/components/schemas/CallbackStatus"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastStatus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "sentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "traceparent": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CallbackList": {
        "type": "object",
        "required": [
          "callbacks"
        ],
        "properties": {
          "callbacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackJob"
            }
          }
        }
      },
      "CallbackStatus": {
        "type": "string",
        "enum": [
          "pending",
          "sent",
          "failed"
        ]
      },
      "ChaosBody": {
        "type": "object",
        "required": [
          "rules"
        ],
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChaosRule"
            }
          }
        }
      },
      "ChaosRule": {
        "type": "object",
        "required": [
          "id",
          "probability"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "pathPrefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "probability": {
            "type": "number",
            "format": "double"
          },
          "delay": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Delay"
              }
            ]
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "fault": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Fault"
              }
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ChaosSetResult": {
        "type": "object",
        "required": [
          "rules"
        ],
        "properties": {
          "rules": {
            "type": "integer",
            "description": "Number of active rules.",
            "minimum": 0
          }
        }
      },
      "ChunkedDribbleDelay": {
        "type": "object",
        "required": [
          "numberOfChunks",
          "totalDurationMs"
        ],
        "properties": {
          "numberOfChunks": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "totalDurationMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CompanionArtifact": {
        "type": "object",
        "required": [
          "kind",
          "importedAt",
          "importedBy"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "example": "APIExamples"
          },
          "importedAt": {
            "type": "string",
            "format": "date-time"
          },
          "importedBy": {
            "type": "string"
          }
        }
      },
      "ContractRun": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "status",
          "startedAt",
          "startedBy",
          "summary"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "service": {
            "type": [
              "string",
              "null"
            ]
          },
          "specRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "targetUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "startedBy": {
            "type": "string"
          },
          "summary": {
            "$ref": "#/components/schemas/RunSummary"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationResult"
            }
          },
          "detailsHidden": {
            "type": "boolean",
            "description": "True when request/response excerpts, message excerpts and error texts were removed because\nthe caller is a viewer."
          }
        }
      },
      "ContractRunList": {
        "type": "object",
        "required": [
          "runs"
        ],
        "properties": {
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractRun"
            }
          }
        }
      },
      "ContractTestRequest": {
        "type": "object",
        "properties": {
          "spec": {
            "type": [
              "object",
              "null"
            ]
          },
          "specRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "targetUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "secretHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "timeoutMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "messageCount": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "waitMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "fromBeginning": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ContractTestStarted": {
        "type": "object",
        "required": [
          "id",
          "status",
          "kind",
          "operations"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "kind": {
            "type": "string"
          },
          "operations": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CountResult": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "DateTruncation": {
        "type": "string",
        "enum": [
          "first second of minute",
          "first minute of hour",
          "first hour of day",
          "first day of month",
          "first day of next month",
          "last day of month",
          "first day of year",
          "first day of next year",
          "last day of year"
        ]
      },
      "Delay": {
        "type": "object",
        "properties": {
          "fixedMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "minMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "maxMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "lognormal": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LogNormalDelay"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "DeletedCount": {
        "type": "object",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "DeletedIds": {
        "type": "object",
        "required": [
          "deleted",
          "ids"
        ],
        "properties": {
          "deleted": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DeletedService": {
        "type": "object",
        "required": [
          "id",
          "deletedStubs"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "deletedStubs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "required": [
          "error",
          "details"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "stub not found"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ExportResult": {
        "type": "object",
        "required": [
          "stubs"
        ],
        "properties": {
          "stubs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stub"
            }
          }
        }
      },
      "Fault": {
        "type": "string",
        "enum": [
          "EMPTY_RESPONSE",
          "MALFORMED_JSON",
          "CONNECTION_RESET",
          "RANDOM_DATA_THEN_CLOSE",
          "MALFORMED_RESPONSE_CHUNK"
        ]
      },
      "FileInfo": {
        "type": "object",
        "required": [
          "name",
          "contentType",
          "size"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "users/42.json"
          },
          "contentType": {
            "type": "string",
            "example": "application/json"
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "FileList": {
        "type": "object",
        "required": [
          "total",
          "files"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            }
          }
        }
      },
      "FoundRequests": {
        "type": "object",
        "required": [
          "requests",
          "total"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntry"
            }
          },
          "total": {
            "type": "integer",
            "description": "All matching entries in the scanned window (may exceed `requests.len()`).",
            "minimum": 0
          }
        }
      },
      "GlobalSettings": {
        "type": "object",
        "properties": {
          "fixedDelayMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "delay": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Delay"
              }
            ]
          },
          "proxyPassThrough": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GraphQlImport": {
        "type": "object",
        "required": [
          "schema"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "description": "GraphQL SDL. A `# microcksId: <name> : <version>` comment names the service."
          },
          "examples": {
            "type": [
              "object",
              "null"
            ],
            "description": "Optional Microcks APIExamples (YAML/JSON text or object) with examples per query or mutation."
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tag for the generated stubs (default: the service id)."
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Endpoint path (default `/graphql`)."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "replace": {
            "type": "boolean"
          },
          "dryRun": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GraphQlMatcher": {
        "type": "object",
        "properties": {
          "operationName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "query": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "rootField": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "GrpcDescriptor": {
        "type": "object",
        "required": [
          "name",
          "services"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fully qualified service names."
          }
        }
      },
      "GrpcDescriptorList": {
        "type": "object",
        "required": [
          "descriptors",
          "loadedServices"
        ],
        "properties": {
          "descriptors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrpcDescriptor"
            }
          },
          "loadedServices": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "HarImport": {
        "type": "object",
        "required": [
          "har"
        ],
        "properties": {
          "har": {
            "type": "object",
            "description": "HAR 1.2 document as a JSON object or JSON text."
          },
          "tag": {
            "type": "string"
          },
          "replace": {
            "type": "boolean"
          },
          "dryRun": {
            "type": "boolean"
          },
          "mimeTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keep only entries whose response MIME type starts with one of these, e.g. `application/json`."
          },
          "hosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keep only entries for these hosts."
          },
          "captureHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Response headers to keep besides content-type (sensitive ones are always dropped)."
          }
        },
        "additionalProperties": false
      },
      "HeaderValues": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ],
        "description": "One header value, or an array of values sent as separate header lines (for example `Set-Cookie`)."
      },
      "HmacAlgorithm": {
        "type": "string",
        "enum": [
          "sha256",
          "sha512"
        ]
      },
      "HmacSignature": {
        "type": "object",
        "required": [
          "header",
          "secretRef"
        ],
        "properties": {
          "header": {
            "type": "string"
          },
          "secretRef": {
            "type": "string"
          },
          "algorithm": {
            "$ref": "#/components/schemas/HmacAlgorithm"
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoding": {
            "$ref": "#/components/schemas/SignatureEncoding"
          }
        },
        "additionalProperties": false
      },
      "ImportAsyncApiRequest": {
        "type": "object",
        "required": [
          "spec"
        ],
        "properties": {
          "spec": {
            "type": "object"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "dryRun": {
            "type": "boolean"
          },
          "frequencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "pathPrefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "topicNaming": {
            "$ref": "#/components/schemas/TopicNaming",
            "description": "Kafka topic names: `channel` (default, the channel address) or `microcks`\n(`<service>-<version>-<channel>`, as Microcks publishes)."
          }
        },
        "additionalProperties": false
      },
      "ImportAsyncApiResponse": {
        "type": "object",
        "required": [
          "dryRun",
          "tag",
          "asyncMocks",
          "websocketStubs",
          "warnings"
        ],
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "tag": {
            "type": "string"
          },
          "asyncMocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncMock"
            }
          },
          "websocketStubs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stub"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ImportBody": {
        "type": "object",
        "required": [
          "stubs"
        ],
        "properties": {
          "stubs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stub"
            }
          },
          "replaceTag": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ImportResult": {
        "type": "object",
        "required": [
          "imported",
          "removed",
          "warnings"
        ],
        "properties": {
          "imported": {
            "type": "integer",
            "description": "Stubs saved (0 on a dry run).",
            "minimum": 0
          },
          "removed": {
            "type": "integer",
            "format": "int64",
            "description": "Stubs deleted because they carried the replaced tag.",
            "minimum": 0
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dryRun": {
            "type": "boolean"
          },
          "stubs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Stub"
            },
            "description": "The generated stubs, only on a dry run."
          }
        }
      },
      "InfoResponse": {
        "type": "object",
        "required": [
          "name",
          "version",
          "storage",
          "uptimeSeconds",
          "stubsLoaded",
          "plugins",
          "principal",
          "authDisabled"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "storage": {
            "type": "string",
            "description": "`memory` or `postgres+valkey`"
          },
          "uptimeSeconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "stubsLoaded": {
            "type": "integer",
            "minimum": 0
          },
          "plugins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PluginInfo"
            }
          },
          "principal": {
            "$ref": "#/components/schemas/Principal"
          },
          "authDisabled": {
            "type": "boolean"
          }
        }
      },
      "JournalEntry": {
        "type": "object",
        "required": [
          "at",
          "source",
          "method",
          "path",
          "query",
          "headers",
          "body",
          "status",
          "responseBody",
          "matched",
          "durationMs"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "responseBody": {
            "type": "string"
          },
          "stubId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "correlation": {
            "type": [
              "string",
              "null"
            ]
          },
          "matched": {
            "type": "boolean"
          },
          "durationMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "traceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "JournalFilter": {
        "type": "object",
        "properties": {
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "pathPrefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "correlation": {
            "type": [
              "string",
              "null"
            ]
          },
          "bodyContains": {
            "type": [
              "string",
              "null"
            ]
          },
          "matched": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "stubId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "JournalNearMiss": {
        "type": "object",
        "required": [
          "requestId",
          "at",
          "method",
          "path",
          "score",
          "mismatches"
        ],
        "properties": {
          "requestId": {
            "type": "integer",
            "format": "int64"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Share of the pattern's matchers that matched, 0..1."
          },
          "mismatches": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "JsonPathDialect": {
        "type": "string",
        "enum": [
          "rfc9535",
          "jayway"
        ]
      },
      "KvBody": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "string",
            "example": "42"
          },
          "ttlSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "maximum": 31536000,
            "minimum": 1
          }
        }
      },
      "KvValue": {
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "LogNormalDelay": {
        "type": "object",
        "required": [
          "medianMs",
          "sigma"
        ],
        "properties": {
          "medianMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "sigma": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "MessageDef": {
        "type": "object",
        "required": [
          "topic"
        ],
        "properties": {
          "topic": {
            "type": "string"
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          },
          "jsonValue": {},
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "avroSchema": {}
        },
        "additionalProperties": false
      },
      "MessageRecord": {
        "type": "object",
        "required": [
          "partition",
          "offset",
          "excerpt",
          "errors"
        ],
        "properties": {
          "partition": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "excerpt": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MetadataPattern": {
        "type": "object",
        "properties": {
          "matchesJsonPath": {
            "type": [
              "object",
              "null"
            ]
          },
          "equalTo": {
            "type": [
              "object",
              "null"
            ]
          },
          "contains": {
            "type": [
              "string",
              "null"
            ]
          },
          "matches": {
            "type": [
              "string",
              "null"
            ]
          },
          "equalToJson": {
            "type": [
              "object",
              "null"
            ]
          },
          "ignoreExtraElements": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MicrocksImport": {
        "type": "object",
        "required": [
          "document"
        ],
        "properties": {
          "document": {
            "type": "object",
            "description": "An APIExamples or APIMetadata document (YAML/JSON text or object)."
          },
          "dryRun": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MockServerImport": {
        "type": "object",
        "required": [
          "expectations"
        ],
        "properties": {
          "expectations": {
            "type": "object",
            "description": "One expectation or an array of expectations."
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "replace": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dryRun": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "MockServerImportBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MockServerImport"
          },
          {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {},
              "propertyNames": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          }
        ],
        "description": "One expectation, an array of expectations, or the wrapper with `expectations`."
      },
      "MultipartMatcher": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BodyMatcher"
            }
          }
        },
        "additionalProperties": false
      },
      "MultipartMatchingType": {
        "type": "string",
        "enum": [
          "ANY",
          "ALL"
        ]
      },
      "NearMissBody": {
        "type": "object",
        "required": [
          "method",
          "path"
        ],
        "properties": {
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "query": {
            "type": [
              "string",
              "null"
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "NearMissDoc": {
        "type": "object",
        "required": [
          "stubId",
          "score",
          "mismatches"
        ],
        "properties": {
          "stubId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Share of matchers that matched, 0..1."
          },
          "mismatches": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "NearMissList": {
        "type": "object",
        "required": [
          "nearMisses"
        ],
        "properties": {
          "nearMisses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NearMissDoc"
            }
          }
        }
      },
      "OpenApiImport": {
        "type": "object",
        "required": [
          "spec",
          "tag"
        ],
        "properties": {
          "spec": {
            "type": "object",
            "description": "OpenAPI 3 document as a JSON object or as JSON/YAML text."
          },
          "tag": {
            "type": "string",
            "example": "petstore"
          },
          "validateRequests": {
            "type": "boolean"
          },
          "pathPrefix": {
            "type": "string"
          },
          "replace": {
            "type": "boolean"
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      },
      "OperationMeta": {
        "type": "object",
        "properties": {
          "delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "dispatcher": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatcherRules": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OperationResult": {
        "type": "object",
        "required": [
          "operation",
          "verdict",
          "errors",
          "durationMs"
        ],
        "properties": {
          "operation": {
            "type": "string"
          },
          "example": {
            "type": [
              "string",
              "null"
            ]
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          },
          "request": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RequestRecord"
              }
            ]
          },
          "response": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResponseRecord"
              }
            ]
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageRecord"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "durationMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "OutputFormat": {
        "type": "string",
        "enum": [
          "FULL",
          "IDS"
        ]
      },
      "PluginInfo": {
        "type": "object",
        "required": [
          "name",
          "description",
          "mount",
          "admin"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "mount": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          }
        }
      },
      "PluginList": {
        "type": "object",
        "required": [
          "plugins"
        ],
        "properties": {
          "plugins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PluginInfo"
            }
          }
        }
      },
      "PostmanImport": {
        "type": "object",
        "required": [
          "collection"
        ],
        "properties": {
          "collection": {
            "type": "object",
            "description": "Postman Collection v2.1 (or v2.0) as a JSON object or JSON text."
          },
          "tag": {
            "type": "string"
          },
          "replace": {
            "type": "boolean",
            "description": "Delete stubs carrying `tag` first (default true)."
          },
          "dryRun": {
            "type": "boolean",
            "description": "Only return the generated stubs."
          }
        },
        "additionalProperties": false
      },
      "Principal": {
        "type": "object",
        "required": [
          "name",
          "role"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        }
      },
      "ProxyDef": {
        "type": "object",
        "required": [
          "baseUrl"
        ],
        "properties": {
          "baseUrl": {
            "type": "string"
          },
          "additionalHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "removeHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stripPrefix": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Recording": {
        "type": "object",
        "required": [
          "targetBaseUrl",
          "tag"
        ],
        "properties": {
          "targetBaseUrl": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "captureHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requestHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startedBy": {
            "type": "string"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RecordingStart": {
        "type": "object",
        "required": [
          "targetBaseUrl",
          "tag"
        ],
        "properties": {
          "targetBaseUrl": {
            "type": "string",
            "example": "https://api.example.com"
          },
          "tag": {
            "type": "string",
            "example": "recorded-api"
          },
          "captureHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Response headers to keep in recorded stubs (content-type is always kept)."
          },
          "requestHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Request headers to add as matchers."
          }
        }
      },
      "RecordingStatus": {
        "type": "object",
        "properties": {
          "recording": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Recording"
              }
            ]
          }
        }
      },
      "RecordingStopResult": {
        "type": "object",
        "required": [
          "stopped",
          "recordedStubs"
        ],
        "properties": {
          "stopped": {
            "type": "boolean"
          },
          "recordedStubs": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "RemovedRequests": {
        "type": "object",
        "required": [
          "deleted",
          "ids"
        ],
        "properties": {
          "deleted": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "RequestList": {
        "type": "object",
        "required": [
          "requests",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntry"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RequestPattern": {
        "type": "object",
        "properties": {
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "urlPattern": {
            "type": [
              "string",
              "null"
            ]
          },
          "urlPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "urlPathPattern": {
            "type": [
              "string",
              "null"
            ]
          },
          "urlPathTemplate": {
            "type": [
              "string",
              "null"
            ]
          },
          "pathParams": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "query": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BodyMatcher"
            }
          },
          "graphql": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GraphQlMatcher"
              }
            ]
          },
          "cookies": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "host": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "scheme": {
            "type": [
              "string",
              "null"
            ]
          },
          "basicAuth": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BasicAuth"
              }
            ]
          },
          "formParameters": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "multipart": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MultipartMatcher"
            }
          },
          "multipartMatchingType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MultipartMatchingType"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "RequestRecord": {
        "type": "object",
        "required": [
          "method",
          "url",
          "headers"
        ],
        "properties": {
          "method": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ResetCount": {
        "type": "object",
        "required": [
          "reset"
        ],
        "properties": {
          "reset": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ResetResult": {
        "type": "object",
        "required": [
          "requests",
          "callbacks",
          "scenarios"
        ],
        "properties": {
          "requests": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "callbacks": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "scenarios": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ResponseDef": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "headers": {
            "type": "object",
            "description": "Header values: a string, or an array of strings sent as separate header lines.",
            "additionalProperties": {
              "$ref": "#/components/schemas/HeaderValues"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "jsonBody": {},
          "base64Body": {
            "type": [
              "string",
              "null"
            ]
          },
          "templated": {
            "type": "boolean"
          },
          "delay": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Delay"
              }
            ]
          },
          "fault": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Fault"
              }
            ]
          },
          "proxy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProxyDef"
              }
            ]
          },
          "sse": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/SseEvent"
            }
          },
          "websocket": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WebSocketDef"
              }
            ]
          },
          "bodyFileName": {
            "type": [
              "string",
              "null"
            ]
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "chunkedDribbleDelay": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ChunkedDribbleDelay"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ResponseMode": {
        "type": "string",
        "enum": [
          "sequential",
          "cycle",
          "random"
        ]
      },
      "ResponseRecord": {
        "type": "object",
        "required": [
          "status",
          "bodyExcerpt",
          "bodyBytes"
        ],
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "contentType": {
            "type": [
              "string",
              "null"
            ]
          },
          "bodyExcerpt": {
            "type": "string"
          },
          "bodyBytes": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "Role": {
        "type": "string",
        "enum": [
          "viewer",
          "editor",
          "admin"
        ]
      },
      "RunStatus": {
        "type": "string",
        "enum": [
          "running",
          "passed",
          "failed",
          "error"
        ]
      },
      "RunSummary": {
        "type": "object",
        "required": [
          "total",
          "passed",
          "failed",
          "errors"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "passed": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "errors": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ScenarioList": {
        "type": "object",
        "required": [
          "scenarios"
        ],
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioState"
            }
          }
        }
      },
      "ScenarioRule": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "requiredState": {
            "type": [
              "string",
              "null"
            ]
          },
          "newState": {
            "type": [
              "string",
              "null"
            ]
          },
          "ttlSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ScenarioState": {
        "type": "object",
        "required": [
          "name",
          "state"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "SequenceResult": {
        "type": "object",
        "required": [
          "verified",
          "matched",
          "requestIds",
          "details"
        ],
        "properties": {
          "verified": {
            "type": "boolean"
          },
          "matched": {
            "type": "integer",
            "description": "Number of patterns found in order.",
            "minimum": 0
          },
          "requestIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Journal ids of the requests that satisfied the patterns, in order."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Service": {
        "type": "object",
        "required": [
          "id",
          "name",
          "version",
          "type",
          "sourceFormat",
          "operations",
          "importedAt",
          "importedBy"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "api-pastry-2.0:2.0.0"
          },
          "name": {
            "type": "string",
            "example": "API Pastry - 2.0"
          },
          "version": {
            "type": "string",
            "example": "2.0.0"
          },
          "type": {
            "$ref": "#/components/schemas/ApiKind"
          },
          "sourceFormat": {
            "type": "string",
            "example": "openapi"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceOperation"
            }
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "importedAt": {
            "type": "string",
            "format": "date-time"
          },
          "importedBy": {
            "type": "string"
          },
          "hasSpec": {
            "type": "boolean"
          },
          "importOptions": {
            "type": [
              "object",
              "null"
            ]
          },
          "overrides": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ServiceOverrides"
              }
            ]
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanionArtifact"
            }
          }
        }
      },
      "ServiceList": {
        "type": "object",
        "required": [
          "services"
        ],
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          }
        }
      },
      "ServiceOperation": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "GET /pastry/{name}"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "stubIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ServiceOverrides": {
        "type": "object",
        "properties": {
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "operations": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OperationMeta"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "SignatureEncoding": {
        "type": "string",
        "enum": [
          "hex",
          "base64"
        ]
      },
      "SnapshotBody": {
        "type": "object",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/SnapshotFilters"
          },
          "captureHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Request headers to add as `equalTo` matchers (sensitive ones become `matches: .+`)."
          },
          "repeatsAsScenarios": {
            "type": "boolean",
            "description": "Turn repeated identical requests with different responses into a scenario."
          },
          "persist": {
            "type": "boolean",
            "description": "Save the stubs (default true); false only returns them."
          },
          "outputFormat": {
            "$ref": "#/components/schemas/OutputFormat"
          },
          "tag": {
            "type": "string",
            "description": "Tag added to every generated stub, next to `recorded`."
          }
        },
        "additionalProperties": false
      },
      "SnapshotFilters": {
        "type": "object",
        "properties": {
          "request": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RequestPattern",
                "description": "Only entries matching this request pattern."
              }
            ]
          },
          "ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Only these journal entry ids."
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "matched": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Only matched (true) or unmatched (false) entries."
          }
        },
        "additionalProperties": false
      },
      "SnapshotResult": {
        "type": "object",
        "required": [
          "persisted",
          "warnings"
        ],
        "properties": {
          "persisted": {
            "type": "boolean"
          },
          "stubs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Stub"
            },
            "description": "Generated stubs (outputFormat FULL)."
          },
          "ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Generated stub ids (outputFormat IDS)."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SoapImport": {
        "type": "object",
        "required": [
          "document"
        ],
        "properties": {
          "document": {
            "type": "string",
            "description": "The SoapUI project XML (`/import/soapui`) or the WSDL 1.1 document (`/import/wsdl`)."
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tag for the generated stubs (default: the service id)."
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Endpoint path; default: the mock service path (SoapUI) or the port address path (WSDL)."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "mockService": {
            "type": [
              "string",
              "null"
            ],
            "description": "SoapUI only: which mock service to import when the project has several."
          },
          "replace": {
            "type": "boolean"
          },
          "dryRun": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SseEvent": {
        "type": "object",
        "properties": {
          "event": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "data": {
            "type": "string"
          },
          "delayMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "StateBody": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "example": "Paid"
          }
        }
      },
      "StoredSpec": {
        "type": "object",
        "required": [
          "name",
          "version",
          "type",
          "document"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ApiKind"
          },
          "document": {
            "type": "object"
          }
        }
      },
      "StringMatcher": {
        "type": "object",
        "properties": {
          "equalTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "contains": {
            "type": [
              "string",
              "null"
            ]
          },
          "matches": {
            "type": [
              "string",
              "null"
            ]
          },
          "doesNotMatch": {
            "type": [
              "string",
              "null"
            ]
          },
          "absent": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "caseInsensitive": {
            "type": "boolean"
          },
          "and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StringMatcher"
            }
          },
          "or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StringMatcher"
            }
          },
          "not": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "before": {
            "type": [
              "string",
              "null"
            ]
          },
          "after": {
            "type": [
              "string",
              "null"
            ]
          },
          "equalToDateTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "actualFormat": {
            "type": [
              "string",
              "null"
            ]
          },
          "truncateExpected": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTruncation"
              }
            ]
          },
          "truncateActual": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTruncation"
              }
            ]
          },
          "hasExactly": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/StringMatcher"
            }
          },
          "includes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/StringMatcher"
            }
          },
          "allValues": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/StringMatcher"
            },
            "description": "Every value of a multi-valued parameter must match at least one of these matchers, and at least one\nvalue must be present (MockServer `keyMatchStyle: MATCHING_KEY`)."
          }
        },
        "additionalProperties": false
      },
      "Stub": {
        "type": "object",
        "required": [
          "request"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "order": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tie-breaker between stubs of equal priority: the lower value is tried first. A stub with an `order`\nis placed before stubs without one, and URL specificity is not used for it. Set by the WireMock\n(newest wins) and MockServer (oldest wins) importers."
          },
          "request": {
            "$ref": "#/components/schemas/RequestPattern"
          },
          "response": {
            "$ref": "#/components/schemas/ResponseDef"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponseDef"
            }
          },
          "responseMode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResponseMode"
              }
            ]
          },
          "times": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ttlSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "scenario": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScenarioRule"
              }
            ]
          },
          "callbacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackDef"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageDef"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata": {},
          "enabled": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "StubCounter": {
        "type": "object",
        "required": [
          "kind",
          "stubId",
          "count"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "`times` (matches counted against `times`) or `seq` (position in `responses`)."
          },
          "stubId": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "StubCounterList": {
        "type": "object",
        "required": [
          "total",
          "counters"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "counters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StubCounter"
            }
          }
        }
      },
      "StubList": {
        "type": "object",
        "required": [
          "total",
          "offset",
          "stubs"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "stubs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stub"
            }
          }
        }
      },
      "TopicNaming": {
        "type": "string",
        "description": "How Kafka topics are named: after the channel (default) or as Microcks does,\n`<service name without spaces and dashes>-<version>-<channel with / replaced by ->`.",
        "enum": [
          "channel",
          "microcks"
        ]
      },
      "TriggerResult": {
        "type": "object",
        "required": [
          "id",
          "topic",
          "partition",
          "offset"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "topic": {
            "type": "string"
          },
          "partition": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ValidationResult": {
        "type": "object",
        "required": [
          "valid"
        ],
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Verdict": {
        "type": "string",
        "enum": [
          "passed",
          "failed",
          "error"
        ]
      },
      "VerifyBody": {
        "type": "object",
        "required": [
          "request"
        ],
        "properties": {
          "request": {
            "$ref": "#/components/schemas/RequestPattern"
          },
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Exactly this many matching requests.",
            "minimum": 0
          },
          "exactly": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Same as `count` (MockServer and WireMock wording); give only one of them.",
            "minimum": 0
          },
          "atLeast": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "atMost": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "VerifyResult": {
        "type": "object",
        "required": [
          "verified",
          "count",
          "expected",
          "details",
          "nearMisses"
        ],
        "properties": {
          "verified": {
            "type": "boolean"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Matching requests found.",
            "minimum": 0
          },
          "expected": {
            "type": "string",
            "description": "The expectation, e.g. `exactly 2`, `at least 1`, `between 1 and 3`."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nearMisses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalNearMiss"
            },
            "description": "Closest non-matching requests (only on failure)."
          }
        }
      },
      "VerifySequenceBody": {
        "type": "object",
        "required": [
          "requests"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestPattern"
            },
            "description": "Patterns that must have been received in this order (other requests may come in between). 1..50."
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "VersionResponse": {
        "type": "object",
        "required": [
          "version",
          "features"
        ],
        "properties": {
          "version": {
            "type": "string",
            "example": "0.1.0"
          },
          "gitSha": {
            "type": [
              "string",
              "null"
            ],
            "description": "Commit the binary was built from, when the build set `FASTMOCK_GIT_SHA`."
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compiled-in optional features and capabilities."
          }
        }
      },
      "WebSocketDef": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WsMessage"
            }
          },
          "onMessage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WsReply"
            }
          },
          "echo": {
            "type": "boolean"
          },
          "repeat": {
            "type": "boolean"
          },
          "closeAfterMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "maxMessages": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "WireMockImport": {
        "type": "object",
        "required": [
          "mappings"
        ],
        "properties": {
          "mappings": {
            "type": "object",
            "description": "`{\"mappings\": [...]}`, an array of mappings or a single mapping."
          },
          "tag": {
            "type": "string"
          },
          "replace": {
            "type": "boolean"
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      },
      "WsMessage": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string"
          },
          "delayMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "WsReply": {
        "type": "object",
        "properties": {
          "match": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StringMatcher"
              }
            ]
          },
          "reply": {
            "type": [
              "string",
              "null"
            ]
          },
          "close": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Admin token from FASTMOCK_ADMIN_TOKENS. GET/HEAD and read-only POSTs need viewer, other changes editor; deleting all stubs, reset and the audit log need admin."
      }
    }
  },
  "tags": [
    {
      "name": "stubs",
      "description": "Create, change, search and export stubs"
    },
    {
      "name": "requests",
      "description": "Request journal"
    },
    {
      "name": "verification",
      "description": "Verify that requests were (not) received"
    },
    {
      "name": "callbacks",
      "description": "Outgoing callback deliveries"
    },
    {
      "name": "scenarios",
      "description": "Stateful scenarios"
    },
    {
      "name": "kv",
      "description": "Shared key-value store"
    },
    {
      "name": "files",
      "description": "Body files referenced by `response.bodyFileName`"
    },
    {
      "name": "imports",
      "description": "Generate stubs from API descriptions and traffic captures"
    },
    {
      "name": "recordings",
      "description": "Record and play back real traffic"
    },
    {
      "name": "chaos",
      "description": "Probabilistic faults and delays"
    },
    {
      "name": "grpc",
      "description": "gRPC descriptor sets"
    },
    {
      "name": "audit",
      "description": "Audit log"
    },
    {
      "name": "system",
      "description": "Server information"
    },
    {
      "name": "asyncapi",
      "description": "AsyncAPI import and async mocks that publish to Kafka"
    },
    {
      "name": "contract-tests",
      "description": "Contract tests of real services against OpenAPI and AsyncAPI documents"
    },
    {
      "name": "services"
    }
  ]
}
