Bring back some allof processing for webhooks (#41436)
This commit is contained in:
@@ -158,7 +158,7 @@ export function ParameterRow({
|
|||||||
an API request to get the nested parameter data.
|
an API request to get the nested parameter data.
|
||||||
*/}
|
*/}
|
||||||
{rowParams.type &&
|
{rowParams.type &&
|
||||||
(rowParams.type === 'object' || rowParams.type.includes('array of')) &&
|
(rowParams.type.includes('object') || rowParams.type.includes('array of')) &&
|
||||||
rowParams.childParamsGroups &&
|
rowParams.childParamsGroups &&
|
||||||
rowParams.childParamsGroups.length === 0 &&
|
rowParams.childParamsGroups.length === 0 &&
|
||||||
!NO_CHILD_WEBHOOK_PROPERTIES.includes(rowParams.name) ? (
|
!NO_CHILD_WEBHOOK_PROPERTIES.includes(rowParams.name) ? (
|
||||||
|
|||||||
@@ -173,6 +173,12 @@ export async function getBodyParams(schema, topLevel = false) {
|
|||||||
param.description = param.anyOf[0].description
|
param.description = param.anyOf[0].description
|
||||||
param.isRequired = param.anyOf[0].required
|
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, {
|
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
Reference in New Issue
Block a user