Skip to content

Commit 172e2b3

Browse files
committed
build: remove all instances of enterprise key from GitHub.com
1 parent 9a2cc23 commit 172e2b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/build.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ async function run() {
4343
};
4444

4545
// Check all instances of `$ref` in the OpenAPI spec, and add them to the definitions
46+
// Remove all instances of `enterprise` in the OpenAPI spec for GitHub.com
4647
const handleRefs = (obj) => {
4748
if (typeof obj !== "object" || obj === null) return obj;
4849

4950
for (let key of Object.keys(obj)) {
51+
if (key === "enterprise" && file === "api.github.com.json") {
52+
delete obj[key];
53+
}
5054
if (key === "$ref" && typeof obj[key] === "string") {
5155
const ref = obj[key].split("/").at(-1);
5256
tempSchema.components.schemas[ref] = schema.components.schemas[ref];

0 commit comments

Comments
 (0)