diff options
author | Kim Alvefur <zash@zash.se> | 2021-03-10 00:19:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-03-10 00:19:38 +0100 |
commit | a09823e81cb2728a34feb58226e6eba28de5db48 (patch) | |
tree | 5875e391d1aff46838949b8b4a72a86cce1e17ab /teal-src/util | |
parent | 832296535f123a53667376b5e9dff1510e1aef9e (diff) | |
download | prosody-a09823e81cb2728a34feb58226e6eba28de5db48.tar.gz prosody-a09823e81cb2728a34feb58226e6eba28de5db48.zip |
util.datamapper: Add references with notes
Diffstat (limited to 'teal-src/util')
-rw-r--r-- | teal-src/util/datamapper.tl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/teal-src/util/datamapper.tl b/teal-src/util/datamapper.tl index 25f6c644..f32e49bb 100644 --- a/teal-src/util/datamapper.tl +++ b/teal-src/util/datamapper.tl @@ -3,6 +3,17 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +-- Based on +-- https://json-schema.org/draft/2020-12/json-schema-core.html +-- https://json-schema.org/draft/2020-12/json-schema-validation.html +-- http://spec.openapis.org/oas/v3.0.1#xmlObject +-- https://github.com/OAI/OpenAPI-Specification/issues/630 (text:true) +-- +-- XML Object Extensions: +-- text to refer to the text content at the same time as attributes +-- x_name_is_value for enum fields where the <tag-name/> is the value +-- x_single_attribute for <tag attr="this"/> +-- local st = require "util.stanza"; local js = require "util.jsonschema" @@ -48,10 +59,13 @@ local function parse_object (schema : js.schema_t, s : st.stanza_t) : table if propschema.xml.attribute then is_attribute = true elseif propschema.xml.text then + -- XXX Not yet in OpenAPI is_text = true elseif propschema.xml.x_name_is_value then + -- XXX Custom extension name_is_value = true elseif propschema.xml.x_single_attribute then + -- XXX Custom extension single_attribute = propschema.xml.x_single_attribute end end |