-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: the script field in Route is limited to map, instead of string #1275
Comments
Good capture. I think we need to fix it.
|
I've one more question, when creating a |
cc @nic-chen |
oh, please have a look at test cases for plugin orchestration: and you will know why. |
Thanks for pointing this out. I guess you mean the If yes, may I ask that how we could add a script like Please let me know if I missed anything important. 😄 Much appreciated. |
Yes. The threshold for manually writing Lua code to implement plugin orchestration is too high. We prefer that users use the FE to drag for plugin orchestration, not write Lua code. |
@nic-chen got it. Much appreciated for the explanation. I will propose a PR that also supports |
Thanks. |
Bug report
Describe the bug
In APISIX, we can see the
script
field inRoute
is of typestring
.https://github.com/apache/apisix/blob/3e19b06293463f52c8d26f0958542fc475ff0fcd/apisix/schema_def.lua#L456
While as creating a Route in manager-api, we forcibly cast the script to
map[string]interface{}
.apisix-dashboard/api/internal/handler/route/route.go
Line 332 in 0f322e1
So if sending a request to manager-api as below,
manager-api will always complain with the following error:
As a contrast, the similar request can be successfully processed by APISIX Admin API.
Is such situation mentioned above as expected? Much appreciated.
Expected behavior
manager-api could also accept the
script
field ofstring
type.System information
Additional
This issue is also related to #1085, put here for tracking.
The text was updated successfully, but these errors were encountered: