We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please head to the Discord chat
Please answer the following questions for yourself before submitting an issue.
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.
Would expect correct conversion of array params.
Cannot submit array params using moleculer REST API page (may have other side effects as well?)
The above code is from one of our services - we dont have a sample example at this time.
See above.
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
{ "name": "ValidationError", "message": "Parameters validation error!", "code": 422, "type": "VALIDATION_ERROR", "data": [ { "type": "array", "message": "The 'users' field must be an array.", "field": "users", "actual": "[\"VFv222B44eRuTzgG\"]", "nodeID": "ci0600000001939-29180", "action": "usergroup.create" } ] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🛑 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: