Skip to content

Commit bd99395

Browse files
committed
first pass at updating the ysls
1 parent 6407e92 commit bd99395

File tree

1 file changed

+128
-60
lines changed

1 file changed

+128
-60
lines changed
Lines changed: 128 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,164 +1,232 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$ref": "#/definitions/Ysls",
3+
"$ref": "#/definitions/ysls",
44
"examples": [],
55
"definitions": {
6-
"Ysls": {
6+
"ysls": {
77
"type": "object",
88
"additionalProperties": false,
99
"properties": {
10-
"Commands": {
10+
"version": {
11+
"type":"integer"
12+
},
13+
"commands": {
1114
"type": "array",
1215
"items": {
13-
"$ref": "#/definitions/Command"
16+
"$ref": "#/definitions/command"
1417
},
1518
"description": "List of commands to make available in Yarn scripts"
1619
},
17-
"Functions": {
20+
"functions": {
1821
"type": "array",
1922
"items": {
20-
"$ref": "#/definitions/Function"
23+
"$ref": "#/definitions/function"
2124
},
2225
"description": "List of functions to make available in Yarn scripts"
2326
}
2427
},
25-
"title": "Ysls"
28+
"title": "ysls",
29+
"required": [
30+
"version"
31+
]
2632
},
27-
"Type": {
33+
"type": {
2834
"description": "A Yarn type.",
2935
"type": "string",
3036
"enum": [
3137
"number",
3238
"string",
3339
"bool",
40+
"instance",
41+
"node",
42+
"enum",
3443
"any"
3544
]
3645
},
37-
"Command": {
46+
"command": {
3847
"type": "object",
3948
"additionalProperties": false,
4049
"properties": {
41-
"YarnName": {
50+
"yarnName": {
4251
"type": "string",
4352
"description": "Name of this method in Yarn Spinner scripts"
4453
},
45-
"DefinitionName": {
54+
"definitionName": {
4655
"type": "string",
4756
"description": "Name of this method in code"
4857
},
49-
"FileName": {
58+
"fileName": {
5059
"type": "string",
5160
"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)."
5261
},
53-
"Language": {
62+
"language": {
5463
"type": "string",
55-
"description": "Language id of the method definition.\nMust be 'csharp' to override/merge with methods found in C# files.",
64+
"description": "Language id of the method definition.",
5665
"default": "text",
57-
"examples": [ "csharp", "gml", "wren" ]
66+
"examples": [ "csharp", "c++", "gdscript" ]
5867
},
59-
"Documentation": {
68+
"documentation": {
6069
"type": "string",
6170
"description": "Description that shows up in suggestions and hover tooltips."
6271
},
63-
"Signature": {
64-
"type": "string",
65-
"description": "Method signature of the method definition. Good way to show parameters, especially if they have default values or are params[]."
66-
},
67-
"Parameters": {
72+
"parameters": {
6873
"type": "array",
6974
"items": {
70-
"$ref": "#/definitions/Parameter"
75+
"$ref": "#/definitions/parameter"
7176
},
7277
"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."
78+
},
79+
"async": {
80+
"type": "boolean",
81+
"description": "True if the command will be calling a coroutine or task based method."
82+
},
83+
"location": {
84+
"$ref": "#/definitions/location"
7385
}
7486
},
7587
"required": [
76-
"YarnName",
77-
"Parameters"
88+
"yarnName",
89+
"parameters"
7890
],
79-
"title": "Command"
91+
"title": "command"
8092
},
81-
"Function": {
93+
"function": {
8294
"type": "object",
8395
"additionalProperties": false,
8496
"properties": {
85-
"YarnName": {
97+
"yarnName": {
8698
"type": "string",
8799
"description": "Name of this method in Yarn Spinner scripts"
88100
},
89-
"DefinitionName": {
101+
"definitionName": {
90102
"type": "string",
91103
"description": "Name of this method in code"
92104
},
93-
"FileName": {
105+
"fileName": {
94106
"type": "string",
95107
"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)."
96108
},
97-
"Language": {
109+
"language": {
98110
"type": "string",
99-
"description": "Language id of the method definition.\nMust be 'csharp' to override/merge with methods found in C# files.",
111+
"description": "Language id of the method definition.",
100112
"default": "text",
101-
"examples": [ "csharp", "gml", "wren" ]
113+
"examples": [ "csharp", "c++", "gdscript" ]
102114
},
103-
"Documentation": {
115+
"documentation": {
104116
"type": "string",
105117
"description": "Description that shows up in suggestions and hover tooltips."
106118
},
107-
"Signature": {
108-
"type": "string",
109-
"description": "Method signature of the method definition. Good way to show parameters, especially if they have default values or are params[]."
110-
},
111-
"Parameters": {
119+
"parameters": {
112120
"type": "array",
113121
"items": {
114-
"$ref": "#/definitions/Parameter"
122+
"$ref": "#/definitions/parameter"
115123
},
116124
"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."
117125
},
118-
"VariadicParameterType": {
119-
"$ref": "#/definitions/Type",
120-
"description": "If set, the type of values that are accepted after the last required parameter.",
121-
"default": null
126+
"return": {
127+
"$ref": "#/definitions/return"
128+
},
129+
"async": {
130+
"type": "boolean",
131+
"description": "True if the function will be calling a task based method."
122132
},
123-
"ReturnType": {
124-
"$ref": "#/definitions/Type"
133+
"location": {
134+
"$ref": "#/definitions/location"
125135
}
126136
},
127137
"required": [
128-
"YarnName",
129-
"ReturnType",
130-
"Parameters"
138+
"yarnName",
139+
"return",
140+
"parameters"
131141
],
132-
"title": "Command"
142+
"title": "function"
133143
},
134-
"Parameter": {
144+
"parameter": {
135145
"type": "object",
136146
"additionalProperties": false,
137147
"properties": {
138-
"Name": {
148+
"name": {
139149
"type": "string"
140150
},
141-
"Type": {
142-
"$ref": "#/definitions/Type"
151+
"type": {
152+
"$ref": "#/definitions/type"
153+
},
154+
"subtype": {
155+
"type": "string",
156+
"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"
143157
},
144-
"Documentation": {
158+
"documentation": {
145159
"type": "string",
146-
"description": "Parameter Documentation, used in method signature hinting."
160+
"description": "Parameter documentation, used in method signature hinting."
147161
},
148-
"DefaultValue": {
162+
"defaultValue": {
149163
"type": "string",
150164
"description": "Default value if it exists. Also will make this parameter optional for parameter count validation."
151165
},
152-
"IsParamsArray": {
166+
"isParamsArray": {
153167
"type": "boolean",
154168
"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."
155-
156169
}
157170
},
158171
"required": [
159-
"Name"
172+
"name",
173+
"type"
160174
],
161-
"title": "Parameter"
175+
"title": "parameter"
176+
},
177+
"return": {
178+
"type": "object",
179+
"additionalProperties": false,
180+
"properties": {
181+
"type": {
182+
"$ref": "#/definitions/type"
183+
},
184+
"subtype": {
185+
"type":"string"
186+
},
187+
"description": {
188+
"type": "string",
189+
"description": "Return documentation."
190+
}
191+
},
192+
"required": [
193+
"type"
194+
],
195+
"title": "return"
196+
},
197+
"location": {
198+
"title": "location",
199+
"type": "object",
200+
"additionalProperties": false,
201+
"properties": {
202+
"start": {
203+
"$ref": "#/definitions/position"
204+
},
205+
"end": {
206+
"$ref": "#/definitions/position"
207+
}
208+
},
209+
"required": [
210+
"start",
211+
"end"
212+
]
213+
},
214+
"position": {
215+
"title": "position",
216+
"type": "object",
217+
"additionalProperties": false,
218+
"properties": {
219+
"line": {
220+
"type": "integer"
221+
},
222+
"character": {
223+
"type": "integer"
224+
}
225+
},
226+
"required": [
227+
"line",
228+
"character"
229+
]
162230
}
163231
}
164232
}

0 commit comments

Comments
 (0)