From 1fa2876eb38c9bebcea9bca2780e628ea0b960d4 Mon Sep 17 00:00:00 2001 From: "gaoxiaolin.gao" Date: Thu, 3 May 2018 10:33:38 +0800 Subject: [PATCH] fix: schema-table object desc --- common/shema-transformTo-table.js | 2 ++ exts/yapi-plugin-import-har/client.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/shema-transformTo-table.js b/common/shema-transformTo-table.js index f292a637..62635c9a 100644 --- a/common/shema-transformTo-table.js +++ b/common/shema-transformTo-table.js @@ -85,10 +85,12 @@ const SchemaObject = (data, key) => { Object.keys(properties).map((name, index) => { let value = properties[name]; let copiedState = checkJsonSchema(JSON.parse(JSON.stringify(value))); + let optionForm = Schema(copiedState, key+'-'+index) let item = { name, key: key+'-'+index, + desc: copiedState.description, required: required.indexOf(name) != -1 } diff --git a/exts/yapi-plugin-import-har/client.js b/exts/yapi-plugin-import-har/client.js index fa9576e8..1b420063 100644 --- a/exts/yapi-plugin-import-har/client.js +++ b/exts/yapi-plugin-import-har/client.js @@ -149,7 +149,7 @@ function postman(importDataModule){ reqType = 'form'; } }) - console.log('data',data) + for(let item in key){ item = key[item]; if(item === "req_query"){