Repository navigation
Description
Follow-up to the namespace ADR, the issue this one is blocked by: move NBP's public models from its area namespaces to the root namespace OpenUrzednik.Nbp in 2.0.
Why 2.0
OpenUrzednik.Nbp shipped 1.x with .Currency, .Table and .Gold, and a type's namespace is part of its identity. TypeForwardedTo only works across assemblies, and [Obsolete] can't mark a namespace move, so the move is a binary and source break. Under ADR-0011 that means it can only ship in a major release.
Scope
-
Move these types to
OpenUrzednik.Nbp:- from
.Currency:CurrencyRate,CurrencyExchangeRates,CurrencyBuySellRate,BuySellExchangeRates; - from
.Table:TableRate,TableBuySellRate,ExchangeRateTable,BuySellExchangeRateTable,TableType; - from
.Gold:GoldPrice.
Keep mappers and other internals where they are.
- from
-
Public API files: remove the shipped lines and add the new ones to
PublicAPI.Unshipped.txt. -
Package validation: baseline suppressions (
IsBaselineSuppression) are allowed whileversion.jsoncarries the new major (CLAUDE.md, ADR-0011). Label the PRbreaking-change. -
Everything that mentions the old namespaces: the tests,
samples/, AotSmoke, the NBP and DI READMEs (README.md,README.pl.md), and the Core README if it shows NBP usings. -
NbpOptions.DefaultApiUrlaspublic static readonly string(src/OpenUrzednik.Nbp/NbpOptions.cs:17), for consistency with the White List'sDefaultApiUrl/TestApiUrl(MF White List: fixes from the 1.1.0 review before the API freezes #365, maintainer's decision 2026-11-22): aconstis copied into the apps that name it, so a patch with a new host wouldn't reach them without a rebuild. Changingconsttostatic readonlybreaks source that uses it as a constant (attribute arguments,switchlabels, default parameter values), so it waits for 2.0. Update its PublicAPI line. -
A migration note for the 2.0 release notes: replace the
using OpenUrzednik.Nbp.Currency;/.Table;/.Gold;lines withusing OpenUrzednik.Nbp;; andNbpOptions.DefaultApiUrlis no longer a constant (code that uses it in an attribute, aswitchlabel or a default parameter value needs the literal URL instead).
Done when
NBP's public types are all in OpenUrzednik.Nbp, NbpOptions.DefaultApiUrl is static readonly, every check passes with the 2.0 baseline suppressions, and the migration note is drafted.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity
[-]2.0: move the NBP models to the root namespace OpenUrzednik.Nbp[/-][+]2.0: move the NBP models to the root namespace OpenUrzednik.Nbp; DefaultApiUrl as static readonly[/+]