文件操作 - no-identical-paths.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js
编辑文件内容
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NoIdenticalPaths = void 0; const NoIdenticalPaths = () => { return { Paths(pathMap, { report, location }) { const Paths = new Map(); for (const pathName of Object.keys(pathMap)) { const id = pathName.replace(/{.+?}/g, '{VARIABLE}'); const existingSamePath = Paths.get(id); if (existingSamePath) { report({ message: `The path already exists which differs only by path parameter name(s): \`${existingSamePath}\` and \`${pathName}\`.`, location: location.child([pathName]).key(), }); } else { Paths.set(id, pathName); } } }, }; }; exports.NoIdenticalPaths = NoIdenticalPaths;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件