{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://freecad.org/schemas/freecad-web-assembly-create-recompute-v1.json", "oneOf": [ { "$ref": "#/$defs/request" }, { "$ref": "#/$defs/result" }, { "$ref": "#/$defs/error" }, { "$ref": "#/$defs/cancel" } ], "$defs": { "request": { "type": "object", "required": ["schema", "version", "kind", "requestId", "command", "payload", "documentId"], "properties": { "schema": { "const": "freecad-web-facade/v1" }, "version": { "const": 1 }, "kind": { "const": "request" }, "requestId": { "type": "string", "minLength": 1 }, "command": { "const": "assembly.createRecompute" }, "documentId": { "type": "string", "minLength": 1 }, "payload": { "type": "object", "required": ["schema", "fixture", "objectType", "label"], "properties": { "schema": { "const": "freecad-web-assembly/create-recompute/v1" }, "fixture": { "const": "AssemblyKernel" }, "objectType": { "const": "Assembly::AssemblyObject" }, "label": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "additionalProperties": false }, "result": { "type": "object", "required": ["schema", "version", "kind", "requestId", "result"], "properties": { "schema": { "const": "freecad-web-facade/v1" }, "version": { "const": 1 }, "kind": { "const": "result" }, "requestId": { "type": "string", "minLength": 1 }, "result": { "type": "object", "required": ["schema", "module", "action", "document", "object", "recompute", "stateSha256"], "properties": { "schema": { "const": "freecad-web-assembly/create-recompute/v1" }, "module": { "const": "Assembly" }, "action": { "const": "create/recompute" }, "document": { "type": "object", "required": ["name", "objectCount", "activeAfterClose"], "properties": { "name": { "type": "string", "minLength": 1 }, "objectCount": { "type": "integer", "minimum": 0 }, "activeAfterClose": { "type": "integer", "minimum": 0 } }, "additionalProperties": false }, "object": { "type": "object", "required": ["name", "type", "componentCount"], "properties": { "name": { "type": "string", "minLength": 1 }, "type": { "const": "Assembly::AssemblyObject" }, "componentCount": { "type": "integer", "minimum": 0 } }, "additionalProperties": false }, "recompute": { "type": "object", "required": ["count", "hasError", "solverStatus", "degreesOfFreedom"], "properties": { "count": { "type": "integer", "minimum": 0 }, "hasError": { "enum": [0, 1] }, "solverStatus": { "type": "integer" }, "degreesOfFreedom": { "type": "integer", "minimum": 0 } }, "additionalProperties": false }, "stateSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "additionalProperties": false } }, "additionalProperties": false }, "error": { "type": "object", "required": ["schema", "version", "kind", "requestId", "error"], "properties": { "schema": { "const": "freecad-web-facade/v1" }, "version": { "const": 1 }, "kind": { "const": "error" }, "requestId": { "type": "string", "minLength": 1 }, "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "enum": ["invalid_type", "invalid_fixture", "duplicate_request", "cancelled", "handler_error"] }, "message": { "type": "string", "minLength": 1 }, "diagnostic": { "type": "object" } }, "additionalProperties": false } }, "additionalProperties": false }, "cancel": { "type": "object", "required": ["schema", "version", "kind", "requestId", "cancelOf"], "properties": { "schema": { "const": "freecad-web-facade/v1" }, "version": { "const": 1 }, "kind": { "const": "cancel" }, "requestId": { "type": "string", "minLength": 1 }, "cancelOf": { "type": "string", "minLength": 1 }, "documentId": { "type": "string", "minLength": 1 } }, "additionalProperties": false } } }