文件操作 - spec-strict-refs.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@redocly/openapi-core/src/rules/common/spec-strict-refs.ts
编辑文件内容
import { isRef } from '../../ref-utils'; import type { Oas2Rule, Oas3Rule } from '../../visitors'; export const SpecStrictRefs: Oas3Rule | Oas2Rule = () => { const nodesToSkip = [ 'Schema', 'Response', 'Parameter', 'RequestBody', 'Example', 'Header', 'SecurityScheme', 'Link', 'Callback', 'PathItem', ]; return { any(_node, { report, rawNode, rawLocation, type }) { const shouldCheck = !nodesToSkip.includes(type.name); if (shouldCheck && isRef(rawNode)) { report({ message: 'Field $ref is not expected here.', location: rawLocation.child('$ref').key(), }); } }, }; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件