diff --git a/schema/klighd/actions/setSyntheses.json b/schema/klighd/actions/setSyntheses.json index 79398e2e..021faf00 100644 --- a/schema/klighd/actions/setSyntheses.json +++ b/schema/klighd/actions/setSyntheses.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "setSyntheses", "type": "object", - "allOf": [{"$ref": "../../sprotty/messages/diagramAccept.json#/definitions/action"}], + "allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}], "properties": { "kind": { "type": "string", diff --git a/schema/klighd/actions/updateOptions.json b/schema/klighd/actions/updateOptions.json index 4294ed71..3a2b6f39 100644 --- a/schema/klighd/actions/updateOptions.json +++ b/schema/klighd/actions/updateOptions.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "updateOptions", "type": "object", - "allOf": [{"$ref": "../../sprotty/messsages/diagramAccept.json#/definitions/action"}], + "allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}], "properties": { "kind": { "type": "string", @@ -12,7 +12,7 @@ "valuedSynthesisOptions": { "type": "array", "items": { - "$ref": "#/definitions/SynthesisOption" + "$ref": "#/definitions/ValuedSynthesisOption" } }, "layoutOptions": { @@ -26,7 +26,7 @@ } }, "definitions": { - "SynthesisOption": { + "ValuedSynthesisOption": { "type": "object", "properties": { "synthesisOption": { @@ -35,7 +35,8 @@ {"$ref": "#/definitions/choiceSynthesisOption"}, {"$ref": "#/definitions/rangeSynthesisOption"}, {"$ref": "#/definitions/textSynthesisOption"}, - {"$ref": "#/definitions/separatorSynthesisOption"} + {"$ref": "#/definitions/separatorSynthesisOption"}, + {"$ref": "#/definitions/categorySynthesisOption"} ] }, "currentValue": { @@ -43,7 +44,7 @@ } } }, - "generalSynthesisOption": { + "SynthesisOption": { "type": "object", "properties": { @@ -60,7 +61,7 @@ "type": "string" }, "category": { - "$ref": "#/definitions/SynthesisCategory" + "$ref": "#/definitions/categorySynthesisOption" }, "sourceHash": { "type": "string" @@ -69,7 +70,7 @@ } }, "checkSynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", @@ -81,7 +82,7 @@ } }, "choiceSynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", @@ -99,7 +100,7 @@ } }, "rangeSynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", @@ -125,7 +126,7 @@ } }, "textSynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", @@ -137,7 +138,7 @@ } }, "separatorSynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", @@ -146,11 +147,14 @@ } }, "categorySynthesisOption": { - "allOf": [{"$ref": "#/definitions/generalSynthesisOption"}], + "allOf": [{"$ref": "#/definitions/SynthesisOption"}], "properties": { "type": { "type": "number", "enum": [5] + }, + "initialValue": { + "type": "boolean" } } } diff --git a/schema/sprotty/actions/action.json b/schema/sprotty/actions/action.json new file mode 100644 index 00000000..48f6c51b --- /dev/null +++ b/schema/sprotty/actions/action.json @@ -0,0 +1,11 @@ +{ + "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/actions/action.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "action", + "type": "object", + "properties": { + "kind": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/schema/sprotty/actions/requestBounds.json b/schema/sprotty/actions/requestBounds.json index d65e8c52..8eb97ad9 100644 --- a/schema/sprotty/actions/requestBounds.json +++ b/schema/sprotty/actions/requestBounds.json @@ -1,9 +1,9 @@ { - "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/messages/requestBounds.json", + "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/actions/requestBounds.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "requestBounds", "type": "object", - "allOf": [{"$ref": "../../sprotty/messages/diagramAccept.json#/definitions/action"}], + "allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/actions/action.json"}], "properties": { "kind": { "type": "string", @@ -25,7 +25,7 @@ "children": { "type": "array", "items": { - "$ref": "../../klighd/SKGraphSchema#/definitions/SKGraph" + "$ref": "/kieler/klighd-vscode/tree/main/schema/klighd/SKGraphSchema#/definitions/SKGraph" } } } diff --git a/schema/sprotty/actions/requestModel.json b/schema/sprotty/actions/requestModel.json new file mode 100644 index 00000000..f9e1564f --- /dev/null +++ b/schema/sprotty/actions/requestModel.json @@ -0,0 +1,34 @@ +{ + "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/actions/requestModel.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "requestBounds", + "type": "object", + "allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/actions/action.json"}], + "properties": { + "kind": { + "type": "string", + "enum": ["requestModel"] + }, + "options": { + "type": "object", + "properties": { + "needsClientLayout": { + "type": "boolean" + }, + "needsServerLayout": { + "type": "boolean" + }, + "sourceUri": { + "type": "string" + }, + "diagramType": { + "type": "string", + "enum": ["keith-diagram"] + } + } + }, + "requestId": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/schema/sprotty/diagramAccept.json b/schema/sprotty/diagramAccept.json new file mode 100644 index 00000000..22a7b106 --- /dev/null +++ b/schema/sprotty/diagramAccept.json @@ -0,0 +1,27 @@ +{ + "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/messages/diagramAccept.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "diagram/accept", + "type": "object", + "properties": { + "jsonrpc": { + "type": "string" + }, + "method": { + "type": "string", + "enum": ["diagram/accept"] + }, + "params": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "enum": ["sprotty"] + }, + "action": { + "$ref": "./actions/action.json#action" + } + } + } + } +} \ No newline at end of file diff --git a/schema/sprotty/messages/diagramAccept.json b/schema/sprotty/messages/diagramAccept.json deleted file mode 100644 index b8fb5b86..00000000 --- a/schema/sprotty/messages/diagramAccept.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/sprotty/messages/diagramAccept.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "diagram/accept", - "type": "object", - "properties": { - "jsonrpc": { - "type": "string" - }, - "method": { - "type": "string", - "enum": ["diagram/accept"] - }, - "params": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "enum": ["sprotty"] - }, - "action": { - "$ref": "#/definitions/action" - } - } - } - }, - "definitions": { - "action": { - "type": "object", - "properties": { - "kind": { - "type": "string" - } - } - }, - "requestModelAction": { - "allOf": [{"$ref": "#/definitions/action"}], - "properties": { - "kind": { - "type": "string", - "enum": ["requestModel"] - }, - "options": { - "type": "object", - "properties": { - "needsClientLayout": { - "type": "boolean" - }, - "needsServerLayout": { - "type": "boolean" - }, - "sourceUri": { - "type": "string" - }, - "diagramType": { - "type": "string", - "enum": ["keith-diagram"] - } - } - }, - "requestId": { - "type": "string" - } - } - } - } -} \ No newline at end of file