@igli.kokici/st-open-api
Version:
Generates API client SDKs from an OpenAPI specification written in OpenAPI version 3.x.x
16 lines • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var nodePath = require("path");
var fs_1 = require("fs");
exports.copyResources = function (configuration) {
var folder = configuration.getFolderManager();
var iAjaxInterface = nodePath.join(__dirname, '..', 'static', 'interface', 'i-$-open-api.ts');
var httpFunction = nodePath.join(__dirname, '..', 'static', 'function', "http-" + configuration.getProviderName() + ".ts");
var queryFunction = nodePath.join(__dirname, '..', 'static', 'function', 'get-query-params.ts');
var openApiFunction = nodePath.join(__dirname, '..', 'static', 'function', 'open-api.ts');
fs_1.copyFileSync(httpFunction, nodePath.join(folder.getFunctionFolder(), 'http.ts'));
fs_1.copyFileSync(queryFunction, nodePath.join(folder.getFunctionFolder(), 'get-query-params.ts'));
fs_1.copyFileSync(openApiFunction, nodePath.join(folder.getFunctionFolder(), 'open-api.ts'));
fs_1.copyFileSync(iAjaxInterface, nodePath.join(folder.getInterfaceFolder(), 'i-$-open-api.ts'));
};
//# sourceMappingURL=copy-resources.js.map