|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$ref": "#/$defs/ysls", |
| 4 | + "examples": [], |
| 5 | + "$defs": { |
| 6 | + "ysls": { |
| 7 | + "type": "object", |
| 8 | + "additionalProperties": false, |
| 9 | + "properties": { |
| 10 | + "version": { |
| 11 | + "type": "integer" |
| 12 | + }, |
| 13 | + "commands": { |
| 14 | + "type": "array", |
| 15 | + "items": { |
| 16 | + "$ref": "#/$defs/command" |
| 17 | + }, |
| 18 | + "description": "List of commands to make available in Yarn scripts" |
| 19 | + }, |
| 20 | + "functions": { |
| 21 | + "type": "array", |
| 22 | + "items": { |
| 23 | + "$ref": "#/$defs/function" |
| 24 | + }, |
| 25 | + "description": "List of functions to make available in Yarn scripts" |
| 26 | + } |
| 27 | + }, |
| 28 | + "title": "ysls", |
| 29 | + "required": ["version"] |
| 30 | + }, |
| 31 | + "type": { |
| 32 | + "description": "A Yarn type.", |
| 33 | + "type": "string", |
| 34 | + "enum": [ |
| 35 | + "number", |
| 36 | + "string", |
| 37 | + "bool", |
| 38 | + "instance", |
| 39 | + "node", |
| 40 | + "enum", |
| 41 | + "any" |
| 42 | + ] |
| 43 | + }, |
| 44 | + "command": { |
| 45 | + "type": "object", |
| 46 | + "additionalProperties": false, |
| 47 | + "properties": { |
| 48 | + "yarnName": { |
| 49 | + "type": "string", |
| 50 | + "description": "Name of this method in Yarn Spinner scripts" |
| 51 | + }, |
| 52 | + "definitionName": { |
| 53 | + "type": "string", |
| 54 | + "description": "Name of this method in code" |
| 55 | + }, |
| 56 | + "fileName": { |
| 57 | + "type": "string", |
| 58 | + "description": "Name of the file this method is defined in.\nPrimarily used when 'Deep Command Lookup' is disabled to make sure the source file is still found (doesn't need to be the full path, even 'foo.cs' is helpful)." |
| 59 | + }, |
| 60 | + "language": { |
| 61 | + "type": "string", |
| 62 | + "description": "Language id of the method definition.", |
| 63 | + "default": "text", |
| 64 | + "examples": ["csharp", "c++", "gdscript"] |
| 65 | + }, |
| 66 | + "documentation": { |
| 67 | + "type": "string", |
| 68 | + "description": "Description that shows up in suggestions and hover tooltips." |
| 69 | + }, |
| 70 | + "parameters": { |
| 71 | + "type": "array", |
| 72 | + "items": { |
| 73 | + "$ref": "#/$defs/parameter" |
| 74 | + }, |
| 75 | + "description": "Method parameters.\nNote that if you are overriding information for a method found via parsing code, setting this in json will completely override that parameter information." |
| 76 | + }, |
| 77 | + "async": { |
| 78 | + "type": "boolean", |
| 79 | + "description": "True if the command will be calling a coroutine or task based method." |
| 80 | + }, |
| 81 | + "location": { |
| 82 | + "$ref": "#/$defs/location" |
| 83 | + }, |
| 84 | + "containsErrors": { |
| 85 | + "type": "boolean", |
| 86 | + "description": "True if the command implementation contains errors that will prevent the command functioning correctly at run time." |
| 87 | + } |
| 88 | + }, |
| 89 | + "required": ["yarnName", "parameters"], |
| 90 | + "title": "command" |
| 91 | + }, |
| 92 | + "function": { |
| 93 | + "type": "object", |
| 94 | + "additionalProperties": false, |
| 95 | + "properties": { |
| 96 | + "yarnName": { |
| 97 | + "type": "string", |
| 98 | + "description": "Name of this method in Yarn Spinner scripts" |
| 99 | + }, |
| 100 | + "definitionName": { |
| 101 | + "type": "string", |
| 102 | + "description": "Name of this method in code" |
| 103 | + }, |
| 104 | + "fileName": { |
| 105 | + "type": "string", |
| 106 | + "description": "Name of the file this method is defined in.\nPrimarily used when 'Deep Command Lookup' is disabled to make sure the source file is still found (doesn't need to be the full path, even 'foo.cs' is helpful)." |
| 107 | + }, |
| 108 | + "language": { |
| 109 | + "type": "string", |
| 110 | + "description": "Language id of the method definition.", |
| 111 | + "default": "text", |
| 112 | + "examples": ["csharp", "c++", "gdscript"] |
| 113 | + }, |
| 114 | + "documentation": { |
| 115 | + "type": "string", |
| 116 | + "description": "Description that shows up in suggestions and hover tooltips." |
| 117 | + }, |
| 118 | + "parameters": { |
| 119 | + "type": "array", |
| 120 | + "items": { |
| 121 | + "$ref": "#/$defs/parameter" |
| 122 | + }, |
| 123 | + "description": "Method parameters.\nNote that if you are overriding information for a method found via parsing code, setting this in json will completely override that parameter information." |
| 124 | + }, |
| 125 | + "return": { |
| 126 | + "$ref": "#/$defs/return" |
| 127 | + }, |
| 128 | + "async": { |
| 129 | + "type": "boolean", |
| 130 | + "description": "True if the function will be calling a task based method." |
| 131 | + }, |
| 132 | + "location": { |
| 133 | + "$ref": "#/$defs/location" |
| 134 | + }, |
| 135 | + "containsErrors": { |
| 136 | + "type": "boolean", |
| 137 | + "description": "True if the function implementation contains errors that will prevent the function functioning correctly at run time." |
| 138 | + } |
| 139 | + }, |
| 140 | + "required": ["yarnName", "return", "parameters"], |
| 141 | + "title": "function" |
| 142 | + }, |
| 143 | + "parameter": { |
| 144 | + "type": "object", |
| 145 | + "additionalProperties": false, |
| 146 | + "properties": { |
| 147 | + "name": { |
| 148 | + "type": "string" |
| 149 | + }, |
| 150 | + "type": { |
| 151 | + "$ref": "#/$defs/type" |
| 152 | + }, |
| 153 | + "subtype": { |
| 154 | + "type": "string", |
| 155 | + "description": "Subtype only exists when \"type\" has been set to be instance and represents the in-engine type that will be forwarded this command.\nIn Unity this will nearly always be a monobehaviour subclass" |
| 156 | + }, |
| 157 | + "documentation": { |
| 158 | + "type": "string", |
| 159 | + "description": "Parameter documentation, used in method signature hinting." |
| 160 | + }, |
| 161 | + "defaultValue": { |
| 162 | + "type": "string", |
| 163 | + "description": "Default value if it exists. Also will make this parameter optional for parameter count validation." |
| 164 | + }, |
| 165 | + "isParamsArray": { |
| 166 | + "type": "boolean", |
| 167 | + "description": "Corresponds to the params keyword in C#. Makes this parameter optional, and further parameters will use the information from this parameter.\nUndefined behavior if true for any parameter except for the last." |
| 168 | + } |
| 169 | + }, |
| 170 | + "required": ["name", "type"], |
| 171 | + "title": "parameter" |
| 172 | + }, |
| 173 | + "return": { |
| 174 | + "type": "object", |
| 175 | + "additionalProperties": false, |
| 176 | + "properties": { |
| 177 | + "type": { |
| 178 | + "$ref": "#/$defs/type" |
| 179 | + }, |
| 180 | + "subtype": { |
| 181 | + "type": "string" |
| 182 | + }, |
| 183 | + "description": { |
| 184 | + "type": "string", |
| 185 | + "description": "Return documentation." |
| 186 | + } |
| 187 | + }, |
| 188 | + "required": ["type"], |
| 189 | + "title": "return" |
| 190 | + }, |
| 191 | + "location": { |
| 192 | + "title": "location", |
| 193 | + "type": "object", |
| 194 | + "additionalProperties": false, |
| 195 | + "properties": { |
| 196 | + "start": { |
| 197 | + "$ref": "#/$defs/position" |
| 198 | + }, |
| 199 | + "end": { |
| 200 | + "$ref": "#/$defs/position" |
| 201 | + } |
| 202 | + }, |
| 203 | + "required": ["start", "end"] |
| 204 | + }, |
| 205 | + "position": { |
| 206 | + "title": "position", |
| 207 | + "type": "object", |
| 208 | + "additionalProperties": false, |
| 209 | + "properties": { |
| 210 | + "line": { |
| 211 | + "type": "integer" |
| 212 | + }, |
| 213 | + "character": { |
| 214 | + "type": "integer" |
| 215 | + } |
| 216 | + }, |
| 217 | + "required": ["line", "character"] |
| 218 | + } |
| 219 | + } |
| 220 | +} |
0 commit comments