UNPKG

@autorest/openapi-to-typespec

Version:

Autorest plugin to scaffold a Typespec definition from an OpenAPI document

19 lines 673 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAllPaths = void 0; function getAllPaths(model) { var _a, _b; const paths = new Map(); for (const _operationGroup of model.operationGroups) { for (const operation of model.operationGroups) { const path = (_a = operation.protocol.http) === null || _a === void 0 ? void 0 : _a.path; if (!path) { continue; } paths.set((_b = operation.protocol.http) === null || _b === void 0 ? void 0 : _b.path, {}); } } return paths; } exports.getAllPaths = getAllPaths; //# sourceMappingURL=paths.js.map