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

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

Open
benoitcanton opened this issue May 12, 2024 · 1 comment
Open

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

benoitcanton opened this issue May 12, 2024 · 1 comment

Comments

@benoitcanton
Copy link

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

[PolicyAuthorize(AuthorisationPolicy.GetAccountsApi)]
[HttpGet("v1/banking/accounts", Name = nameof(GetAccounts))]
[CheckScope(ApiScopes.Banking.AccountsBasicRead)]
[CheckXV(1, 1)]
[CheckAuthDate]
[ApiVersion("1")]
[ServiceFilter(typeof(LogActionEntryAttribute))]
public async Task<IActionResult> GetAccounts(
[FromQuery(Name = "is-owned")] bool? isOwned,
[FromQuery(Name = "open-status"), CheckOpenStatus] string? openStatus,
[FromQuery(Name = "product-category"), CheckProductCategory] string? productCategory,
[FromQuery(Name = "page"), CheckPage] string? page,

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

namespace CDR.DataHolder.Banking.Domain.Entities
{
public class Account : Shared.Domain.Entities.Account
{
public string CustomerId { get; set; } = string.Empty;
public string NickName { get; set; } = string.Empty;
public string MaskedName { get; set; } = string.Empty;
public string? ProductCategory { get; set; }
public string ProductName { get; set; } = string.Empty;
public AccountTransaction[]? Transactions { get; set; }
}
}

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
Copy link

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.

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

No branches or pull requests

2 participants