Skip to content

Commit 6e66ccd

Browse files
committed
Make doc IDs repo variables
1 parent 25341fa commit 6e66ccd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/scripts/generateSpecMapping.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ import { fileURLToPath } from 'node:url';
55
const __filename = fileURLToPath(import.meta.url);
66
const __dirname = path.dirname(__filename);
77

8-
// Add new specs to be deployed to Bump here
8+
// Standalone specs can be added directly to the mapping. Any spec that requires displaying a version dropdown
9+
// will need to map its different versions to a separate Bump "branch". For example, a new resource version
10+
// for Atlas Admin API v2 will lead to a new entry in the array with its own Bump branch.
911
const SPEC_MAPPING = [
1012
{
11-
doc: 'f929d2d7-27d7-4591-b22f-6c2e543a7874',
13+
doc: process.env.ATLAS_ADMIN_V1_DOC_ID,
1214
file: 'openapi/v1-deprecated/v1.json',
1315
branch: 'main',
1416
},
1517
];
1618

1719
function handleAdminAPIv2() {
18-
const docId = '2accf4b8-a543-426c-94c3-794ae26b68be';
20+
const docId = process.env.ATLAS_ADMIN_V2_DOC_ID;
1921
const directory = 'openapi/v2';
2022
const filePath = path.join(__dirname, `../../${directory}/versions.json`);
2123
const versions = JSON.parse(fs.readFileSync(filePath, 'utf8'));

0 commit comments

Comments
 (0)