Mercurial > prosody-modules
comparison mod_rest/res/schema-xmpp.json @ 5898:7371320813a7
mod_rest: Add schema examples
Also 'example' -> 'examples'
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 May 2024 13:25:06 +0200 |
parents | bdcb61275afe |
children |
comparison
equal
deleted
inserted
replaced
5897:896e7c7bf87f | 5898:7371320813a7 |
---|---|
107 "namespace" : "jabber:x:data" | 107 "namespace" : "jabber:x:data" |
108 } | 108 } |
109 }, | 109 }, |
110 "delay" : { | 110 "delay" : { |
111 "description" : "Timestamp of when a stanza was delayed, in ISO 8601 / XEP-0082 format.", | 111 "description" : "Timestamp of when a stanza was delayed, in ISO 8601 / XEP-0082 format.", |
112 "examples" : [ | |
113 "2002-09-10T23:08:25Z" | |
114 ], | |
112 "format" : "date-time", | 115 "format" : "date-time", |
113 "title" : "XEP-0203: Delayed Delivery", | 116 "title" : "XEP-0203: Delayed Delivery", |
114 "type" : "string", | 117 "type" : "string", |
115 "xml" : { | 118 "xml" : { |
116 "name" : "delay", | 119 "name" : "delay", |
118 "x_single_attribute" : "stamp" | 121 "x_single_attribute" : "stamp" |
119 } | 122 } |
120 }, | 123 }, |
121 "from" : { | 124 "from" : { |
122 "description" : "the sender of the stanza", | 125 "description" : "the sender of the stanza", |
123 "example" : "bob@example.net", | 126 "examples" : [ |
127 "bob@example.net" | |
128 ], | |
124 "format" : "xmpp-jid", | 129 "format" : "xmpp-jid", |
125 "type" : "string", | 130 "type" : "string", |
126 "xml" : { | 131 "xml" : { |
127 "attribute" : true | 132 "attribute" : true |
128 } | 133 } |
129 }, | 134 }, |
130 "id" : { | 135 "id" : { |
131 "description" : "Reasonably unique id. mod_rest generates one if left out.", | 136 "description" : "Reasonably unique id. mod_rest generates one if left out.", |
137 "examples" : [ | |
138 "c6d02db2-5c1f-4e00-9014-4dd3e21309b0", | |
139 "EBRthZvxaAEXoTJ77w692pQW" | |
140 ], | |
132 "type" : "string", | 141 "type" : "string", |
133 "xml" : { | 142 "xml" : { |
134 "attribute" : true | 143 "attribute" : true |
135 } | 144 } |
136 }, | 145 }, |
137 "lang" : { | 146 "lang" : { |
138 "description" : "Language code", | 147 "description" : "Language code", |
139 "example" : "en", | 148 "examples" : [ |
149 "de", | |
150 "en", | |
151 "en-UK", | |
152 "en-US", | |
153 "fr", | |
154 "sv-SE" | |
155 ], | |
140 "type" : "string", | 156 "type" : "string", |
141 "xml" : { | 157 "xml" : { |
142 "attribute" : true, | 158 "attribute" : true, |
143 "prefix" : "xml" | 159 "prefix" : "xml" |
144 } | 160 } |
145 }, | 161 }, |
146 "nick" : { | 162 "nick" : { |
163 "examples" : [ | |
164 "CallMeIshmael" | |
165 ], | |
147 "type" : "string", | 166 "type" : "string", |
148 "xml" : { | 167 "xml" : { |
149 "name" : "nick", | 168 "name" : "nick", |
150 "namespace" : "http://jabber.org/protocol/nick" | 169 "namespace" : "http://jabber.org/protocol/nick" |
151 } | 170 } |
204 } | 223 } |
205 }, | 224 }, |
206 "to" : { | 225 "to" : { |
207 "description" : "the intended recipient for the stanza", | 226 "description" : "the intended recipient for the stanza", |
208 "example" : "alice@example.com", | 227 "example" : "alice@example.com", |
228 "examples" : [ | |
229 "alice@example.com" | |
230 ], | |
209 "format" : "xmpp-jid", | 231 "format" : "xmpp-jid", |
210 "type" : "string", | 232 "type" : "string", |
211 "xml" : { | 233 "xml" : { |
212 "attribute" : true | 234 "attribute" : true |
213 } | 235 } |
660 "version" : { | 682 "version" : { |
661 "description" : "Ask about software version information", | 683 "description" : "Ask about software version information", |
662 "properties" : { | 684 "properties" : { |
663 "name" : { | 685 "name" : { |
664 "example" : "My Software", | 686 "example" : "My Software", |
687 "examples" : [ | |
688 "My Software" | |
689 ], | |
665 "type" : "string" | 690 "type" : "string" |
666 }, | 691 }, |
667 "os" : { | 692 "os" : { |
668 "example" : "Linux", | 693 "example" : "Linux", |
694 "examples" : [ | |
695 "Linux" | |
696 ], | |
669 "type" : "string" | 697 "type" : "string" |
670 }, | 698 }, |
671 "version" : { | 699 "version" : { |
672 "example" : "1.0.0", | 700 "example" : "1.0.0", |
701 "examples" : [ | |
702 "1.0.0" | |
703 ], | |
673 "type" : "string" | 704 "type" : "string" |
674 } | 705 } |
675 }, | 706 }, |
676 "required" : [ | 707 "required" : [ |
677 "name", | 708 "name", |
728 } | 759 } |
729 }, | 760 }, |
730 "body" : { | 761 "body" : { |
731 "description" : "Human-readable chat message", | 762 "description" : "Human-readable chat message", |
732 "example" : "Hello, World!", | 763 "example" : "Hello, World!", |
764 "examples" : [ | |
765 "Hello, World!" | |
766 ], | |
733 "type" : "string" | 767 "type" : "string" |
734 }, | 768 }, |
735 "dataform" : { | 769 "dataform" : { |
736 "$ref" : "#/_common/dataform" | 770 "$ref" : "#/_common/dataform" |
737 }, | 771 }, |
862 "type" : "string" | 896 "type" : "string" |
863 }, | 897 }, |
864 "url" : { | 898 "url" : { |
865 "description" : "The URL of the attached media file", | 899 "description" : "The URL of the attached media file", |
866 "example" : "https://media.example.net/thisfile.jpg", | 900 "example" : "https://media.example.net/thisfile.jpg", |
901 "examples" : [ | |
902 "https://media.example.net/thisfile.jpg" | |
903 ], | |
867 "format" : "uri", | 904 "format" : "uri", |
868 "type" : "string" | 905 "type" : "string" |
869 } | 906 } |
870 }, | 907 }, |
871 "title" : "XEP-0066: Out of Band Data", | 908 "title" : "XEP-0066: Out of Band Data", |
1029 } | 1066 } |
1030 }, | 1067 }, |
1031 "subject" : { | 1068 "subject" : { |
1032 "description" : "Subject of message or group chat", | 1069 "description" : "Subject of message or group chat", |
1033 "example" : "Talking about stuff", | 1070 "example" : "Talking about stuff", |
1071 "examples" : [ | |
1072 "I implore you!", | |
1073 "Talking about stuff" | |
1074 ], | |
1034 "type" : "string" | 1075 "type" : "string" |
1035 }, | 1076 }, |
1036 "thread" : { | 1077 "thread" : { |
1037 "description" : "Message thread identifier", | 1078 "description" : "Message thread identifier", |
1038 "properties" : { | 1079 "properties" : { |