aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2026-03-13 23:14:07 +0800
committerYi Ming <ofseed@foxmail.com>2026-03-13 23:14:30 +0800
commit45679130eab4efe19066dd55d71513a6ec208f1d (patch)
treebac5bb295cc97663cf02dff3cfc06762fbc479fa /scripts
parentfix: avoid duplicate class names for nested schemas (diff)
downloadnvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar.gz
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar.bz2
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar.lz
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar.xz
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.tar.zst
nvim-lspconfig-45679130eab4efe19066dd55d71513a6ec208f1d.zip
fix: map array object items to table[]
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen_annotations.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen_annotations.lua b/scripts/gen_annotations.lua
index 08ed2310..d71c88b8 100644
--- a/scripts/gen_annotations.lua
+++ b/scripts/gen_annotations.lua
@@ -224,9 +224,9 @@ local function lua_type_for(prop)
if t == 'array' then
if prop.items and prop.items.type then
if type(prop.items.type) == 'table' then
- prop.items.type = 'any'
+ return 'any[]'
end
- return prop.items.type .. '[]'
+ return (prop.items.type == 'object' and 'table' or prop.items.type) .. '[]'
end
return 'any[]'
end