Files
whetstone_DSL/schemas/methods/applyMutation.schema.json

61 lines
1.7 KiB
JSON
Raw Normal View History

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://whetstone-dsl.org/schemas/methods/applyMutation.schema.json",
"title": "applyMutation",
"description": "Apply a single mutation to the AST",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of mutation operation"
},
"nodeId": {
"type": "string",
"description": "The unique identifier of the target node"
},
"property": {
"type": "string",
"description": "The property name to set"
},
"value": {
"type": "string",
"description": "The value to set"
},
"parentId": {
"type": "string",
"description": "The parent node ID for insertions"
},
"role": {
"type": "string",
"description": "The role/relationship to the parent"
},
"node": {
"type": "object",
"description": "The node object to insert"
},
"properties": {
"type": "object",
"description": "Additional properties for the mutation"
},
"preferImports": {
"type": "boolean",
"description": "Whether to prefer imports over inline definitions"
},
"strictMode": {
"type": "boolean",
"description": "Whether to enforce strict validation"
}
},
"required": ["type"],
"additionalProperties": false
},
"response": {
"$ref": "../types/MutationResult.schema.json"
}
},
"required": ["request", "response"]
}