mod_rest: Restore 'kind' property in JSON-mapped objects
The datamapper schema has no 'kind' field, instead handling it as a
top-level property of the currently unused <xmpp> element and doing this
early dispatch on the top level element name.
This puts the field back into the output JSON.
--- a/mod_rest/jsonmap.lib.lua Tue Mar 23 15:24:47 2021 +0100
+++ b/mod_rest/jsonmap.lib.lua Tue Mar 23 17:44:49 2021 +0100
@@ -408,6 +408,8 @@
local function st2json(s)
local t = map.parse(schema.properties[s.name], s);
+ t.kind = s.name;
+
if s.name == "presence" and not s.attr.type then
t.type = "available";
end