[ ] Regression (a behavior that stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Current behavior
I use the standard OpenApiReference item in a csproj to automatically generate an API client from an openapi file I downloaded from squidex (by navigating to app -> API -> Content API). When I use this client to request a content item, I receive the following error:
MyNamespace.Content.ApiException: Could not deserialize the response body stream as MyNameSpace.Content.MyContentDto.
Status: 200
Response:
---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'data.SomeProperty', line 1, position 148.
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
Expected behavior
This should work out of the box, and I suspect the content API does not conform to the OpenAPI generated by Squidex.
Minimal reproduction of the problem
Sorry, I am not at libery to share the code. But this should be trivial to reproduce.
I tried client.DefaultRequestHeaders.Add("X-Flatten", "true");
and client.DefaultRequestHeaders.Add("X-Flatten", "1");
but neither seems to make a difference.
How do I update my image with the latest changes from master? Do you automatically push the updates to DockerHub?
The does the client library have a method to get all content for a given app and schema, corresponding to the /api/content/[app]/[schema] endpoint in the API?
The dev-6655 image did not work with our database, it returned a 500 error when I tried to open the contents page. Reverting to the latest image fixed that. I don’t have any logs, sorry.