Generate all fields for webhooks

This commit is contained in:
Christopher Schleiden
2023-02-16 11:48:48 -08:00
parent 8c36ddeccb
commit f85756a11f
3 changed files with 465484 additions and 10 deletions
-1
View File
@@ -7,7 +7,6 @@
"": {
"name": "webhooks",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"node-fetch": "^3.3.0"
},
-9
View File
@@ -2,8 +2,6 @@
import {getBodyParams} from "./get-body-params.js";
const NO_CHILD_PROPERTIES = ["action", "enterprise", "installation", "organization", "repository", "sender"];
export default class Webhook {
public description: string;
public summary: string;
@@ -46,12 +44,5 @@ export default class Webhook {
const isObject = schema !== null && typeof schema === "object";
this.bodyParameters = isObject ? await getBodyParams(schema, true) : [];
// Removes the children of the common properties
this.bodyParameters.forEach(param => {
if (NO_CHILD_PROPERTIES.includes(param.name)) {
param.childParamsGroups = [];
}
});
}
}
File diff suppressed because it is too large Load Diff