Closed nicodenysschen closed 7 months ago
Hi @nicodenysschen
I've logged a bug on our side to address the ApiOKResponse not correctly setting the isArray property, and will let you know when that is available.
As an interim solution, as you suggest, you can use the code management systems to apply manual changes to the file.
Below is an example, applying the IntentIgnore to the class will stop Intent generating this code.
Let me know if you need further assistance around this.
Thank you I have implemented the [Number] and the @IntentIgnore() for now and it is a working work around.
Another option is to ignore the file in Intent Architect as illustrated below.
This will give you a similar effect, in that you will be able to edit file. The advantage to this approach in this is case, is that the software factory will remind you of this issue, and you can simply "un-ignore" the file once we release a patch for this.
On the other approach you'll need to remember to go remove the IntentIgnore
when the patch is released.
Good day @nicodenysschen We have made the fix to a module which is currently available as a pre-release that will address this concern.
Though this is taking place in a broader set of updates that we've done for the NodeJS modules, you should still be able to only update Intent.NodeJS.NestJS.Controllers
to (4.0.0-pre.2) and it should still work. Ensure that you check the Include Prerelease
checkbox in the Manage Modules
view.
Please try it out and let us know if it works for you or not.
What happened?
From what I can gather is that the correct solution may be:
@ApiOkResponse({ description: 'Result retrieved successfully.', type: [Number], // Use an array with the Number constructor isArray: true, })
because the function returns an array of numbers for example see screenshot as well:Promise<number[]>
I can fix it manually but it keeps on replacing it, is there an Ignore I can use or do we require an upgraded module in IA?
What version of Intent Architect are you using?
4.2.2
Additional information
Latest NPM packages and Latest IA Modules