Skip to content

Commit 4db9147

Browse files
committed
Fix build spec id conflicts
1 parent 8fb0164 commit 4db9147

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/buildtime/generate-apis.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ const IGNORED_SPEC_IDS = [
333333
'github.com/api.github.com.2022-11-28'
334334
];
335335

336+
const IGNORED_SPEC_PATHS = [
337+
'node_modules/openapi-directory/APIs/ably.net/control/1.0.14/openapi.yaml', // Dupe of ably.net/control/v1
338+
'node_modules/openapi-directory/APIs/visma.net/1.0.14.784/openapi.yaml' // Old & conflicting with Visma 9.0 spec
339+
];
340+
336341
// For some specs, we do want to include the spec in the collection, but the server URLs shouldn't
337342
// be indexed, because they're not valid public URLs. For example, relative URLs, localhost/local
338343
// network URLs, etc. The specs can still be required by id, where required, it's just that they're
@@ -381,7 +386,7 @@ export async function generateApis(globs: string[], options: ApiGenerationOption
381386

382387
// To work around some awkward spec overlaps, in some cases we drop specs from the index
383388
// unilaterally, to effectively override our 'preferred' version as the
384-
if (IGNORED_SPEC_IDS.includes(specId)) return;
389+
if (IGNORED_SPEC_IDS.includes(specId) || IGNORED_SPEC_PATHS.includes(specSource)) return;
385390

386391
const { servers } = spec;
387392
const serverUrls = _(servers!)

0 commit comments

Comments
 (0)