Software /
code /
prosody-modules
Comparison
mod_rest/res/schema-xmpp.json @ 4518:073f5397c1d2
mod_rest: Replace most mappings by using util.datamapper
All the stuff now goes into a JSON file that describes the mappings.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 21 Mar 2021 23:54:06 +0100 |
child | 4519:ea1fd703bb27 |
comparison
equal
deleted
inserted
replaced
4517:d6a3201a65c0 | 4518:073f5397c1d2 |
---|---|
1 { | |
2 "_common" : { | |
3 "delay" : { | |
4 "format" : "date-time", | |
5 "title" : "XEP-0203: Delayed Delivery", | |
6 "type" : "string", | |
7 "xml" : { | |
8 "name" : "delay", | |
9 "namespace" : "urn:xmpp:delay", | |
10 "x_single_attribute" : "stamp" | |
11 } | |
12 }, | |
13 "from" : { | |
14 "description" : "the sender of the stanza", | |
15 "example" : "bob@example.net", | |
16 "format" : "xmpp-jid", | |
17 "type" : "string", | |
18 "xml" : { | |
19 "attribute" : true | |
20 } | |
21 }, | |
22 "id" : { | |
23 "description" : "Reasonably unique id. mod_rest generates one if left out.", | |
24 "type" : "string", | |
25 "xml" : { | |
26 "attribute" : true | |
27 } | |
28 }, | |
29 "lang" : { | |
30 "description" : "Language code", | |
31 "example" : "en", | |
32 "type" : "string", | |
33 "xml" : { | |
34 "attribute" : true, | |
35 "prefix" : "xml" | |
36 } | |
37 }, | |
38 "nick" : { | |
39 "type" : "string", | |
40 "xml" : { | |
41 "name" : "nick", | |
42 "namespace" : "http://jabber.org/protocol/nick" | |
43 } | |
44 }, | |
45 "to" : { | |
46 "description" : "the intended recipient for the stanza", | |
47 "example" : "alice@another.example", | |
48 "format" : "xmpp-jid", | |
49 "type" : "string", | |
50 "xml" : { | |
51 "attribute" : true | |
52 } | |
53 }, | |
54 "type" : { | |
55 "description" : "Stanza type", | |
56 "type" : "string", | |
57 "xml" : { | |
58 "attribute" : true | |
59 } | |
60 } | |
61 }, | |
62 "properties" : { | |
63 "iq" : { | |
64 "properties" : { | |
65 "ping" : { | |
66 "description" : "Test reachability of some XMPP address", | |
67 "enum" : [ | |
68 true | |
69 ], | |
70 "title" : "XEP-0199: XMPP Ping", | |
71 "type" : "boolean", | |
72 "xml" : { | |
73 "name" : "ping", | |
74 "namespace" : "urn:xmpp:ping", | |
75 "x_name_is_value" : true | |
76 } | |
77 }, | |
78 "version" : { | |
79 "description" : "Ask about software version information", | |
80 "properties" : { | |
81 "name" : { | |
82 "example" : "My Software", | |
83 "type" : "string" | |
84 }, | |
85 "os" : { | |
86 "example" : "Linux", | |
87 "type" : "string" | |
88 }, | |
89 "version" : { | |
90 "example" : "1.0.0", | |
91 "type" : "string" | |
92 } | |
93 }, | |
94 "required" : [ | |
95 "name", | |
96 "version" | |
97 ], | |
98 "title" : "XEP-0092: Software Version", | |
99 "type" : "object", | |
100 "xml" : { | |
101 "name" : "query", | |
102 "namespace" : "jabber:iq:version" | |
103 } | |
104 } | |
105 }, | |
106 "type" : "object", | |
107 "xml" : { | |
108 "name" : "iq" | |
109 } | |
110 }, | |
111 "message" : { | |
112 "properties" : { | |
113 "body" : { | |
114 "description" : "Human-readable chat message", | |
115 "example" : "Hello, World!", | |
116 "type" : "string" | |
117 }, | |
118 "replace" : { | |
119 "description" : "For indicating that a message is a correction of the last sent message.", | |
120 "title" : "XEP-0308: Last Message Correction", | |
121 "type" : "string", | |
122 "xml" : { | |
123 "name" : "replace", | |
124 "namespace" : "urn:xmpp:message-correct:0", | |
125 "x_single_attribute" : "id" | |
126 } | |
127 }, | |
128 "state" : { | |
129 "description" : "Chat state notifications, e.g. \"is typing...\"", | |
130 "enum" : [ | |
131 "active", | |
132 "inactive", | |
133 "gone", | |
134 "composing", | |
135 "paused" | |
136 ], | |
137 "type" : "string", | |
138 "xml" : { | |
139 "namespace" : "http://jabber.org/protocol/chatstates", | |
140 "x_name_is_value" : true | |
141 } | |
142 }, | |
143 "subject" : { | |
144 "description" : "Subject of message or group chat", | |
145 "example" : "Talking about stuff", | |
146 "type" : "string" | |
147 }, | |
148 "thread" : { | |
149 "description" : "Message thread identifier", | |
150 "properties" : { | |
151 "id" : { | |
152 "type" : "string", | |
153 "xml" : { | |
154 "text" : true | |
155 } | |
156 }, | |
157 "parent" : { | |
158 "type" : "string", | |
159 "xml" : { | |
160 "attribute" : true | |
161 } | |
162 } | |
163 }, | |
164 "type" : "object" | |
165 } | |
166 }, | |
167 "type" : "object", | |
168 "xml" : { | |
169 "name" : "message" | |
170 } | |
171 }, | |
172 "presence" : { | |
173 "properties" : { | |
174 "priority" : { | |
175 "description" : "Presence priority", | |
176 "type" : "string" | |
177 }, | |
178 "show" : { | |
179 "description" : "indicator of availability, ie away or not", | |
180 "enum" : [ | |
181 "away", | |
182 "chat", | |
183 "dnd", | |
184 "xa" | |
185 ], | |
186 "type" : "string" | |
187 }, | |
188 "status" : { | |
189 "description" : "Textual status message.", | |
190 "type" : "string" | |
191 } | |
192 }, | |
193 "type" : "object", | |
194 "xml" : { | |
195 "name" : "presence" | |
196 } | |
197 } | |
198 }, | |
199 "type" : "object", | |
200 "xml" : { | |
201 "name" : "xmpp", | |
202 "namespace" : "jabber:client" | |
203 } | |
204 } |