1
0
mirror of synced 2026-01-16 18:01:39 -05:00

Merge pull request #19699 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2022-08-11 20:42:42 -04:00
committed by GitHub
9 changed files with 5880 additions and 32346 deletions

View File

@@ -4,7 +4,7 @@ import type { ChildParamsGroup } from './types'
type Props = {
slug: string
childParamsGroups: ChildParamsGroup[]
childParamsGroups?: ChildParamsGroup[]
}
export function ChildBodyParametersRows({ slug, childParamsGroups }: Props) {

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

View File

@@ -165,6 +165,9 @@ export default class Operation {
async renderBodyParameterDescriptions() {
if (!this.#operation.requestBody) return []
// There is currently only one operation with more than one content type
// and the request body parameter types are the same for both.
// Operation Id: markdown/render-raw
const contentType = Object.keys(this.#operation.requestBody.content)[0]
let bodyParamsObject = get(
this.#operation,
@@ -378,13 +381,17 @@ async function getBodyParams(paramsObject, requiredParams) {
param.childParamsGroups.push(
...flatten(
childParamsGroup.params
.filter((param) => param.childParamsGroups.length)
.filter((param) => param.childParamsGroups?.length)
.map((param) => param.childParamsGroups)
)
)
}
return param
const paramDecorated = { ...param }
delete paramDecorated.items
delete paramDecorated.rawDescription
delete paramDecorated.rawType
if (paramDecorated.childParamsGroups.length === 0) delete paramDecorated.childParamsGroups
return paramDecorated
})
)
}