Merge all allOf params for webhooks

This commit is contained in:
Christopher Schleiden
2023-02-23 13:15:14 -08:00
parent 6843c36809
commit 4a882b0aae
2 changed files with 45150 additions and 74 deletions
@@ -157,6 +157,16 @@ export async function getBodyParams(schema: any, topLevel = false): Promise<any>
param.description = param.anyOf[0].description;
param.isRequired = param.anyOf[0].required;
}
} else if (param && param.allOf && param.allOf.length > 0) {
paramType.push("object");
const firstObject = param.allOf[0];
param.description = firstObject.description;
param.isRequired = firstObject.required;
for (const a of param.allOf) {
childParamsGroups.push(...(await getBodyParams(a, false)));
}
}
const paramDecorated = await getTransformedParam(param, paramType, {