UNPKG

@apideck/portman

Version:

Port OpenAPI Spec to Postman Collection, with contract & variation tests included

15 lines 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renamePostmanCollection = void 0; var renamePostmanCollection = function (oas, options) { var _a, _b; if (!((_a = oas === null || oas === void 0 ? void 0 : oas.info) === null || _a === void 0 ? void 0 : _a.title)) { throw new Error("OpenAPI title is required. Please ensure your OpenAPI document has title."); } if (((_b = oas === null || oas === void 0 ? void 0 : oas.info) === null || _b === void 0 ? void 0 : _b.title) && (options === null || options === void 0 ? void 0 : options.collectionName) && (options === null || options === void 0 ? void 0 : options.collectionName) !== '') { oas.info.title = options.collectionName; } return oas; }; exports.renamePostmanCollection = renamePostmanCollection; //# sourceMappingURL=renamePostmanCollection.js.map