From 6df0be4252d32f4453949c3cae1cfc2f0da28f09 Mon Sep 17 00:00:00 2001 From: tangcent Date: Thu, 13 Feb 2020 22:50:57 +0800 Subject: [PATCH] fix: fix typo `shema` -> `schema` --- client/components/SchemaTable/SchemaTable.js | 2 +- common/markdown.js | 2 +- .../{shema-transformTo-table.js => schema-transformTo-table.js} | 0 server/middleware/mockServer.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename common/{shema-transformTo-table.js => schema-transformTo-table.js} (100%) diff --git a/client/components/SchemaTable/SchemaTable.js b/client/components/SchemaTable/SchemaTable.js index 11405ce5..9dece949 100644 --- a/client/components/SchemaTable/SchemaTable.js +++ b/client/components/SchemaTable/SchemaTable.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Table } from 'antd'; import json5 from 'json5'; import PropTypes from 'prop-types'; -import { schemaTransformToTable } from '../../../common/shema-transformTo-table.js'; +import { schemaTransformToTable } from '../../../common/schema-transformTo-table.js'; import _ from 'underscore'; import './index.scss'; diff --git a/common/markdown.js b/common/markdown.js index 53edd978..e4673d26 100644 --- a/common/markdown.js +++ b/common/markdown.js @@ -1,4 +1,4 @@ -const schema = require('./shema-transformTo-table.js'); +const schema = require('./schema-transformTo-table.js'); const _ = require('underscore'); const json_parse = function(json) { diff --git a/common/shema-transformTo-table.js b/common/schema-transformTo-table.js similarity index 100% rename from common/shema-transformTo-table.js rename to common/schema-transformTo-table.js diff --git a/server/middleware/mockServer.js b/server/middleware/mockServer.js index 37cf51c3..c77d9ebc 100755 --- a/server/middleware/mockServer.js +++ b/server/middleware/mockServer.js @@ -130,7 +130,7 @@ function mockValidator(interfaceData, ctx) { if (noRequiredArr.length > 0 || (validResult && !validResult.valid)) { let message = `错误信息:`; message += noRequiredArr.length > 0 ? `缺少必须字段 ${noRequiredArr.join(',')} ` : ''; - message += validResult && !validResult.valid ? `shema 验证请求参数 ${validResult.message}` : ''; + message += validResult && !validResult.valid ? `schema 验证请求参数 ${validResult.message}` : ''; return { valid: false,