Squidex API’s get call not working when code generated via NSWAG

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Hi Sebastian,
We are generating RestSharp Client via NSWAG. We are getting error when we call Squidex API from the code generated via NSWAG for GET methods. We see “iv” property is removed which is causing the issue .

Expected behavior

Minimal reproduction of the problem

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ X] Cloud version

Version: [VERSION]

Browser:

  • [X ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

Hi,

what do you mean with “iv” is removed? I made an improvement and use a “map” now for properties so that the code generators create Dictionaries or HashMaps or objects for all fields.

Hi Sebastian,
We generated RestClientClient code NSWAG and we are getting build errors. Also earlier we used to see “Iv” property under the field. But now we see fields of type Dictionary object which is giving build errors when we have ICollection.


Could you please take a look.

Thanks,
Manjeera T

Sure, I actually did the same and tested some builds with Nswag and made adjustments until the output looked as clean as possible.

There are two things:

  1. The breaking change that I have introduced and that should have been announced. Sorry for that.

  2. The problem that NSwag has. You can fix it with the following settings: