()
| 151 | } |
| 152 | |
| 153 | async renderBodyParameterDescriptions() { |
| 154 | if (!this.#operation.requestBody) return [] |
| 155 | // There is currently only one operation with more than one content type |
| 156 | // and the request body parameter types are the same for both. |
| 157 | // Operation Id: markdown/render-raw |
| 158 | const contentType = Object.keys(this.#operation.requestBody.content)[0] |
| 159 | const schema = get(this.#operation, `requestBody.content.${contentType}.schema`, {}) |
| 160 | // TODO: Remove this check |
| 161 | if (this.#operation.operationId === 'checks/create') { |
| 162 | delete schema.oneOf |
| 163 | } |
| 164 | |
| 165 | this.bodyParameters = isPlainObject(schema) ? await getBodyParams(schema, true) : [] |
| 166 | } |
| 167 | |
| 168 | async renderPreviewNotes() { |
| 169 | const previews = get(this.#operation, 'x-github.previews', []) |
no test coverage detected