Skip to content

[Fix] Dimension type validation false positive - #87

Merged
sakari-malkki merged 13 commits into
devfrom
bugfix/validation-fixes
Jun 3, 2026
Merged

[Fix] Dimension type validation false positive#87
sakari-malkki merged 13 commits into
devfrom
bugfix/validation-fixes

Conversation

@sakari-malkki

Copy link
Copy Markdown
Collaborator

Fixes a false positive validation issue when dimension types are defined by known aliases (Content/Contents and Geographical/Region). Added tests to cover the case.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a content-validation false positive when VARIABLE-TYPE uses known aliases (Contents for Content, Region for Geographical) by downgrading the validation feedback from error to warning, and updates parsing/token configuration plus unit tests to cover the scenario.

Changes:

  • Add Contents and Region variable-type tokens to PxFileConfiguration.
  • Map ContentsDimensionType.Content and RegionDimensionType.Geographical in ValueParserUtilities.StringToDimensionType.
  • In content validation, treat these aliases as warnings (not errors) and add unit tests/fixtures for the behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Px.Utils/Validation/ContentValidation/ContentValidator.ValidationEntryFunctions.cs Downgrades VARIABLE-TYPE alias invalid-value feedback from Error to Warning.
Px.Utils/PxFile/PxFileConfiguration.cs Adds new configurable tokens for Contents and Region.
Px.Utils/ModelBuilders/ValueParserUtilities.cs Adds alias mappings in StringToDimensionType.
Px.Utils.UnitTests/Validation/Fixtures/ContentValidationFixtures.cs Adds structured-entry fixtures for alias VARIABLE-TYPE values.
Px.Utils.UnitTests/Validation/ContentValidationTests/ContentValidationTests.cs Adds a unit test asserting Warning level for known aliases.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment thread Px.Utils/ModelBuilders/ValueParserUtilities.cs Outdated
Comment thread docs/architecture.models.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread Px.Utils/ModelBuilders/ValueParserUtilities.cs Outdated
Comment thread Px.Utils/PxFile/PxFileConfiguration.cs Outdated
@sakari-malkki
sakari-malkki merged commit 7e257c0 into dev Jun 3, 2026
8 checks passed
@sakari-malkki
sakari-malkki deleted the bugfix/validation-fixes branch June 3, 2026 06:02
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.

3 participants