Skip to content
Snippets Groups Projects
Commit 80b494cb authored by 最萌小汐's avatar 最萌小汐
Browse files

update schema

parent 96bd124d
Branches
Tags
No related merge requests found
...@@ -25,14 +25,16 @@ local function copyWithNLS(t, callback) ...@@ -25,14 +25,16 @@ local function copyWithNLS(t, callback)
elseif type(v) == 'table' then elseif type(v) == 'table' then
v = copyWithNLS(v, callback) v = copyWithNLS(v, callback)
end end
nt[k] = v
if type(k) == 'string' and k:sub(1, #'Lua.') == 'Lua.' then if type(k) == 'string' and k:sub(1, #'Lua.') == 'Lua.' then
local shortKey = k:sub(#'Lua.' + 1)
local ref = { local ref = {
['$ref'] = '#/properties/' .. k ['$ref'] = '#/properties/' .. shortKey
} }
addSplited(nt, k, ref) addSplited(nt, shortKey, ref)
addSplited(nt, k:sub(#'Lua.' + 1), ref) nt[k] = nil
nt[shortKey] = v
end end
nt[k] = v
end end
return nt return nt
end end
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment