Merge pull request #166 from github/cschleiden/update-webhooks

Update webhooks with `allOf` handling
This commit is contained in:
Christopher Schleiden
2023-02-23 14:45:00 -08:00
committed by GitHub
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, {
File diff suppressed because it is too large Load Diff