whistle.mock-plugins 1.1.1-dev.12 → 1.1.1-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -183,6 +183,7 @@ module.exports = function(req, res) {
|
|
|
183
183
|
interfacesData.interfaces[index] = {
|
|
184
184
|
...interfacesData.interfaces[index],
|
|
185
185
|
name: interfaceData.name,
|
|
186
|
+
group: interfaceData.group !== undefined ? interfaceData.group : interfacesData.interfaces[index].group || '', // 添加分组字段
|
|
186
187
|
urlPattern: interfaceData.urlPattern,
|
|
187
188
|
proxyType: interfaceData.proxyType,
|
|
188
189
|
responseContent: interfaceData.responseContent,
|
|
@@ -217,6 +218,7 @@ module.exports = function(req, res) {
|
|
|
217
218
|
id: Date.now().toString(),
|
|
218
219
|
featureId: interfaceData.featureId,
|
|
219
220
|
name: interfaceData.name,
|
|
221
|
+
group: interfaceData.group || '', // 添加分组字段
|
|
220
222
|
urlPattern: interfaceData.urlPattern,
|
|
221
223
|
proxyType: interfaceData.proxyType || 'response',
|
|
222
224
|
responseContent: interfaceData.responseContent || '',
|
|
@@ -235,6 +237,7 @@ module.exports = function(req, res) {
|
|
|
235
237
|
|
|
236
238
|
console.log('创建新接口,包含多响应数据:', {
|
|
237
239
|
name: newInterface.name,
|
|
240
|
+
group: newInterface.group, // 添加分组日志
|
|
238
241
|
responsesCount: newInterface.responses.length,
|
|
239
242
|
activeResponseId: newInterface.activeResponseId
|
|
240
243
|
});
|
|
@@ -343,6 +346,7 @@ module.exports = function(req, res) {
|
|
|
343
346
|
const updatedInterface = {
|
|
344
347
|
...interfacesData.interfaces[index],
|
|
345
348
|
name: interfaceData.name || interfacesData.interfaces[index].name,
|
|
349
|
+
group: interfaceData.group !== undefined ? interfaceData.group : interfacesData.interfaces[index].group || '', // 添加分组字段
|
|
346
350
|
urlPattern: interfaceData.urlPattern || interfacesData.interfaces[index].urlPattern,
|
|
347
351
|
proxyType: interfaceData.proxyType || interfacesData.interfaces[index].proxyType,
|
|
348
352
|
responseContent: interfaceData.responseContent !== undefined ? interfaceData.responseContent : interfacesData.interfaces[index].responseContent,
|
|
@@ -362,6 +366,7 @@ module.exports = function(req, res) {
|
|
|
362
366
|
|
|
363
367
|
console.log('PUT更新接口,包含多响应数据:', {
|
|
364
368
|
name: updatedInterface.name,
|
|
369
|
+
group: updatedInterface.group, // 添加分组日志
|
|
365
370
|
responsesCount: updatedInterface.responses.length,
|
|
366
371
|
activeResponseId: updatedInterface.activeResponseId
|
|
367
372
|
});
|