Skip to content

Update Altinn.Register.Contracts to 1.7.0 - #2102

Merged
mSunberg merged 1 commit into
mainfrom
chore/update-altinn-register-contracts
Aug 20, 2026
Merged

Update Altinn.Register.Contracts to 1.7.0#2102
mSunberg merged 1 commit into
mainfrom
chore/update-altinn-register-contracts

Conversation

@mSunberg

@mSunberg mSunberg commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

In 1.7.0, externalUrn became a typed property on Party, so it no longer lands in JsonExtensionData where GetExternalUrn() read it from. This reads the typed property instead.

Without the fix, the API-provided URN is silently dropped: Person, Organization and SelfIdentifiedUser fall back to a derived URN, while SystemUser returns null and breaks Dialogporten.

Added two tests — the existing ones missed this, since the derived URN happens to match the API value for the common party types.

Description

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green
  • If pre- or post-deploy actions (including database migrations) are needed, add a description, include a "Pre/Post-deploy actions" section below, and mark the PR title with ⚠️

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

In 1.7.0 the Register API's externalUrn is exposed as a typed
Party.ExternalUrn property. It therefore no longer lands in
JsonExtensionData, which is where PartyExtensions.GetExternalUrn() read
it from. Read the typed property instead.

The typed value is a FieldValue<NonExhaustive<PartyExternalRefUrn>>, so
URN schemes unknown to the package still round-trip verbatim and no
behaviour is lost.

Without this change the API-provided URN is silently dropped: Person,
Organization and SelfIdentifiedUser fall through to the derived-URN
construction, and SystemUser — which has no derived path — returns null.

The existing tests did not guard this, since the derived URN happens to
match the API value for the common party types. Added two tests that
separate the code paths: one where the API URN deliberately differs from
what would be derived, and one asserting an unknown URN scheme survives.

Closes #2072

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 477fa1fe-d106-4d6d-815e-27c01bbbcd88


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ceredron Ceredron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@mSunberg mSunberg added the kind/chore changes that do not relate to a fix or feature and don't modify src or test files label Aug 20, 2026
@mSunberg
mSunberg merged commit 26a425e into main Aug 20, 2026
13 of 18 checks passed
@mSunberg
mSunberg deleted the chore/update-altinn-register-contracts branch August 20, 2026 11:10
Ceredron pushed a commit that referenced this pull request Aug 20, 2026
In 1.7.0 the Register API's externalUrn is exposed as a typed
Party.ExternalUrn property. It therefore no longer lands in
JsonExtensionData, which is where PartyExtensions.GetExternalUrn() read
it from. Read the typed property instead.

The typed value is a FieldValue<NonExhaustive<PartyExternalRefUrn>>, so
URN schemes unknown to the package still round-trip verbatim and no
behaviour is lost.

Without this change the API-provided URN is silently dropped: Person,
Organization and SelfIdentifiedUser fall through to the derived-URN
construction, and SystemUser — which has no derived path — returns null.

The existing tests did not guard this, since the derived URN happens to
match the API value for the common party types. Added two tests that
separate the code paths: one where the API URN deliberately differs from
what would be derived, and one asserting an unknown URN scheme survives.

Closes #2072

Co-authored-by: Martin Todorov <>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/chore changes that do not relate to a fix or feature and don't modify src or test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants