Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectorAlias model has changed in production from a single object to array of objects #137

Closed
1 task
mason-chase opened this issue Apr 22, 2020 · 4 comments

Comments

@mason-chase
Copy link

mason-chase commented Apr 22, 2020

Steps to reproduce:

  1. there is a breaking change in Bunq response,
    Authorization via API barcode on a company account can't map it,
    the json response has array of objects

What should happen:

  1. Should return a Object of BunqUser

What happens:

  1. Serialization error:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Bunq.Sdk.Model.Generated.Object.LabelUser' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '[2].UserCompany.director_alias', line 306, position 25.

SDK version and environment

  • Tested on 0.12.4
  • Sandbox
  • [ X ] Production
@InhouseMedia
Copy link

same as:
#135
there's a fix but needs to be merged

@mason-chase
Copy link
Author

I cannot believe Bunq make a change to API model without updating Document or SDK Nuget ,
This is a breaking change, when is the nuget going to be updated?

@lexym
Copy link
Contributor

lexym commented Apr 29, 2020

Fixed :) #135

@lexym lexym closed this as completed Apr 29, 2020
@mason-chase
Copy link
Author

Are you putting Object back into response?
We were just presenting today to client and our app went into exception error.

@bunq Can you please decide what is your final response is going to look like? Is it going to break again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants