yingmanji opened a new issue, #2928:
URL: https://github.com/apache/apisix-dashboard/issues/2928
### Issue description
使用apisix-dashboard 插件编排模式创建的路由,点击下线/发布 按钮会报错误:schema validate failed:
script: Invalid type. Expected: string, given: object
apisix版本:3.8.0
apisix dashboard 版本:3.0.1
查看apisix dashboard 日志可以看到如下报错:
ERROR store/validate.go:251 schema validate failed:s:
{"allOf":[{"oneOf":[{"required":["uri"]}
....
ERROR store/store.go:224 data validate failed: schema validate
failed: script: Invalid type. Expected: string, given: object,
&{{500595392396657348 1707907705 1707920088} /test [] demo3 0 [GET POST PUT
DELETE PATCH HEAD OPTIONS CONNECT TRACE PURGE] simple-java-app.example.com []
[][] map[chart:map[cells:[map[attrs:map[line:map[stroke:#5F95FF strokeWidth:1
targetMarker:map[name:classic size:8]]] id:884af56b-1f26-4f85-8e9a-2ca1570095aa
router:map[name:manhattan] shape:edge
source:map[cell:dcb03afe-26ec-40d7-aee3-12bba6b2a971
port:5f8ab45a-0929-4cd9-a26d-5ec3cb6eb068]
target:map[cell:79d9c338-e182-44c9-883c-4e8c60b26b82
port:7b3d789b-bd5d-4c9b-bd1c-a7a568afff8d] zIndex:0]
map[attrs:map[line:map[stroke:#5F95FF strokeWidth:1
targetMarker:map[name:classic size:8]]] id:64be95b4-ceab-414f-b65d-b991094e9cf2
router:map[name:manhattan] shape:edge
source:map[cell:79d9c338-e182-44c9-883c-4e8c60b26b82
port:6d5dd30d-d2ca-4b4e-b4f2-b31a7178609f]
target:map[cell:91e46b76-93d8-49fe-85a0-bcd1087e
c8d4 port:9baf1647-4669-453f-bb60-50d2b26f463c] zIndex:0]
map[attrs:map[line:map[stroke:#5F95FF strokeWidth:1
targetMarker:map[name:classic size:8]]] id:afe158d5-8948-42aa-b7cb-8c78095579f0
router:map[name:manhattan] shape:edge
source:map[cell:91e46b76-93d8-49fe-85a0-bcd1087ec8d4
port:cc5d4881-f6b6-4a4d-92b2-8a6977335455]
target:map[cell:02cfd4f8-3b92-446a-9737-f6f55cb16817
port:a17e3be5-c179-48d1-84d3-3827a76ea109] zIndex:0]
map[attrs:map[body:map[rx:24 ry:24] text:map[textWrap:map[text:开始]]]
id:dcb03afe-26ec-40d7-aee3-12bba6b2a971
ports:map[groups:map[bottom:map[attrs:map[circle:map[fill:#fff magnet:true r:3
stroke:#5F95FF strokeWidth:1 style:map[visibility:hidden]]] position:bottom]
left:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:left]
right:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:right]
top:map[attrs:map[circle:map[fill:
#fff magnet:true r:3 stroke:#5F95FF strokeWidth:1
style:map[visibility:hidden]]] position:top]] items:[map[group:bottom
id:5f8ab45a-0929-4cd9-a26d-5ec3cb6eb068]]] position:map[x:420 y:110]
shape:flow-chart-start-rect size:map[height:42 width:80] zIndex:1]
map[attrs:map[text:map[text:key-auth] title:map[text:key-auth]]
data:map[disable:false header:apikey] id:79d9c338-e182-44c9-883c-4e8c60b26b82
ports:map[groups:map[bottom:map[attrs:map[circle:map[fill:#fff magnet:true r:3
stroke:#5F95FF strokeWidth:1 style:map[visibility:hidden]]] position:bottom]
top:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:top]]
items:[map[group:top id:7b3d789b-bd5d-4c9b-bd1c-a7a568afff8d] map[group:bottom
id:6d5dd30d-d2ca-4b4e-b4f2-b31a7178609f]]] position:map[x:360 y:220]
shape:flow-chart-plugin-rect size:map[height:60 width:200] zIndex:2]
map[angle:45 attrs:map[text:map[textWrap:map[text:条件判断]
transform:rotate(-45deg)]] data:
code==401 id:91e46b76-93d8-49fe-85a0-bcd1087ec8d4
ports:map[groups:map[bottom:map[attrs:map[circle:map[fill:#fff magnet:true r:3
stroke:#5F95FF strokeWidth:1 style:map[visibility:hidden]]]
position:map[args:map[dx:26] name:bottom]]
left:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:map[args:map[dy:26]
name:left]] right:map[attrs:map[circle:map[fill:#fff magnet:true r:3
stroke:#5F95FF strokeWidth:1 style:map[visibility:hidden]]]
position:map[args:map[dy:-26] name:right]]
top:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:map[args:map[dx:-26]
name:top]]] items:[map[group:top id:9baf1647-4669-453f-bb60-50d2b26f463c]
map[group:right id:615694ab-40bf-4a51-aa86-548e0e2a2bdf] map[group:bottom
id:cc5d4881-f6b6-4a4d-92b2-8a6977335455]]] position:map[x:431 y:328]
shape:flow-chart-condition-rect size:map[height:58 width:58] zIndex:3]
map[attrs:map[t
ext:map[text:uri-blocker] title:map[text:uri-blocker]]
data:map[block_rules:[test] disable:false rejected_code:403 rejected_msg:this
is a simple blocker test] id:02cfd4f8-3b92-446a-9737-f6f55cb16817
ports:map[groups:map[bottom:map[attrs:map[circle:map[fill:#fff magnet:true r:3
stroke:#5F95FF strokeWidth:1 style:map[visibility:hidden]]] position:bottom]
top:map[attrs:map[circle:map[fill:#fff magnet:true r:3 stroke:#5F95FF
strokeWidth:1 style:map[visibility:hidden]]] position:top]]
items:[map[group:top id:a17e3be5-c179-48d1-84d3-3827a76ea109] map[group:bottom
id:66b2de8d-13ee-4baa-98ee-3a49fff8ec86]]] position:map[x:390 y:450]
shape:flow-chart-plugin-rect size:map[height:60 width:200] zIndex:4]]]
conf:map[02cfd4f8-3b92-446a-9737-f6f55cb16817:map[conf:map[block_rules:[test]
disable:false rejected_code:403 rejected_msg:this is a simple blocker test]
name:uri-blocker]
79d9c338-e182-44c9-883c-4e8c60b26b82:map[conf:map[disable:false header:apikey]
name:key-auth]] rule:map[79d9c338-e182-44c
9-883c-4e8c60b26b82:[[code==401 02cfd4f8-3b92-446a-9737-f6f55cb16817]]
root:79d9c338-e182-44c9-883c-4e8c60b26b82]] 500595392396657348 map[] <nil>
<nil> <nil> 500595312788767428 map[API_VERSION:3.0] false 0}
### Expected behavior
使用apisix-dashboard 插件编排模式创建的路由,点击 下线/发布 按钮不会报错
### How to Reproduce
通过apisix manager api 可以正常更改状态
curl http://127.0.0.1:9180/apisix/admin/routes/499429907537855172 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PATCH -i -d '
{
"status": 0
}'
### Screenshots
_No response_
### Environment
- apisix version (cmd: `apisix version`):
- OS (cmd: `uname -a`):
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `etcd --version`):
- apisix-dashboard version, if have:
- Browser version, if have:
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]