@@ -3,6 +3,17 @@ $id: /schemas/function
3
3
title : Function schema
4
4
type : object
5
5
6
+ properties :
7
+ shared :
8
+ description : A shared specification of a function.
9
+ $ref : ' #/$defs/common_properties'
10
+ server :
11
+ description : A server-side specification of a function.
12
+ $ref : ' #/$defs/common_properties'
13
+ client :
14
+ description : A client-side specification of a function.
15
+ $ref : ' #/$defs/common_properties'
16
+
6
17
$defs :
7
18
common_properties :
8
19
type : object
@@ -18,12 +29,103 @@ $defs:
18
29
description :
19
30
type : string
20
31
description : Describes the functionality provided by the function.
32
+ notes :
33
+ type : array
34
+ description : List of noteworthy pieces of information for the function.
35
+ items :
36
+ type : string
37
+ preview :
38
+ $ref : ' #/$defs/preview'
39
+ parameters :
40
+ $ref : ' #/$defs/parameters'
41
+ ignore_parameters :
42
+ type : array
43
+ description : |
44
+ A list of parameters to remove from the parameters list.
45
+ You should only use this for shared functions, for example where the client function is
46
+ missing a player parameter
47
+ items :
48
+ type : string
49
+ uniqueItems : true
50
+ returns :
51
+ $ref : ' #/$defs/returns'
21
52
version :
22
53
description : Version information when the function got added/deprecated/removed.
23
54
$ref : ' #/$defs/version'
55
+ issues :
56
+ $ref : ' #/$defs/issues'
24
57
examples :
25
58
$ref : ' #/$defs/examples'
59
+ see_also :
60
+ type : array
61
+ description : A list of other items and categories for further reading.
62
+ items :
63
+ type : string
64
+ pattern : " ^(item|category|tag):"
65
+ uniqueItems : true
26
66
67
+ preview :
68
+ type : array
69
+ description : A list of picture assets demonstrating the function.
70
+ items :
71
+ type : object
72
+ description : A single function preview.
73
+ required :
74
+ - path
75
+ properties :
76
+ path :
77
+ type : string
78
+ description : A relative or repository-absolute path to an asset file.
79
+ description :
80
+ type : string
81
+ description : Brief summary of the content in the picture.
82
+
83
+ parameters :
84
+ type : array
85
+ description : A list of required and optional parameters for the function.
86
+ items :
87
+ type : object
88
+ description : A single function parameter.
89
+ required :
90
+ - name
91
+ - type
92
+ - description
93
+ properties :
94
+ name :
95
+ type : string
96
+ description : Name of the function parameter.
97
+ type :
98
+ type : string
99
+ description : Type of the function parameter.
100
+ description :
101
+ type : string
102
+ description : Describe the usage, contraints and other useful information about the parameter.
103
+
104
+ returns :
105
+ type : object
106
+ required :
107
+ - values
108
+ properties :
109
+ description :
110
+ type : string
111
+ description : A summary for the return values.
112
+ values :
113
+ type : array
114
+ description : A list of named values returned by the function.
115
+ items :
116
+ type : object
117
+ description : A single function return value.
118
+ required :
119
+ - type
120
+ - name
121
+ properties :
122
+ type :
123
+ type : string
124
+ description : Type of the return value.
125
+ name :
126
+ type : string
127
+ description : Name of the return value.
128
+
27
129
version :
28
130
type : object
29
131
properties :
@@ -37,11 +139,29 @@ $defs:
37
139
type : string
38
140
description : Version when this item was deprecated in MTA.
39
141
142
+ issues :
143
+ type : array
144
+ description : A list of related issues for this function.
145
+ items :
146
+ type : object
147
+ description : A single function-related issue.
148
+ required :
149
+ - id
150
+ - description
151
+ properties :
152
+ id :
153
+ type : integer
154
+ description : Numeric identifier of the GitHub issue.
155
+ description :
156
+ type : string
157
+ description : Description or summary for this GitHub issue.
158
+
40
159
examples :
41
- description : A list of source code examples demonstrating the function.
42
160
type : array
161
+ description : A list of source code examples demonstrating the function.
43
162
items :
44
163
type : object
164
+ description : A single source code example.
45
165
required :
46
166
- path
47
167
properties :
@@ -55,14 +175,3 @@ $defs:
55
175
type : boolean
56
176
default : false
57
177
description : If set to true, this example will be appended to the previous example.
58
-
59
- properties :
60
- shared :
61
- description : A shared specification of a function.
62
- $ref : ' #/$defs/common_properties'
63
- server :
64
- description : A server-side specification of a function.
65
- $ref : ' #/$defs/common_properties'
66
- client :
67
- description : A client-side specification of a function.
68
- $ref : ' #/$defs/common_properties'
0 commit comments