mirror of
https://github.com/tribufu/proxmox-ve-openapi
synced 2026-06-01 09:42:38 +00:00
Fixed [n] keys because they aren't actually arrays but represent net0-netn
This commit is contained in:
parent
4a0616bb00
commit
7393ce4263
2 changed files with 2095 additions and 93 deletions
|
|
@ -55,9 +55,8 @@ function buildResponseSchema(source){
|
||||||
Object.keys(source.properties || {}).forEach(k => {
|
Object.keys(source.properties || {}).forEach(k => {
|
||||||
if(k.endsWith('[n]')){
|
if(k.endsWith('[n]')){
|
||||||
const nk = k.substr(0, k.length-3)
|
const nk = k.substr(0, k.length-3)
|
||||||
schema.properties[nk] = {
|
for(let i=0; i<30; i++){
|
||||||
type: 'array',
|
schema.properties[nk+i] = buildResponseSchema(source.properties[k])
|
||||||
items: buildResponseSchema(source.properties[k])
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
schema.properties[k] = buildResponseSchema(source.properties[k])
|
schema.properties[k] = buildResponseSchema(source.properties[k])
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue