ConsumerDataRight / mock-data-holder

A mock version of a Consumer Data Right Data Holder solution that can be used in the development and testing of CDR solutions
MIT License
17 stars 23 forks source link

Get Banking accounts API not aligned with v1.22.0 changes #77

Open benoitcanton opened 4 months ago

benoitcanton commented 4 months ago

Describe the bug According to the README.md file, the mock data holder aligns with the version 1.22.0 of the standards.

Based on the release notes of version 1.22.0, this version introduced introduced a accountOwnership property to the banking account entity, which also led to the Get Accounts API to move from v1 to v2.

To Reproduce Steps to reproduce the behavior:

  1. Call the /cds-au/v1/banking/accounts?page=1&page-size=25 endpoint of the mock data holder with the x-v header with value 2
  2. The endpoint will return
    {"errors":[{"code":"urn:au-cds:error:cds-all:Header/UnsupportedVersion","title":"Unsupported Version","detail":"Version requested is lower than the minimum version or greater than maximum version.","meta":{}}]}

Based on following snippet from the ResourceController of the Banking package, it seems like the endpoint was not updated to aligns with version v1.22.0

https://github.com/ConsumerDataRight/mock-data-holder/blob/a7b7a1559b4021d168492638dd3bcb5d0686ed6e/Source/Banking/CDR.DataHolder.Banking.Resource.API/Controllers/ResourceController.cs#L56-L67

The same applies to the banking account entity, which is missing the accountOwnership

https://github.com/ConsumerDataRight/mock-data-holder/blob/a7b7a1559b4021d168492638dd3bcb5d0686ed6e/Source/Banking/CDR.DataHolder.Banking.Domain/Entities/Account.cs#L3-L14

Expected behaviour When called, the /cds-au/v1/banking/accounts?page=1&page-size=25 endpoint should supports the x-v: 2 header and returns the accountOwnership property of banking accounts as per version 1.22.0 of the CDS.

CDR-HansenS commented 4 months ago

Hi @benoitcanton, thank you for raising this issue with us. We have identified that this is an issue and working on the fix. This will be patched in our next release.