dotarj/PartialResponse

Bug with leading space then nested properties are specified

Closed this issue · 1 comments

Hi
In my project I try to use partial response. I have following response model:

{
  "Limit": 0,
  "Offset": 0,
  "Total": 0,
  "Content": [
    {Some model},
    {Some model}
  ]
}

If I specify nested properties of Content without leading spaces, anything works OK and I receive proper response. For request fields=limit,content(Id,name) I receive:

{
  "Limit": 20,
  "Content": [
    {
      "Id": "9b71be7c-0b29-419d-a89d-23cde2b2a0e0",
      "Name": "string"
    },
    {
      "Id": "468ace91-84a4-4d99-8026-aec839519686",
      "Name": "string"
    }
  ]
}

But if I create request with space before nested property specification only direct properties will be serialized. For example for request fields=limit, content(Id,name) I receive:

{
  "Limit": 20
}

If create request without nested properties or specify nested property one by one (with / character), anything works fine

This bug has been resolved in version 1.0.0 of WebApi.PartialResponse: https://www.nuget.org/packages/WebApi.PartialResponse/