mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Add new model types for Swagger APIs and remove obsolete models
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Script that downloads the swagger file from the given url
|
||||
*/
|
||||
const fetch = require('node-fetch');
|
||||
const https = require('https');
|
||||
const path = require('path');
|
||||
|
||||
const httpsAgent = new https.Agent({
|
||||
rejectUnauthorized: false,
|
||||
});
|
||||
|
||||
(async () => {
|
||||
const url = process.argv[2];
|
||||
const fileName = process.argv[3];
|
||||
const res = await fetch(url, {
|
||||
agent: httpsAgent,
|
||||
});
|
||||
|
||||
// Write the file to the disk
|
||||
const fileStream = require('fs').createWriteStream(fileName);
|
||||
res.body.pipe(fileStream);
|
||||
console.log('Swagger file downloaded successfully');
|
||||
})();
|
||||
Reference in New Issue
Block a user