Comparison

util/datamapper.lua @ 11461:766b0eddd12c

util.datamapper: Deal with type name changes in util.jsonschema
author Kim Alvefur <zash@zash.se>
date Fri, 19 Mar 2021 00:26:04 +0100
parent 11458:0e00fa518688
child 11462:d1982b7eb00d
comparison
equal deleted inserted replaced
11460:a8b4e04bc044 11461:766b0eddd12c
80 local parse_object 80 local parse_object
81 local parse_array 81 local parse_array
82 82
83 function parse_object(schema, s) 83 function parse_object(schema, s)
84 local out = {} 84 local out = {}
85 if schema.properties then 85 if type(schema) == "table" and schema.properties then
86 for prop, propschema in pairs(schema.properties) do 86 for prop, propschema in pairs(schema.properties) do
87 87
88 local proptype, value_where, name, namespace, prefix, single_attribute, enums = unpack_propschema(propschema, prop, s.attr.xmlns) 88 local proptype, value_where, name, namespace, prefix, single_attribute, enums = unpack_propschema(propschema, prop, s.attr.xmlns)
89 89
90 local value 90 local value