Skip to content

Update SWIFT Registry to Release 101 (Dec 2025) - #389

Closed
General-66 wants to merge 1 commit into
skwasjer:mainfrom
General-66:fix/update-registry
Closed

Update SWIFT Registry to Release 101 (Dec 2025)#389
General-66 wants to merge 1 commit into
skwasjer:mainfrom
General-66:fix/update-registry

Conversation

@General-66

Copy link
Copy Markdown

This PR updates the SwiftRegistryProvider to align with the official SWIFT IBAN Registry Release 101 (published December 2025). The current implementation was based on Release 99 (December 2024).

Keeping the registry up-to-date ensures that users validating IBANs for recently updated regions (such as North Macedonia or Kosovo) or re-added regions (Russia) receive correct validation results according to the latest ISO 13616 standards.

Changes Made:
1. Registry Provider (SwiftRegistryProvider.cs)

  • Updated Version: Bumped the [GeneratedCode] attribute to 1.1-r101.
  • Added Country: Added Russia (RU). While subject to sanctions regarding the SWIFT network, the IBAN format remains registered and valid according to the official registry document.
  • Metadata Updates:
    - Updated EnglishName for North Macedonia (MK) (previously "Macedonia, The Former Yugoslav Republic of").
    - Updated LastUpdatedDate for 28 countries (AE, AL, AT, CZ, JO, KW, KZ, LB, LI, LT, LU, LV, MC, MD, MK, MT, MU, OM, PK, PL, PS, PT, RO, SO, TR, UA, VA, VG, XK) to match the Release 101 timestamps.

2. Tests (SwiftRegistryProviderTests.cs & ExpectedDefinitionsSubset.cs)

  • Updated the expected country count in SwiftRegistryProviderTests from 88 to 89 to account for the inclusion of Russia.
  • Updated ExpectedDefinitionsSubset.cs to reflect the new LastUpdatedDate for Kosovo (XK) (July 2024), ensuring the definition tests pass against the new data.

3. Snapshot Testing (SwiftRegistryProvider.verified.txt)

  • Updated the Verify.NET snapshot file to match the new registry output. The diff includes the insertion of the RU block and the metadata updates mentioned above.

Verification
[x] The solution builds successfully.

[x] Unit tests passed (specifically SwiftRegistryProviderTests).

[x] Snapshot tests verified against the generated output.

@skwasjer

Copy link
Copy Markdown
Owner

Manual changes to the registry provider are not accepted.

The SWIFT registry provider is code generated with a T4 template using the (raw, uneditted) txt file from SWIFT as a data source /src/IbanNet/Registry/Swift/Files. The file must be downloaded and included in the repo and then the T4 engine run once. The provider .cs file will be updated accordingly and this is what should be committed for review.

If any data needs further patching, that should be done via an incremental code generation patch /src/IbanNet.CodeGen/Swift/Patches. But this should only be done sparingly and specifically to fix parse/data errors (iow. the T4 code generation fails somewhere).

Please also refrain from modifying the .tt file, I don't really want to consider any changes to code generation at this point since it is being replaced with a source generator #322. This is also when the .cs file will be permanently removed from git, so any manual changes will be lost anyway. The exception can be the inclusion of RU, but please submit this as a separate PR and then also give the same treatment to the Wikipedia provider.

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

Successfully merging this pull request may close these issues.

2 participants