MCPcopy
hub / github.com/github/docs / renderBodyParameterDescriptions

Method renderBodyParameterDescriptions

src/rest/scripts/utils/webhook.js:67–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 async renderBodyParameterDescriptions() {
68 if (!this.#webhook.requestBody) return []
69 const schema = get(this.#webhook, `requestBody.content.['application/json'].schema`, {})
70 this.bodyParameters = isPlainObject(schema) ? await getBodyParams(schema, true, this.title) : []
71
72 // Removes the children of the common properties
73 this.bodyParameters.forEach((param) => {
74 if (NO_CHILD_PROPERTIES.includes(param.name)) {
75 param.childParamsGroups = []
76 }
77 })
78 }
79}

Callers 1

processMethod · 0.95

Calls 2

getBodyParamsFunction · 0.90
getFunction · 0.85

Tested by

no test coverage detected