文件操作 - no-path-trailing-slash.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@redocly/openapi-core/src/rules/common/no-path-trailing-slash.ts
编辑文件内容
import type { Oas3Rule, Oas2Rule } from '../../visitors'; import type { UserContext } from '../../walk'; export const NoPathTrailingSlash: Oas3Rule | Oas2Rule = () => { return { PathItem(_path: any, { report, key, rawLocation }: UserContext) { if ((key as string).endsWith('/') && key !== '/') { report({ message: `\`${key}\` should not have a trailing slash.`, location: rawLocation.key(), }); } }, }; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件