<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://hg.omfa.de/prosody-hg/</link>
    <language>en-us</language>

    <title>prosody-hg: spec/util_datamapper_spec.lua history</title>
    <description>spec/util_datamapper_spec.lua revision history</description>
    <item>
    <title>util.datamapper: Simplify test schema</title>
    <link>http://hg.omfa.de/prosody-hg/log/74ed772ff5fb/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Simplify test schema<br/>
<br/>
Don't need the function, more compact to just reference the same<br/>
reference table.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 20 Dec 2022 18:55:47 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Improve handling of schemas with non-obvious &quot;type&quot;</title>
    <link>http://hg.omfa.de/prosody-hg/log/a9dbf657c894/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Improve handling of schemas with non-obvious &quot;type&quot;<br/>
<br/>
The JSON Schema specification says that schemas are objects or booleans,<br/>
and that the 'type' property is optional and can be an array.<br/>
<br/>
This module previously allowed bare type names as schemas and did not<br/>
really handle booleans.<br/>
<br/>
It now handles missing 'type' properties and boolean 'true' as a schema.<br/>
Objects and arrays are guessed based on the presence of 'properties' or<br/>
'items' field.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 08 Jul 2022 17:32:48 +0200</pubDate>
</item>
<item>
    <title>util_datamapper: Fix typo in unit tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/912614c4bf3e/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util_datamapper: Fix typo in unit tests]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 29 Dec 2021 18:03:26 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add support for $ref pointers</title>
    <link>http://hg.omfa.de/prosody-hg/log/11060c8919b6/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add support for $ref pointers<br/>
<br/>
Allows reuse of repetitive definitions in schemas.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 29 Dec 2021 17:57:09 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Fix spelling in tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/284c822d4c3d/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Fix spelling in tests]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 28 Mar 2021 14:00:21 +0200</pubDate>
</item>
<item>
    <title>util.datamapper: Revert one special attribute to longer form</title>
    <link>http://hg.omfa.de/prosody-hg/log/332c9291f4d5/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Revert one special attribute to longer form<br/>
<br/>
Had a name, using attr() broke it.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 26 Mar 2021 13:01:16 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Use attribute convenience function throughout</title>
    <link>http://hg.omfa.de/prosody-hg/log/b104c10ffce7/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Use attribute convenience function throughout]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 26 Mar 2021 12:53:29 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add test coverage of unwrapped arrays of objects</title>
    <link>http://hg.omfa.de/prosody-hg/log/0aa2971380e9/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add test coverage of unwrapped arrays of objects<br/>
<br/>
Should the xml name/ns go on the array or the items schema? The later<br/>
apparently.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 24 Mar 2021 00:34:22 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Deal with locally built stanzas missing xmlns</title>
    <link>http://hg.omfa.de/prosody-hg/log/83e127eb91f9/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Deal with locally built stanzas missing xmlns<br/>
<br/>
So the problem is that xmlns is not inherited when building a stanza,<br/>
and then :get_child(n, ns) with an explicit namespace does not find that<br/>
such child tags.<br/>
<br/>
E.g.<br/>
local t = st.stanza(&quot;foo&quot;, { xmlns = &quot;urn:example:bar&quot; })<br/>
	:text_tag(&quot;hello&quot;, &quot;world&quot;);<br/>
assert(t:get_child(&quot;hello&quot;, &quot;urn:example:bar&quot;), &quot;This fails&quot;);<br/>
<br/>
Meanwhile, during parsing (util.xmppstream or util.xml) child tags do<br/>
get the parents xmlns when not overriding them.<br/>
<br/>
Thus, in the above example, if the stanza is passed trough<br/>
`t = util.xml.parse(tostring(t))` then the assert succeeds.<br/>
<br/>
This change makes it so that it leaves out the namespace argument to<br/>
:get_child when it is the same as the current/parent namespace, which<br/>
behaves the same for both built and parsed stanzas.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 23 Mar 2021 19:52:59 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Complete array building support</title>
    <link>http://hg.omfa.de/prosody-hg/log/348b191cd850/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Complete array building support]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 20 Mar 2021 21:29:51 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Finally implement support for parsing arrays</title>
    <link>http://hg.omfa.de/prosody-hg/log/c098d07e6717/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Finally implement support for parsing arrays]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 20 Mar 2021 20:45:06 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Fix arrays nesting one level too deep</title>
    <link>http://hg.omfa.de/prosody-hg/log/d1982b7eb00d/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Fix arrays nesting one level too deep]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 19 Mar 2021 01:17:59 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Limited support for unparsing simple arrays of strings</title>
    <link>http://hg.omfa.de/prosody-hg/log/0e00fa518688/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Limited support for unparsing simple arrays of strings]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 18 Mar 2021 13:07:10 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add initial support for parsing arrays</title>
    <link>http://hg.omfa.de/prosody-hg/log/6a51749af7f4/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add initial support for parsing arrays]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 18 Mar 2021 12:57:25 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Enumerated elements</title>
    <link>http://hg.omfa.de/prosody-hg/log/f0037234b2e9/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Enumerated elements<br/>
<br/>
E.g. error conditions or chat states.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 12 Mar 2021 01:33:15 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add support for mapping of elements where only one attribute matters</title>
    <link>http://hg.omfa.de/prosody-hg/log/9abcdfdcdb01/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add support for mapping of elements where only one attribute matters<br/>
<br/>
E.g. &lt;feature var='foo'/&gt; in XEP-0030 and some other simple<br/>
specifications.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 07 Mar 2021 12:48:49 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add logic for &quot;boolean&quot; tags here the presence means true</title>
    <link>http://hg.omfa.de/prosody-hg/log/b7807583de34/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add logic for &quot;boolean&quot; tags here the presence means true]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 07 Mar 2021 01:41:39 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Invent extension for using tag name as value</title>
    <link>http://hg.omfa.de/prosody-hg/log/87a684df4b65/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Invent extension for using tag name as value<br/>
<br/>
Useful for certain enum-like uses where the element name is the relevant<br/>
information, e.g. chat states.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 06 Mar 2021 23:14:23 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Add 'unparse' for turning tables into XML</title>
    <link>http://hg.omfa.de/prosody-hg/log/5df9ffc25bb4/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Add 'unparse' for turning tables into XML]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 07 Mar 2021 00:57:36 +0100</pubDate>
</item>
<item>
    <title>util.datamapper: Library for extracting data from stanzas</title>
    <link>http://hg.omfa.de/prosody-hg/log/a1fa6202fa13/spec/util_datamapper_spec.lua</link>
    <description><![CDATA[util.datamapper: Library for extracting data from stanzas<br/>
<br/>
Based on the XML support in the OpenAPI specification.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 07 Mar 2021 00:57:36 +0100</pubDate>
</item>

  </channel>
</rss>
