企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## 接口说明 > 更新一个已存在的 stub mapping 。 ## 接口定义 ~~~[api] put:/mappings/{stubMappingId} *string:stubMappingId=03ba2797-e4f3-46f8-a680-fee52ac7ce1e#URI 参数:StubMapping 的 UUID <<< success(request) { "name": "wiremock create a stub example", "priority": 5, "persistent": true, "request": { "method": "POST", "urlPath": "/thing/100", "headers": { "Accept": { "contains": "json" } }, "cookies": { "X-Auth-Token": { "equalTo": "123usidsldie98le" } } }, "response": { "status": 200, "body": "{\n \"test\":\"liyun\",\n \"node\":{\n \"subnode\":\"subnodevalue\"\n }\n}", "headers": { "Content-Type": "application/json" }, "delayDistribution": { "type": "uniform", "lower": 100, "upper": 300 }, "transformers": ["response-template"] }, "scenarioName": "订单", "requiredScenarioState": "Started", "newScenarioState": "second" } <<< success(response) { "id" : "03ba2797-e4f3-46f8-a680-fee52ac7ce1e", "name" : "wiremock create a stub example", "request" : { "urlPath" : "/thing/100", "method" : "POST", "headers" : { "Accept" : { "contains" : "json" } }, "cookies" : { "X-Auth-Token" : { "equalTo" : "123usidsldie98le" } } }, "response" : { "status" : 200, "body" : "{\n \"test\":\"liyun\",\n \"node\":{\n \"subnode\":\"subnodevalue\"\n }\n}", "headers" : { "Content-Type" : "application/json" }, "delayDistribution" : { "type" : "uniform", "lower" : 100, "upper" : 300 }, "transformers" : [ "response-template" ] }, "uuid" : "03ba2797-e4f3-46f8-a680-fee52ac7ce1e", "persistent" : true, "priority" : 5, "scenarioName" : "订单", "requiredScenarioState" : "Started", "newScenarioState" : "second" } ~~~ ## [JSON Schema](https://jsonschema.net/) ### Request JSON Schema 同 [Stub Mapping](StubMapping.md) 。 ### Response JSON Schema 同 [Stub Mapping](StubMapping.md) 。