11$schema : https://json-schema.org/draft/2020-12/schema
2- $id : /schemas/ function
2+ $id : function.yaml
33title : Function schema
44type : object
55
2626 name :
2727 type : string
2828 description : Name of the function.
29+ description :
30+ type : string
31+ description : Describes the functionality provided by the function.
2932 pair :
3033 type : string
3134 description : Associates this function with another getter or setter function.
@@ -38,48 +41,26 @@ $defs:
3841 anyOf :
3942 - type : string
4043 - const : true
41- meta :
42- $ref : ' #/$defs/meta'
43- description :
44- type : string
45- description : Describes the functionality provided by the function.
46- notes :
47- type : array
48- description : List of noteworthy pieces of information for the function.
49- items :
50- type : string
51- preview_images :
52- $ref : ' #/$defs/preview_images'
5344 parameters :
5445 $ref : ' #/$defs/parameters'
5546 ignore_parameters :
56- type : array
57- description : |
58- A list of parameters to remove from the parameters list.
59- You should only use this for shared functions, for example where the client function is
60- missing a player parameter
61- items :
62- type : string
63- uniqueItems : true
47+ $ref : ' #/$defs/ignore_parameters'
6448 returns :
6549 $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'
6656 version :
67- description : Version information when the function got added/deprecated/removed.
68- $ref : ' #/$defs/version'
57+ $ref : ' common-defs.yaml#/$defs/version'
6958 issues :
70- $ref : ' #/$defs/issues'
59+ $ref : ' common-defs.yaml #/$defs/issues'
7160 examples :
72- $ref : ' #/$defs/examples'
61+ $ref : ' common-defs.yaml #/$defs/examples'
7362 see_also :
74- type : array
75- description : |
76- A list of other categories for further reading.
77- Every function will implicitly display it's own category in *See Also*, unless you
78- introduce this property, then you have to be explicit about it.
79- items :
80- type : string
81- pattern : " ^(category):"
82- uniqueItems : true
63+ $ref : ' common-defs.yaml#/$defs/see_also'
8364
8465 oop :
8566 type : object
@@ -114,31 +95,6 @@ $defs:
11495 type : string
11596 description : Name of the constructor.
11697
117- meta :
118- type : array
119- description : A list of meta properties about the function and it's documentation.
120- items :
121- type : object
122- properties :
123- needs_checking :
124- type : string
125- description : Describe why the function needs checking by another person. What's problematic?
126-
127- preview_images :
128- type : array
129- description : A list of picture assets demonstrating the function.
130- items :
131- type : object
132- required :
133- - path
134- properties :
135- path :
136- type : string
137- description : A relative or repository-absolute path to an asset file.
138- description :
139- type : string
140- description : Brief summary of the content in the picture.
141-
14298 parameters :
14399 type : array
144100 description : A list of required and optional parameters for the function.
@@ -163,7 +119,15 @@ $defs:
163119 description : |
164120 The default value for this parameter, if none was given in the call to the function.
165121 This property automatically implicitly marks this parameter as optional.
166-
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
167131 returns :
168132 type : object
169133 required :
@@ -187,54 +151,3 @@ $defs:
187151 name :
188152 type : string
189153 description : Name of the return value.
190-
191- version :
192- type : object
193- properties :
194- added :
195- type : string
196- description : Version when this item was added to MTA.
197- removed :
198- type : string
199- description : Version when this item was removed from MTA.
200- deprecated :
201- type : string
202- description : Version when this item was deprecated in MTA.
203- replacement :
204- type : string
205- description : An optional replacement for this item.
206-
207- issues :
208- type : array
209- description : A list of related issues for this function.
210- items :
211- type : object
212- required :
213- - id
214- - description
215- properties :
216- id :
217- type : integer
218- description : Numeric identifier of the GitHub issue.
219- description :
220- type : string
221- description : Description or summary for this GitHub issue.
222-
223- examples :
224- type : array
225- description : A list of source code examples demonstrating the function.
226- items :
227- type : object
228- required :
229- - path
230- properties :
231- path :
232- type : string
233- description : A relative or repository-absolute path to an example source file.
234- description :
235- type : string
236- description : Description for this source code example.
237- append :
238- type : boolean
239- default : false
240- description : If set to true, this example will be appended to the previous example.
0 commit comments