Daxif icon indicating copy to clipboard operation
Daxif copied to clipboard

When adding multiple custom APIs with same request/response parameter names it only registers the request/response parameters for one custom API

Open robertraaijmakers opened this issue 10 months ago • 4 comments

Describe the bug When you have multiple Custom APIs and use the same request & response parameter names. It will only register the request & response parameters of one Custom API instead of all.

To Reproduce See screenshots :)

Expected behavior That all custom APIs have request & response parameters.

Screenshots image image

Very simplified example of the situation. In this case, only on our first (Async) the request parameters are added. on the other one, no request parameters are added.

Environment

  • CRM/D365/CDS version: 9.x
  • Tool version: 5.5.1

Additional context I think the error is in the compare: https://github.com/delegateas/Daxif/blob/29d0d76bbac53c69de96645b582e965fb0b4b080/src/Delegate.Daxif/Modules/Plugins/Compare.fs#L66 There is also a "TODO" compare more :) I think the "More" should be that it also compares on the "Custom API" the request/response parameter is linked to.

robertraaijmakers avatar Oct 06 '23 10:10 robertraaijmakers

I've tested the pull request, the code builds and still works on my project, however, it still only sync one of the request and response parameter. So I'm missing something but I don't have any idea how I can debug the code while running so I can try to figure out what I'm missing.

robertraaijmakers avatar Oct 27 '23 08:10 robertraaijmakers

Figured it out together with a colleague, it is now working! :) (see pull request)

robertraaijmakers avatar Oct 28 '23 09:10 robertraaijmakers

This should be fixed already.

The fix was merged in #62 (specifically in this commit).

We thought it was released as part of Delegate.Daxif version 5.0.0, but on closer inspection all relevant changes were made to CustomAPI.cs which isn't released as part of that package. Instead it is released as part of Delegate.Daxif.Scripts, but no new version of this has been released since the update was made.

For now I recommend that you manually download or copy the contents of CustomApi.cs to ensure you have the newest most updated version of the file.

skovlund avatar Dec 08 '23 12:12 skovlund

Thanks @skovlund , there are indeed some changes between the new and our CustomApi.cs file and will check in 2 weeks if this works on our project as well :)

robertraaijmakers avatar Dec 27 '23 14:12 robertraaijmakers