Action params list returned by $node.list garbled for arrays · Issue #1305 · moleculerjs/moleculer · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🛑 Do you want to ask a question ?
Please head to the Discord chat
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Current Behavior
Defining an action as follows:
actions: {
create: {
rest: "POST /",
permission: "create",
params: {
$$strict: "remove",
name: { type: "string" },
description: { type: "string", optional: true },
users: { type: "array", items: "string", optional: true },
},
handler: this.create,
},
results in $node.list returning the following:
{"rest":"POST /",
"permission":"create",
"params":{
"$$strict":"remove",
"name":{"type":"string","convert":true},
"description":{"type":"string","optional":true,"convert":true},
"users":{"type":"array","items":{"0":"s","1":"t","2":"r","3":"i","4":"n","5":"g","type":"any","optional":true},"optional":true}
},
"rawName":"create",
"name":"usergroup.create"}
As a result, the moleculer REST API page does not function for array params.
Expected Behavior
Would expect correct conversion of array params.
Failure Information
Cannot submit array params using moleculer REST API page (may have other side effects as well?)
Steps to Reproduce
The above code is from one of our services - we dont have a sample example at this time.
Reproduce code snippet
See above.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
The text was updated successfully, but these errors were encountered: