--- "$schema": "http://json-schema.org/schema#" id: "hatter://message.yaml#" title: Message description: Backend-frontend communication messages oneOf: - "$ref": "hatter://message.yaml#/definitions/client_message" - "$ref": "hatter://message.yaml#/definitions/server_message" definitions: client_message: title: Client message description: Message sent by frontend oneOf: - title: Set log type: object required: - type - offset - limit properties: type: enum: - set_log offset: type: integer limit: type: integer - title: Add job type: object required: - type - repository - commit properties: type: enum: - add_job repository: type: string commit: type: string server_message: title: Server message description: Message sent by backend oneOf: - title: Active job type: object required: - type - job properties: type: enum: - active_job job: "$ref": "hatter://message.yaml#/definitions/job" - title: Job queue type: object required: - type - jobs properties: type: enum: - job_queue jobs: type: array items: "$ref": "hatter://message.yaml#/definitions/job" - title: Log entries type: object required: - type properties: type: enum: - log_entries entries: type: array items: "$ref": "hatter://message.yaml#/definitions/log_entry" job: type: object required: - id - timestamp - repository - commit properties: id: type: integer timestamp: type: integer repository: type: string commit: type: string log_entry: type: object required: - timestamp - repository - commit - message properties: timestamp: type: integer repository: type: string commit: type: string message: type: string ...