We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b221a3d commit ac2185dCopy full SHA for ac2185d
scripts/generate-endpoint-names.js
@@ -62,6 +62,20 @@ for (const url of Object.keys(PATHS_SPEC)) {
62
}
63
64
65
+const existingEndpointUrls = Object.keys(PATHS_SPEC)
66
+const nonExistentEndpointUrls = Object.keys(ENDPOINT_NAMES).filter(
67
+ (url) => !existingEndpointUrls.includes(url)
68
+)
69
+
70
+if (nonExistentEndpointUrls.length !== 0) {
71
+ throw new Error(
72
+ [
73
+ `Non-existent URLs:`,
74
+ ...nonExistentEndpointUrls.map((url) => `- ${url}`),
75
+ ].join('\n')
76
+ )
77
+}
78
79
fs.writeFileSync(
80
endpointNamesPath,
81
`${JSON.stringify(deepsort(ENDPOINT_NAMES), null, 2)}\n`
0 commit comments