Fixed [n] keys because they aren't actually arrays but represent net0-netn

This commit is contained in:
JanHolger 2020-12-28 09:52:23 +01:00
parent 4a0616bb00
commit 7393ce4263
2 changed files with 2095 additions and 93 deletions

View file

@ -55,9 +55,8 @@ function buildResponseSchema(source){
Object.keys(source.properties || {}).forEach(k => {
if(k.endsWith('[n]')){
const nk = k.substr(0, k.length-3)
schema.properties[nk] = {
type: 'array',
items: buildResponseSchema(source.properties[k])
for(let i=0; i<30; i++){
schema.properties[nk+i] = buildResponseSchema(source.properties[k])
}
}else{
schema.properties[k] = buildResponseSchema(source.properties[k])

File diff suppressed because it is too large Load diff