Skip to main content
Nintex Community Menu Bar

Executing Swagger Rest SmartObjects: "An item with the same key has already been added Source: SourceCode.HostServer.Lib" error when executing the REST Service Instance Broker SmartObject

  • February 15, 2022
  • 0 replies
  • 30 views
  • Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
 

Executing Swagger Rest SmartObjects: "An item with the same key has already been added Source: SourceCode.HostServer.Lib" error when executing the REST Service Instance Broker SmartObject

kbt149147

PRODUCT
K2 Five
BASED ON
K2 Five (all)
TAGS
Service Broker
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Issue

An item with the same key has already added. Source: SourceCode.HostServer.Lib error is raised when executing the REST Service Instance Broker SmartObject:

 

Image

Symptoms

This error is raised due to an incorrect configuration on the Swagger json file

 

For example (Duplicate entries):

 

Image

Troubleshooting Steps

Do a comparison of the working Swagger json file and the non-working Swagger json file and you will notice that there are duplicate or incorrect values specified.

 

To correct this:

- Rename the duplicate entries or change your Swagger json file as needed.

- Then navigate back to the SmartObject Tester Tool and refresh the REST Service instance & SmartObjects.

 

Note this comparison can be done with Win Merge or Beyond Compare to validate if there are any inconsistencies on the json file.
Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings