69 lines
2.3 KiB
JSON
69 lines
2.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "freecad-web-module-loader/v1",
|
|
"type": "object",
|
|
"required": ["schema", "result", "artifacts"],
|
|
"properties": {
|
|
"schema": { "const": "freecad-web-module-loader/v1" },
|
|
"result": {
|
|
"type": "object",
|
|
"required": [
|
|
"initialize", "type", "typeName", "stateAfterValid", "handle",
|
|
"activeBeforeRelease", "release", "activeAfterRelease", "unknownType",
|
|
"unknownTypeError", "unknownModule", "unknownModuleError", "guiModule",
|
|
"guiModuleError", "emptyModule", "emptyModuleError", "stateAfterErrors"
|
|
],
|
|
"properties": {
|
|
"initialize": { "const": 1 },
|
|
"type": { "const": 1 },
|
|
"typeName": { "const": "Part::Box" },
|
|
"stateAfterValid": { "$ref": "#/$defs/initializedState" },
|
|
"handle": { "const": 1 },
|
|
"activeBeforeRelease": { "const": 1 },
|
|
"release": { "const": 1 },
|
|
"activeAfterRelease": { "const": 0 },
|
|
"unknownType": { "const": 0 },
|
|
"unknownTypeError": { "$ref": "#/$defs/error" },
|
|
"unknownModule": { "const": 0 },
|
|
"unknownModuleError": { "$ref": "#/$defs/error" },
|
|
"guiModule": { "const": 0 },
|
|
"guiModuleError": { "$ref": "#/$defs/error" },
|
|
"emptyModule": { "const": 0 },
|
|
"emptyModuleError": { "$ref": "#/$defs/error" },
|
|
"stateAfterErrors": { "$ref": "#/$defs/initializedState" }
|
|
}
|
|
},
|
|
"artifacts": {
|
|
"type": "object",
|
|
"required": ["js_sha256", "wasm_sha256"],
|
|
"properties": {
|
|
"js_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
"wasm_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"$defs": {
|
|
"initializedState": {
|
|
"type": "object",
|
|
"required": ["calls", "runs", "initialized"],
|
|
"properties": {
|
|
"calls": { "type": "integer", "minimum": 1 },
|
|
"runs": { "const": 1 },
|
|
"initialized": { "const": 1 }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"error": {
|
|
"type": "object",
|
|
"required": ["code", "message"],
|
|
"properties": {
|
|
"code": { "type": "string", "minLength": 1 },
|
|
"message": { "type": "string", "minLength": 1 }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|