1350 lines
35 KiB
YAML
1350 lines
35 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: HTTP Client App Internal API
|
|
version: 0.2.0
|
|
description: Internal REST API contract for the local HTTP Client application.
|
|
servers:
|
|
- url: http://127.0.0.1:32180
|
|
description: Local development server
|
|
paths:
|
|
/api/health:
|
|
get:
|
|
operationId: getHealth
|
|
tags: [system]
|
|
summary: Check local service health
|
|
responses:
|
|
"200":
|
|
description: Service is healthy.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/HealthEnvelope"
|
|
/api/parse:
|
|
post:
|
|
operationId: parseHttpFile
|
|
tags: [parser]
|
|
summary: Parse .http or .rest content into request blocks.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ParseRequest"
|
|
responses:
|
|
"200":
|
|
description: Parsed request blocks.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ParseEnvelope"
|
|
/api/files:
|
|
get:
|
|
operationId: listFiles
|
|
tags: [files]
|
|
parameters:
|
|
- name: root
|
|
in: query
|
|
schema:
|
|
type: string
|
|
default: "."
|
|
responses:
|
|
"200":
|
|
description: Workspace file index.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/FileListEnvelope"
|
|
/api/files/read:
|
|
post:
|
|
operationId: readFile
|
|
tags: [files]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/FileReadRequest"
|
|
responses:
|
|
"200":
|
|
description: File content and hash.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/FileReadEnvelope"
|
|
/api/files/save:
|
|
post:
|
|
operationId: saveFile
|
|
tags: [files]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/FileSaveRequest"
|
|
responses:
|
|
"200":
|
|
description: Saved file content hash.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/FileSaveEnvelope"
|
|
/api/environments:
|
|
get:
|
|
operationId: getEnvironments
|
|
tags: [environments]
|
|
parameters:
|
|
- name: workspace
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Workspace environments.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EnvironmentEnvelope"
|
|
post:
|
|
operationId: saveEnvironments
|
|
tags: [environments]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EnvironmentDocument"
|
|
responses:
|
|
"200":
|
|
description: Saved environments.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EnvironmentEnvelope"
|
|
/api/executions:
|
|
post:
|
|
operationId: createExecution
|
|
tags: [executions]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/CreateExecutionRequest"
|
|
responses:
|
|
"200":
|
|
description: Execution created or completed.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ExecutionEnvelope"
|
|
/api/executions/{executionId}:
|
|
get:
|
|
operationId: getExecution
|
|
tags: [executions]
|
|
parameters:
|
|
- $ref: "#/components/parameters/ExecutionId"
|
|
responses:
|
|
"200":
|
|
description: Execution snapshot.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ExecutionEnvelope"
|
|
/api/executions/{executionId}/cancel:
|
|
post:
|
|
operationId: cancelExecution
|
|
tags: [executions]
|
|
parameters:
|
|
- $ref: "#/components/parameters/ExecutionId"
|
|
responses:
|
|
"200":
|
|
description: Cancelled execution snapshot.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ExecutionEnvelope"
|
|
/api/executions/{executionId}/events:
|
|
get:
|
|
operationId: getExecutionEvents
|
|
tags: [executions]
|
|
parameters:
|
|
- $ref: "#/components/parameters/ExecutionId"
|
|
responses:
|
|
"200":
|
|
description: Execution event list.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EventListEnvelope"
|
|
/api/history:
|
|
get:
|
|
operationId: listExecutionHistory
|
|
tags: [executions]
|
|
responses:
|
|
"200":
|
|
description: Recent execution history.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ExecutionHistoryEnvelope"
|
|
/api/events:
|
|
get:
|
|
operationId: listGlobalEvents
|
|
tags: [events]
|
|
responses:
|
|
"200":
|
|
description: Global execution event list.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EventListEnvelope"
|
|
/api/events/sse:
|
|
get:
|
|
operationId: streamGlobalEventsSse
|
|
tags: [events]
|
|
responses:
|
|
"200":
|
|
description: Server-Sent Events stream of global execution events.
|
|
content:
|
|
text/event-stream:
|
|
schema:
|
|
type: string
|
|
/api/events/ws:
|
|
get:
|
|
operationId: streamGlobalEventsWebSocket
|
|
tags: [events]
|
|
responses:
|
|
"200":
|
|
description: WebSocket event snapshot stream.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/EventListEnvelope"
|
|
/api/signatures/calculate:
|
|
post:
|
|
operationId: calculateSignature
|
|
tags: [signatures]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/SignatureRequest"
|
|
responses:
|
|
"200":
|
|
description: Calculated signature.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/SignatureEnvelope"
|
|
/api/mocks:
|
|
get:
|
|
operationId: listMocks
|
|
tags: [mocks]
|
|
parameters:
|
|
- name: workspace
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Mock rules.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockListEnvelope"
|
|
post:
|
|
operationId: saveMockFile
|
|
tags: [mocks]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockFileSaveRequest"
|
|
responses:
|
|
"200":
|
|
description: Saved mock file.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockListEnvelope"
|
|
/api/mock-files/save:
|
|
post:
|
|
operationId: saveMockFileAlias
|
|
tags: [mocks]
|
|
deprecated: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockFileSaveRequest"
|
|
responses:
|
|
"200":
|
|
description: Saved mock file through compatibility alias.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockListEnvelope"
|
|
/api/mock-files/reload:
|
|
post:
|
|
operationId: reloadMockFiles
|
|
tags: [mocks]
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/WorkspaceRequest"
|
|
responses:
|
|
"200":
|
|
description: Reloaded mock rules from workspace files.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockReloadEnvelope"
|
|
/api/mock-files/preview:
|
|
post:
|
|
operationId: previewMockFiles
|
|
tags: [mocks]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockPreviewRequest"
|
|
responses:
|
|
"200":
|
|
description: Preview mock file changes.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockPreviewEnvelope"
|
|
/api/mock-server/start:
|
|
post:
|
|
operationId: startMockServer
|
|
tags: [mocks]
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerRequest"
|
|
responses:
|
|
"200":
|
|
description: Mock server status.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerEnvelope"
|
|
/api/mock-server/stop:
|
|
post:
|
|
operationId: stopMockServer
|
|
tags: [mocks]
|
|
responses:
|
|
"200":
|
|
description: Mock server status.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerEnvelope"
|
|
/api/mock-server/status:
|
|
get:
|
|
operationId: getMockServerStatus
|
|
tags: [mocks]
|
|
responses:
|
|
"200":
|
|
description: Mock server status.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerEnvelope"
|
|
/api/mock-server/hit-logs:
|
|
get:
|
|
operationId: listMockHitLogs
|
|
tags: [mocks]
|
|
responses:
|
|
"200":
|
|
description: Mock hit logs.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockHitLogEnvelope"
|
|
delete:
|
|
operationId: clearMockHitLogs
|
|
tags: [mocks]
|
|
responses:
|
|
"200":
|
|
description: Cleared mock hit logs.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockHitLogEnvelope"
|
|
/api/mock/start:
|
|
post:
|
|
operationId: startMockServerAlias
|
|
tags: [mocks]
|
|
deprecated: true
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerRequest"
|
|
responses:
|
|
"200":
|
|
description: Mock server status through compatibility alias.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MockServerEnvelope"
|
|
/api/openapi/import:
|
|
post:
|
|
operationId: importOpenApi
|
|
tags: [openapi]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiImportRequest"
|
|
responses:
|
|
"200":
|
|
description: Import preview.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiImportEnvelope"
|
|
/api/openapi/sync/preview:
|
|
post:
|
|
operationId: previewOpenApiSync
|
|
tags: [openapi]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiImportRequest"
|
|
responses:
|
|
"200":
|
|
description: OpenAPI sync preview.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiImportEnvelope"
|
|
/api/openapi/diff:
|
|
post:
|
|
operationId: diffOpenApi
|
|
tags: [openapi]
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: {}
|
|
responses:
|
|
"200":
|
|
description: OpenAPI diff summary.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiDiffEnvelope"
|
|
/api/openapi/validate-response:
|
|
post:
|
|
operationId: validateOpenApiResponse
|
|
tags: [openapi]
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: {}
|
|
responses:
|
|
"200":
|
|
description: Response validation result.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/OpenApiValidateEnvelope"
|
|
/api/export/curl:
|
|
post:
|
|
operationId: exportCurl
|
|
tags: [import-export]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/CurlExportRequest"
|
|
responses:
|
|
"200":
|
|
description: Generated curl command.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/CurlExportEnvelope"
|
|
/api/import/curl:
|
|
post:
|
|
operationId: importCurl
|
|
tags: [import-export]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/CurlImportRequest"
|
|
responses:
|
|
"200":
|
|
description: Imported curl command as a request block.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/CurlImportEnvelope"
|
|
/api/import/postman:
|
|
post:
|
|
operationId: importPostman
|
|
tags: [import-export]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PostmanImportRequest"
|
|
responses:
|
|
"200":
|
|
description: Imported Postman collection as .http content.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PostmanImportEnvelope"
|
|
/api/indexes/rebuild:
|
|
post:
|
|
operationId: rebuildIndexes
|
|
tags: [indexes]
|
|
responses:
|
|
"200":
|
|
description: Rebuilt local indexes and caches.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/IndexRebuildEnvelope"
|
|
components:
|
|
parameters:
|
|
ExecutionId:
|
|
name: executionId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
minLength: 1
|
|
schemas:
|
|
ApiEnvelope:
|
|
type: object
|
|
required: [success, data, error, requestId, timestamp]
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
data: {}
|
|
error:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/ApiError"
|
|
- type: "null"
|
|
requestId:
|
|
type: string
|
|
minLength: 1
|
|
timestamp:
|
|
type: string
|
|
format: date-time
|
|
additionalProperties: false
|
|
ApiError:
|
|
type: object
|
|
required: [code, message]
|
|
properties:
|
|
code:
|
|
type: string
|
|
minLength: 1
|
|
message:
|
|
type: string
|
|
minLength: 1
|
|
details: {}
|
|
additionalProperties: false
|
|
HealthEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
$ref: "#/components/schemas/HealthData"
|
|
HealthData:
|
|
type: object
|
|
required: [status]
|
|
properties:
|
|
status:
|
|
type: string
|
|
enum: [ok]
|
|
version:
|
|
type: string
|
|
uptimeSeconds:
|
|
type: integer
|
|
minimum: 0
|
|
additionalProperties: false
|
|
ParseRequest:
|
|
type: object
|
|
required: [content]
|
|
properties:
|
|
content:
|
|
type: string
|
|
filePath:
|
|
type: string
|
|
additionalProperties: false
|
|
ParseEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [requests, variables, errors]
|
|
properties:
|
|
requests:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/HttpRequestBlock"
|
|
variables:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
errors:
|
|
type: array
|
|
items:
|
|
type: string
|
|
additionalProperties: false
|
|
HttpRequestBlock:
|
|
type: object
|
|
required: [id, method, url, headers, body, startLine, endLine]
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
method:
|
|
type: string
|
|
url:
|
|
type: string
|
|
headers:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
body:
|
|
type: string
|
|
startLine:
|
|
type: integer
|
|
minimum: 1
|
|
endLine:
|
|
type: integer
|
|
minimum: 1
|
|
additionalProperties: false
|
|
FileReadRequest:
|
|
type: object
|
|
required: [path]
|
|
properties:
|
|
path:
|
|
type: string
|
|
additionalProperties: false
|
|
FileReadEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [path, content, contentHash]
|
|
properties:
|
|
path:
|
|
type: string
|
|
content:
|
|
type: string
|
|
contentHash:
|
|
type: string
|
|
additionalProperties: false
|
|
FileSaveRequest:
|
|
type: object
|
|
required: [path, content]
|
|
properties:
|
|
path:
|
|
type: string
|
|
content:
|
|
type: string
|
|
baseHash:
|
|
type: string
|
|
additionalProperties: false
|
|
FileSaveEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [path, contentHash]
|
|
properties:
|
|
path:
|
|
type: string
|
|
contentHash:
|
|
type: string
|
|
additionalProperties: false
|
|
FileListEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [root, files]
|
|
properties:
|
|
root:
|
|
type: string
|
|
files:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/WorkspaceFile"
|
|
additionalProperties: false
|
|
WorkspaceFile:
|
|
type: object
|
|
required: [path, name, sizeBytes, modifiedAt]
|
|
properties:
|
|
path:
|
|
type: string
|
|
name:
|
|
type: string
|
|
sizeBytes:
|
|
type: integer
|
|
minimum: 0
|
|
modifiedAt:
|
|
type: string
|
|
additionalProperties: false
|
|
EnvironmentDocument:
|
|
type: object
|
|
required: [schemaVersion, environments]
|
|
properties:
|
|
schemaVersion:
|
|
type: integer
|
|
const: 1
|
|
workspace:
|
|
type: string
|
|
defaultEnvironment:
|
|
type:
|
|
- string
|
|
- "null"
|
|
environments:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [name, variables]
|
|
properties:
|
|
name:
|
|
type: string
|
|
variables:
|
|
type: object
|
|
additionalProperties: {}
|
|
additionalProperties: false
|
|
globals:
|
|
type: object
|
|
additionalProperties: {}
|
|
additionalProperties: false
|
|
EnvironmentEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
$ref: "#/components/schemas/EnvironmentDocument"
|
|
CreateExecutionRequest:
|
|
type: object
|
|
required: [type]
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum: [http, batch, chain, load-test, sse, websocket]
|
|
request:
|
|
$ref: "#/components/schemas/ExecutionRequestItem"
|
|
requests:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ExecutionRequestItem"
|
|
filePath:
|
|
type: string
|
|
content:
|
|
type: string
|
|
environment:
|
|
type: string
|
|
options:
|
|
type: object
|
|
additionalProperties: {}
|
|
additionalProperties: false
|
|
ExecutionRequestItem:
|
|
type: object
|
|
required: [method, url]
|
|
properties:
|
|
name:
|
|
type: string
|
|
method:
|
|
type: string
|
|
url:
|
|
type: string
|
|
headers:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
body:
|
|
type: string
|
|
additionalProperties: false
|
|
ExecutionEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
$ref: "#/components/schemas/Execution"
|
|
Execution:
|
|
type: object
|
|
required: [id, type, status, startedAt]
|
|
properties:
|
|
id:
|
|
type: string
|
|
type:
|
|
type: string
|
|
status:
|
|
type: string
|
|
enum: [queued, running, succeeded, failed, cancelled]
|
|
startedAt:
|
|
type: string
|
|
format: date-time
|
|
completedAt:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date-time
|
|
result:
|
|
$ref: "#/components/schemas/ExecutionResult"
|
|
children:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Execution"
|
|
error:
|
|
type: string
|
|
additionalProperties: false
|
|
ExecutionResult:
|
|
type: object
|
|
properties:
|
|
response:
|
|
$ref: "#/components/schemas/ExecutionResponse"
|
|
statusCode:
|
|
type: integer
|
|
status:
|
|
type: integer
|
|
headers:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
body:
|
|
type: string
|
|
durationMs:
|
|
type: integer
|
|
minimum: 0
|
|
scriptLogs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
assertions:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ExecutionAssertion"
|
|
total:
|
|
type: integer
|
|
succeeded:
|
|
type: integer
|
|
failed:
|
|
type: integer
|
|
totalRequests:
|
|
type: integer
|
|
concurrency:
|
|
type: integer
|
|
avgDurationMs:
|
|
type: integer
|
|
maxDurationMs:
|
|
type: integer
|
|
sessionType:
|
|
type: string
|
|
enum: [sse, websocket]
|
|
events:
|
|
type: array
|
|
items:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
bodySample:
|
|
type: string
|
|
url:
|
|
type: string
|
|
sent:
|
|
type: array
|
|
items:
|
|
type: string
|
|
received:
|
|
type: array
|
|
items:
|
|
type: string
|
|
note:
|
|
type: string
|
|
cancelled:
|
|
type: boolean
|
|
error:
|
|
type: string
|
|
additionalProperties: true
|
|
ExecutionResponse:
|
|
type: object
|
|
required: [statusCode, status, headers, body, durationMs]
|
|
properties:
|
|
statusCode:
|
|
type: integer
|
|
status:
|
|
type: integer
|
|
headers:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
body:
|
|
type: string
|
|
durationMs:
|
|
type: integer
|
|
minimum: 0
|
|
additionalProperties: false
|
|
ExecutionAssertion:
|
|
type: object
|
|
required: [name, passed]
|
|
properties:
|
|
name:
|
|
type: string
|
|
expected: {}
|
|
actual: {}
|
|
passed:
|
|
type: boolean
|
|
additionalProperties: false
|
|
ExecutionHistoryEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [items]
|
|
properties:
|
|
items:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Execution"
|
|
additionalProperties: false
|
|
EventListEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [events]
|
|
properties:
|
|
events:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ExecutionEvent"
|
|
additionalProperties: false
|
|
ExecutionEvent:
|
|
type: object
|
|
required: [type, executionId, seq, timestamp, payload]
|
|
properties:
|
|
type:
|
|
type: string
|
|
executionId:
|
|
type: string
|
|
seq:
|
|
type: integer
|
|
minimum: 0
|
|
timestamp:
|
|
type: string
|
|
format: date-time
|
|
payload:
|
|
type: object
|
|
additionalProperties: {}
|
|
additionalProperties: false
|
|
SignatureRequest:
|
|
type: object
|
|
required: [algorithm, data]
|
|
properties:
|
|
algorithm:
|
|
type: string
|
|
enum: [sha256, hmac-sha256]
|
|
data:
|
|
type: string
|
|
secret:
|
|
type: string
|
|
encoding:
|
|
type: string
|
|
enum: [hex, base64]
|
|
default: hex
|
|
additionalProperties: false
|
|
SignatureEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [algorithm, encoding, value]
|
|
properties:
|
|
algorithm:
|
|
type: string
|
|
encoding:
|
|
type: string
|
|
value:
|
|
type: string
|
|
additionalProperties: false
|
|
MockFileSaveRequest:
|
|
type: object
|
|
required: [rules]
|
|
properties:
|
|
workspace:
|
|
type: string
|
|
filePath:
|
|
type: string
|
|
rules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockRule"
|
|
additionalProperties: false
|
|
MockRule:
|
|
type: object
|
|
required: [id, name, enabled, priority, match, response]
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
priority:
|
|
type: integer
|
|
tags:
|
|
type: array
|
|
items:
|
|
type: string
|
|
filePath:
|
|
type: string
|
|
meta:
|
|
type: object
|
|
additionalProperties: {}
|
|
match:
|
|
type: object
|
|
required: [method, path]
|
|
properties:
|
|
method:
|
|
type: string
|
|
path:
|
|
type: string
|
|
pathMode:
|
|
type: string
|
|
enum: [exact, prefix, regex]
|
|
additionalProperties: false
|
|
response:
|
|
type: object
|
|
required: [statusCode]
|
|
properties:
|
|
statusCode:
|
|
type: integer
|
|
headers:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
body: {}
|
|
bodyType:
|
|
type: string
|
|
enum: [json, text, binary, file]
|
|
delayMs:
|
|
type: integer
|
|
additionalProperties: false
|
|
additionalProperties: false
|
|
MockListEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [rules]
|
|
properties:
|
|
rules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockRule"
|
|
filePath:
|
|
type: string
|
|
additionalProperties: false
|
|
WorkspaceRequest:
|
|
type: object
|
|
properties:
|
|
workspace:
|
|
type: string
|
|
additionalProperties: false
|
|
MockPreviewRequest:
|
|
type: object
|
|
required: [rules]
|
|
properties:
|
|
rules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockRule"
|
|
additionalProperties: false
|
|
MockReloadEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [rules, count]
|
|
properties:
|
|
rules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockRule"
|
|
count:
|
|
type: integer
|
|
additionalProperties: false
|
|
MockPreviewEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [created, updated, skipped]
|
|
properties:
|
|
created:
|
|
type: integer
|
|
updated:
|
|
type: integer
|
|
skipped:
|
|
type: integer
|
|
additionalProperties: false
|
|
MockServerRequest:
|
|
type: object
|
|
properties:
|
|
workspace:
|
|
type: string
|
|
port:
|
|
type: integer
|
|
additionalProperties: false
|
|
MockServerEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [running]
|
|
properties:
|
|
running:
|
|
type: boolean
|
|
port:
|
|
type: integer
|
|
baseUrl:
|
|
type: string
|
|
url:
|
|
type: string
|
|
workspace:
|
|
type: string
|
|
additionalProperties: false
|
|
MockHitLogEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [logs]
|
|
properties:
|
|
logs:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockHitLog"
|
|
additionalProperties: false
|
|
MockHitLog:
|
|
type: object
|
|
required: [ruleId, method, path, statusCode, requestedAt]
|
|
properties:
|
|
ruleId:
|
|
type: string
|
|
method:
|
|
type: string
|
|
path:
|
|
type: string
|
|
statusCode:
|
|
type: integer
|
|
requestedAt:
|
|
type: string
|
|
format: date-time
|
|
additionalProperties: false
|
|
OpenApiImportRequest:
|
|
type: object
|
|
required: [path]
|
|
properties:
|
|
path:
|
|
type: string
|
|
baseUrlVariable:
|
|
type: string
|
|
default: baseUrl
|
|
additionalProperties: false
|
|
OpenApiImportEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [requests, mockRules, report]
|
|
properties:
|
|
requests:
|
|
type: string
|
|
mockRules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MockRule"
|
|
report:
|
|
type: object
|
|
additionalProperties: {}
|
|
imported:
|
|
type: integer
|
|
additionalProperties: false
|
|
OpenApiDiffEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [added, changed, deleted, breaking]
|
|
properties:
|
|
added:
|
|
type: array
|
|
items:
|
|
type: string
|
|
changed:
|
|
type: array
|
|
items:
|
|
type: string
|
|
deleted:
|
|
type: array
|
|
items:
|
|
type: string
|
|
breaking:
|
|
type: array
|
|
items:
|
|
type: string
|
|
additionalProperties: false
|
|
OpenApiValidateEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [valid, errors]
|
|
properties:
|
|
valid:
|
|
type: boolean
|
|
errors:
|
|
type: array
|
|
items:
|
|
type: string
|
|
additionalProperties: false
|
|
CurlExportRequest:
|
|
type: object
|
|
required: [request]
|
|
properties:
|
|
request:
|
|
$ref: "#/components/schemas/ExecutionRequestItem"
|
|
additionalProperties: false
|
|
CurlExportEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [curl]
|
|
properties:
|
|
curl:
|
|
type: string
|
|
additionalProperties: false
|
|
CurlImportRequest:
|
|
type: object
|
|
required: [curl]
|
|
properties:
|
|
curl:
|
|
type: string
|
|
additionalProperties: false
|
|
CurlImportEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [request, requests]
|
|
properties:
|
|
request:
|
|
$ref: "#/components/schemas/ExecutionRequestItem"
|
|
requests:
|
|
type: string
|
|
additionalProperties: false
|
|
PostmanImportRequest:
|
|
type: object
|
|
required: [collection]
|
|
properties:
|
|
collection:
|
|
type: object
|
|
additionalProperties: {}
|
|
additionalProperties: false
|
|
PostmanImportEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [requests, imported]
|
|
properties:
|
|
requests:
|
|
type: string
|
|
imported:
|
|
type: integer
|
|
additionalProperties: false
|
|
IndexRebuildEnvelope:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ApiEnvelope"
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
required: [rebuilt, indexes]
|
|
properties:
|
|
rebuilt:
|
|
type: boolean
|
|
indexes:
|
|
type: array
|
|
items:
|
|
type: string
|
|
additionalProperties: false
|