文件操作 - spot-supported-versions.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@redocly/openapi-core/src/rules/spot/spot-supported-versions.ts
编辑文件内容
import { ARAZZO_VERSIONS_SUPPORTED_BY_SPOT } from '../../typings/arazzo'; import { pluralize } from '../../utils'; import type { Arazzo1Rule } from '../../visitors'; import type { UserContext } from '../../walk'; export const SpotSupportedVersions: Arazzo1Rule = () => { const supportedVersions = ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.join(', '); return { Root: { enter(root, { report, location }: UserContext) { if (!ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.includes(root.arazzo)) { report({ message: `Only ${supportedVersions} Arazzo ${pluralize( 'version is', ARAZZO_VERSIONS_SUPPORTED_BY_SPOT.length )} supported by Spot.`, location: location.child('arazzo'), }); } }, }, }; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件