Recursive JSON - nested recursive Structure data type definition error

I am consuming a REST Interface that supports OpenAPI (Swagger).

The interface is quite extensive and defines about 150 structures.

Some of these Structures are reporting Errors like this one:

Invalid Structure: Loans.Loans defines a nested recursive Structure data type definition.

Here the Loans structure has a nested structure of Loans. Strange, but true.

I did  a little checking in the OpenAPI (Swagger) specification and this doesn't seem to be an invalid approach. It does look like most JSON validators will choke on this JSON but that seems to be an implementation detail.

So, I'm a little stuck. This is a massive commercial interface, LoanPro, and I'd like to avoid having to implement a large OutSystems extension to connect up to their service.

FWIW, I used NSwagStudio to generate a C# client from the LoanPro swagger.json and then merged that into a .NET OutSystems Extension. However, it looks like it would be an extensive manual process to take the next step and define all the structures and map the generated client class properties to the structures. More than a little messy.

Anyone know of a "smart" way of handling this situation?

For instance, is it possible to get the code generated for the rest interface, generated by OutSystems, and then pull that over into an extension where it can be "tweaked" to handle the recursive JSON issue?

Outsystems has limitation regarding complex JSON schema especially when doing deserialization to structure/record/record list.

Your best bet is to have REST output Response Structure to text, and then parse JSON yourself using C# extension.

This way you're still using Outsystems REST capability, only need to code to handle JSON.

Thanks Harlin. Oh well.