Repository navigation
Closed
Labels
enhancementNew feature or requestprovider:white-listAffects OpenUrzednik.MF.WhiteList (and its variants)
Milestone
Description
Decided by the maintainer on 2026-11-21 (in the #262 discussion): every public type of a provider package goes in the provider's root namespace, with no area namespaces for models. This is option (a) of the comparison below.
Why
- ADR-0007 puts models and enums in area namespaces (
OpenUrzednik.Nbp.Currency,.Table,.Gold;OpenUrzednik.MF.WhiteList.Search,.Check,.Status). A type that several areas share stays in the area that defines it. So a caller ofWhiteListStatusClientneedsusing OpenUrzednik.MF.WhiteList.Search;just forVatStatus. - A survey of 18 established .NET SDKs and public-API clients (2026-11-21) found four layouts:
- Everything in the root, for small libraries: Octokit, Stripe core, MongoDB.Driver, Azure AppConfiguration and KeyVault.
- Root plus
.Models, for hundreds of models: AWS, Azure.Storage.Blobs, Microsoft Graph. - Area namespaces, when areas are large and each has its own client: OpenAI, Anthropic.
- A shared namespace plus areas, for many areas or packages: Twilio, the MF KSeF client, CompaniesHouse.NET.
- The Azure SDK .NET guidelines: "Some client libraries have a relatively small number of model types, and these should keep the model types in the main namespace."
- Each package here has about 25–35 public types, of which about 10 are models. Three of the area namespaces hold a single type, which no surveyed project does.
- The Framework Design Guidelines say "DO NOT use the same name for a namespace and a type in that namespace". Area names like
StatusandCheckinvite exactly that.
Scope
- A new ADR through
/adrthat supersedes ADR-0007, which is released in v1.0.0 and so can't be edited.- It restates the whole client-API decision with the new namespace layout. Every public type of a provider goes in the root namespace: clients, interfaces, options, telemetry, log events, errors, models and enums.
- Internal namespaces (
.Common,.Dto,.Validation, …) are unaffected. The rule against public namespaces named after a kind of member stays. - Model names must carry their own context (
VatStatusResult,AccountCheckResult,GoldPrice). - NBP keeps its 1.x layout until 2.0 (the follow-up issue).
- ADR-0016's line "models go in area namespaces below it (ADR-0007)" is released too. The new ADR states the replacement, and ADR-0016 gets only the supersede link its lifecycle allows, or the maintainer decides how to handle it.
- Correct the accepted ADR-0023 in place, with a dated line. Its models move from
.Search,.Checkand.StatustoOpenUrzednik.MF.WhiteList. - Move the White List public models to the root namespace. The package isn't released yet (
IsPackable=false), so this isn't breaking.- The models:
Subject,SubjectPerson,VatStatus,SubjectSearchResult,SubjectsSearchResult,BatchSearchResult,BatchSearchEntry,AccountCheckResult,VatStatusResult. - Update
PublicAPI.Unshipped.txt(CRLF), the tests, AotSmoke and the docs. - Mappers may stay in internal folders or namespaces. The mutation shard's strict globs must still cover them.
- The models:
- Update every place that states the rule:
CLAUDE.md;.claude/rules/code-conventions.mdandclient-api.md;.claude/agents/reviewer.md, the ADR-0007 line;.claude/skills/new-providerandnew-endpoint;- CONTRIBUTING, if it mentions the rule;
- the Architecture tests, if they check namespaces.
Done when
- The ADR is accepted and the White List public types are all in
OpenUrzednik.MF.WhiteList. - The build, tests, format, mutation shard, AotSmoke, pack and
package_guardpass. - NBP is unchanged; it waits for its 2.0 issue.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestprovider:white-listAffects OpenUrzednik.MF.WhiteList (and its variants)
Type
Projects
- StatusShow more project fieldsDone
Activity