如何配置restfull接口请求URL路径包含动态参数问题 #2129
Unanswered
keith-java
asked this question in
Q&A
Replies: 1 comment
-
|
你现在用最新版本试一下,已经支持了 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1、接口采用java编写的restfull形式接口,请求url中包含动态参数
2、将higress配置nacos注册中心获取mcp-server.json配置
2、在nacos中配置接口描述,无法实现url中动态参数的动态传递,mcp-server.json配置如下:
{ "protocol": "http", "tools": [ { "name": "getShopCommodityById", "description": "根据主键查询店铺商品信息", "inputSchema": { "type": "object", "properties": { "path_id": { "type": "string", "description": "店铺商品的主键ID,用于设置请求URL动态参数path_id", "x-param-location": "path" } }, "required": ["path_id"] } } ], "toolsMeta": { "getShopCommodityById": { "InvokeContext": { "path": "/shopCommodity/getShopCommodityById/{path_id}", "method": "GET" } } } }Beta Was this translation helpful? Give feedback.
All reactions