1
1
$schema : https://json-schema.org/draft/2020-12/schema
2
- $id : /schemas/ function
2
+ $id : function.yaml
3
3
title : Function schema
4
4
type : object
5
5
26
26
name :
27
27
type : string
28
28
description : Name of the function.
29
+ description :
30
+ type : string
31
+ description : Describes the functionality provided by the function.
29
32
pair :
30
33
type : string
31
34
description : Associates this function with another getter or setter function.
@@ -38,56 +41,26 @@ $defs:
38
41
anyOf :
39
42
- type : string
40
43
- const : true
41
- meta :
42
- $ref : ' #/$defs/meta'
43
- description :
44
- type : string
45
- description : Describes the functionality provided by the function.
46
- important_notes :
47
- type : array
48
- description : |
49
- A list of important notes about the function.
50
- This is a list of things that are important to know about the function, but not
51
- necessarily related to the function itself.
52
- items :
53
- type : string
54
- notes :
55
- type : array
56
- description : List of noteworthy pieces of information for the function.
57
- items :
58
- type : string
59
- preview_images :
60
- $ref : ' #/$defs/preview_images'
61
44
parameters :
62
45
$ref : ' #/$defs/parameters'
63
46
ignore_parameters :
64
- type : array
65
- description : |
66
- A list of parameters to remove from the parameters list.
67
- You should only use this for shared functions, for example where the client function is
68
- missing a player parameter
69
- items :
70
- type : string
71
- uniqueItems : true
47
+ $ref : ' #/$defs/ignore_parameters'
72
48
returns :
73
49
$ref : ' #/$defs/returns'
50
+ meta :
51
+ $ref : ' common-defs.yaml#/$defs/meta'
52
+ notes :
53
+ $ref : ' common-defs.yaml#/$defs/notes'
54
+ preview_images :
55
+ $ref : ' common-defs.yaml#/$defs/preview_images'
74
56
version :
75
- description : Version information when the function got added/deprecated/removed.
76
- $ref : ' #/$defs/version'
57
+ $ref : ' common-defs.yaml#/$defs/version'
77
58
issues :
78
- $ref : ' #/$defs/issues'
59
+ $ref : ' common-defs.yaml #/$defs/issues'
79
60
examples :
80
- $ref : ' #/$defs/examples'
61
+ $ref : ' common-defs.yaml #/$defs/examples'
81
62
see_also :
82
- type : array
83
- description : |
84
- A list of other categories for further reading.
85
- Every function will implicitly display it's own category in *See Also*, unless you
86
- introduce this property, then you have to be explicit about it.
87
- items :
88
- type : string
89
- pattern : " ^(category):"
90
- uniqueItems : true
63
+ $ref : ' common-defs.yaml#/$defs/see_also'
91
64
92
65
oop :
93
66
type : object
@@ -122,31 +95,6 @@ $defs:
122
95
type : string
123
96
description : Name of the constructor.
124
97
125
- meta :
126
- type : array
127
- description : A list of meta properties about the function and it's documentation.
128
- items :
129
- type : object
130
- properties :
131
- needs_checking :
132
- type : string
133
- description : Describe why the function needs checking by another person. What's problematic?
134
-
135
- preview_images :
136
- type : array
137
- description : A list of picture assets demonstrating the function.
138
- items :
139
- type : object
140
- required :
141
- - path
142
- properties :
143
- path :
144
- type : string
145
- description : A relative or repository-absolute path to an asset file.
146
- description :
147
- type : string
148
- description : Brief summary of the content in the picture.
149
-
150
98
parameters :
151
99
type : array
152
100
description : A list of required and optional parameters for the function.
@@ -171,7 +119,15 @@ $defs:
171
119
description : |
172
120
The default value for this parameter, if none was given in the call to the function.
173
121
This property automatically implicitly marks this parameter as optional.
174
-
122
+ ignore_parameters :
123
+ type : array
124
+ description : |
125
+ A list of parameters to remove from the parameters list.
126
+ You should only use this for shared functions, for example where the client function is
127
+ missing a player parameter
128
+ items :
129
+ type : string
130
+ uniqueItems : true
175
131
returns :
176
132
type : object
177
133
required :
@@ -194,55 +150,4 @@ $defs:
194
150
description : Type of the return value.
195
151
name :
196
152
type : string
197
- description : Name of the return value.
198
-
199
- version :
200
- type : object
201
- properties :
202
- added :
203
- type : string
204
- description : Version when this item was added to MTA.
205
- removed :
206
- type : string
207
- description : Version when this item was removed from MTA.
208
- deprecated :
209
- type : string
210
- description : Version when this item was deprecated in MTA.
211
- replacement :
212
- type : string
213
- description : An optional replacement for this item.
214
-
215
- issues :
216
- type : array
217
- description : A list of related issues for this function.
218
- items :
219
- type : object
220
- required :
221
- - id
222
- - description
223
- properties :
224
- id :
225
- type : integer
226
- description : Numeric identifier of the GitHub issue.
227
- description :
228
- type : string
229
- description : Description or summary for this GitHub issue.
230
-
231
- examples :
232
- type : array
233
- description : A list of source code examples demonstrating the function.
234
- items :
235
- type : object
236
- required :
237
- - path
238
- properties :
239
- path :
240
- type : string
241
- description : A relative or repository-absolute path to an example source file.
242
- description :
243
- type : string
244
- description : Description for this source code example.
245
- append :
246
- type : boolean
247
- default : false
248
- description : If set to true, this example will be appended to the previous example.
153
+ description : Name of the return value.
0 commit comments