Unverified Commit 441ed57e authored by sean1025's avatar sean1025 Committed by GitHub
Browse files

Merge pull request #1646 from tangcent/feature/openapi_notice

feat: support switch_notice for /interface/save
parents 98a57d04 8e2584a8
......@@ -161,6 +161,7 @@ class interfaceController extends baseController {
path: minLengthStringField,
method: minLengthStringField,
message: minLengthStringField,
switch_notice: 'boolean',
dataSync: 'string'
},
addAndUpCommonField
......@@ -326,7 +327,6 @@ class interfaceController extends baseController {
* @param {String} [desc] 接口描述
* @returns {Object}
*/
async save(ctx) {
let params = ctx.params;
......@@ -358,7 +358,7 @@ class interfaceController extends baseController {
let validParams = Object.assign({}, params)
let validResult = yapi.commons.validateParams(this.schemaMap['up'], validParams);
if (validResult.valid) {
let data = {};
let data = Object.assign({}, ctx);
data.params = validParams;
if(params.res_body_is_json_schema && params.dataSync === 'good'){
......@@ -624,7 +624,6 @@ class interfaceController extends baseController {
* @returns {Object}
* @example ./api/interface/up.json
*/
async up(ctx) {
let params = ctx.params;
......@@ -1022,7 +1021,6 @@ class interfaceController extends baseController {
* @returns {Object}
* @example ./api/interface/getCatMenu
*/
async getCatMenu(ctx) {
let project_id = ctx.params.project_id;
......@@ -1117,7 +1115,6 @@ class interfaceController extends baseController {
* @returns {Object}
* @example
*/
async upIndex(ctx) {
try {
let params = ctx.request.body;
......@@ -1151,7 +1148,6 @@ class interfaceController extends baseController {
* @returns {Object}
* @example
*/
async upCatIndex(ctx) {
try {
let params = ctx.request.body;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment