Skip to content

[Fix] Dimension type validation false positive#87

Open
sakari-malkki wants to merge 5 commits intodevfrom
bugfix/validation-fixes
Open

[Fix] Dimension type validation false positive#87
sakari-malkki wants to merge 5 commits intodevfrom
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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Comment thread docs/architecture.models.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Comment thread Px.Utils/PxFile/PxFileConfiguration.cs
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