@har-sdk/core
Version:
The base package can be used to import specification files (i.e. HAR, OAS and Postman Collection) and detect their type.
16 lines • 579 B
JavaScript
import { BaseImporter } from './BaseImporter';
export class BaseOASImporter extends BaseImporter {
constructor() {
super();
}
fileName({ doc, format }) {
var _a;
if (typeof ((_a = doc === null || doc === void 0 ? void 0 : doc.info) === null || _a === void 0 ? void 0 : _a.title) === 'string' &&
typeof doc.info.version === 'string') {
return `${[doc.info.title, doc.info.version]
.map((x) => x.trim())
.join(' ')}.${format}`;
}
}
}
//# sourceMappingURL=BaseOASImporter.js.map