mock-data-holder
mock-data-holder copied to clipboard
Get Banking accounts API not aligned with v1.22.0 changes
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:
- Call the
/cds-au/v1/banking/accounts?page=1&page-size=25
endpoint of the mock data holder with thex-v
header with value2
- 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.