Skip to content

Commit 667db55

Browse files
authored
Bring back some allof processing for webhooks (#41436)
1 parent 7bdb527 commit 667db55

File tree

9 files changed

+524282
-293403
lines changed

9 files changed

+524282
-293403
lines changed

src/automated-pipelines/components/parameter-table/ParameterRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function ParameterRow({
158158
an API request to get the nested parameter data.
159159
*/}
160160
{rowParams.type &&
161-
(rowParams.type === 'object' || rowParams.type.includes('array of')) &&
161+
(rowParams.type.includes('object') || rowParams.type.includes('array of')) &&
162162
rowParams.childParamsGroups &&
163163
rowParams.childParamsGroups.length === 0 &&
164164
!NO_CHILD_WEBHOOK_PROPERTIES.includes(rowParams.name) ? (

src/rest/scripts/utils/get-body-params.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ export async function getBodyParams(schema, topLevel = false) {
173173
param.description = param.anyOf[0].description
174174
param.isRequired = param.anyOf[0].required
175175
}
176+
} else if (param && param.allOf) {
177+
// this else is only used for webhooks handling of allOf
178+
for (const prop of param.allOf) {
179+
paramType.push('object')
180+
childParamsGroups.push(...(await getBodyParams(prop, false)))
181+
}
176182
}
177183

178184
const paramDecorated = await getTransformedParam(param, paramType, {

0 commit comments

Comments
 (0)