Skip to content

Commit

Permalink
Merge pull request #27959 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Sep 1, 2023
2 parents 17cc5ae + 667db55 commit 7989e19
Show file tree
Hide file tree
Showing 9 changed files with 524,282 additions and 293,403 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? (
Expand Down
6 changes: 6 additions & 0 deletions src/rest/scripts/utils/get-body-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
Loading

0 comments on commit 7989e19

Please sign in to comment.