文件操作 - no-invalid-schema-examples.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js
编辑文件内容
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NoInvalidSchemaExamples = void 0; const utils_1 = require("../utils"); const NoInvalidSchemaExamples = (opts) => { const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false; return { Schema: { leave(schema, ctx) { if (schema.examples) { for (const example of schema.examples) { (0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', schema.examples.indexOf(example)]), ctx, allowAdditionalProperties); } } if (schema.example !== undefined) { (0, utils_1.validateExample)(schema.example, schema, ctx.location.child('example'), ctx, true); } }, }, }; }; exports.NoInvalidSchemaExamples = NoInvalidSchemaExamples;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件