()
| 48 | } |
| 49 | |
| 50 | async process() { |
| 51 | await Promise.all([this.renderDescription(), this.renderBodyParameterDescriptions()]) |
| 52 | |
| 53 | const ajv = new Ajv() |
| 54 | const valid = ajv.validate(webhookSchema, this) |
| 55 | if (!valid) { |
| 56 | console.error(JSON.stringify(ajv.errors, null, 2)) |
| 57 | throw new Error(`Invalid OpenAPI webhook found: ${this.category}`) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | async renderDescription() { |
| 62 | this.descriptionHtml = await renderContent(this.#webhook.description) |
no test coverage detected