Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util.datamapper: Add support for $ref pointers | Kim Alvefur | 2021-12-29 | 1 | -1/+3 |
| | | | | Allows reuse of repetitive definitions in schemas. | ||||
* | util.datamapper: Fix spelling in tests | Kim Alvefur | 2021-03-28 | 1 | -2/+2 |
| | |||||
* | util.datamapper: Revert one special attribute to longer form | Kim Alvefur | 2021-03-26 | 1 | -1/+1 |
| | | | | Had a name, using attr() broke it. | ||||
* | util.datamapper: Use attribute convenience function throughout | Kim Alvefur | 2021-03-26 | 1 | -3/+4 |
| | |||||
* | util.datamapper: Add test coverage of unwrapped arrays of objects | Kim Alvefur | 2021-03-24 | 1 | -0/+14 |
| | | | | | Should the xml name/ns go on the array or the items schema? The later apparently. | ||||
* | util.datamapper: Deal with locally built stanzas missing xmlns | Kim Alvefur | 2021-03-23 | 1 | -0/+28 |
| | | | | | | | | | | | | | | | | | | | | | So the problem is that xmlns is not inherited when building a stanza, and then :get_child(n, ns) with an explicit namespace does not find that such child tags. E.g. local t = st.stanza("foo", { xmlns = "urn:example:bar" }) :text_tag("hello", "world"); assert(t:get_child("hello", "urn:example:bar"), "This fails"); Meanwhile, during parsing (util.xmppstream or util.xml) child tags do get the parents xmlns when not overriding them. Thus, in the above example, if the stanza is passed trough `t = util.xml.parse(tostring(t))` then the assert succeeds. This change makes it so that it leaves out the namespace argument to :get_child when it is the same as the current/parent namespace, which behaves the same for both built and parsed stanzas. | ||||
* | util.datamapper: Complete array building support | Kim Alvefur | 2021-03-20 | 1 | -0/+11 |
| | |||||
* | util.datamapper: Finally implement support for parsing arrays | Kim Alvefur | 2021-03-20 | 1 | -0/+63 |
| | |||||
* | util.datamapper: Fix arrays nesting one level too deep | Kim Alvefur | 2021-03-19 | 1 | -7/+15 |
| | |||||
* | util.datamapper: Limited support for unparsing simple arrays of strings | Kim Alvefur | 2021-03-18 | 1 | -6/+2 |
| | |||||
* | util.datamapper: Add initial support for parsing arrays | Kim Alvefur | 2021-03-18 | 1 | -1/+24 |
| | |||||
* | util.datamapper: Enumerated elements | Kim Alvefur | 2021-03-12 | 1 | -1/+9 |
| | | | | E.g. error conditions or chat states. | ||||
* | util.datamapper: Add support for mapping of elements where only one ↵ | Kim Alvefur | 2021-03-07 | 1 | -0/+7 |
| | | | | | | | attribute matters E.g. <feature var='foo'/> in XEP-0030 and some other simple specifications. | ||||
* | util.datamapper: Add logic for "boolean" tags here the presence means true | Kim Alvefur | 2021-03-07 | 1 | -0/+6 |
| | |||||
* | util.datamapper: Invent extension for using tag name as value | Kim Alvefur | 2021-03-06 | 1 | -5/+11 |
| | | | | | Useful for certain enum-like uses where the element name is the relevant information, e.g. chat states. | ||||
* | util.datamapper: Add 'unparse' for turning tables into XML | Kim Alvefur | 2021-03-07 | 1 | -0/+12 |
| | |||||
* | util.datamapper: Library for extracting data from stanzas | Kim Alvefur | 2021-03-07 | 1 | -0/+56 |
Based on the XML support in the OpenAPI specification. |