1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Bring back some allof processing for webhooks (#41436)

This commit is contained in:
Robert Sese
2023-09-01 15:25:01 -05:00
committed by GitHub
parent 7bdb527fab
commit 667db55fbd
9 changed files with 231350 additions and 471 deletions

View File

@@ -158,7 +158,7 @@ export function ParameterRow({
an API request to get the nested parameter data.
*/}
{rowParams.type &&
(rowParams.type === 'object' || rowParams.type.includes('array of')) &&
(rowParams.type.includes('object') || rowParams.type.includes('array of')) &&
rowParams.childParamsGroups &&
rowParams.childParamsGroups.length === 0 &&
!NO_CHILD_WEBHOOK_PROPERTIES.includes(rowParams.name) ? (

View File

@@ -173,6 +173,12 @@ export async function getBodyParams(schema, topLevel = false) {
param.description = param.anyOf[0].description
param.isRequired = param.anyOf[0].required
}
} else if (param && param.allOf) {
// this else is only used for webhooks handling of allOf
for (const prop of param.allOf) {
paramType.push('object')
childParamsGroups.push(...(await getBodyParams(prop, false)))
}
}
const paramDecorated = await getTransformedParam(param, paramType, {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff