Skip to content

Fix optional cardinality handling for Attribute and PartOf facets#7645

Draft
louistrue wants to merge 1 commit intoIfcOpenShell:v0.8.0from
louistrue:fix/facet-optionality
Draft

Fix optional cardinality handling for Attribute and PartOf facets#7645
louistrue wants to merge 1 commit intoIfcOpenShell:v0.8.0from
louistrue:fix/facet-optionality

Conversation

@louistrue
Copy link
Contributor

Fixes #6323 | Related: buildingSMART/IDS#402

Summary

  • Attribute facet: add early return for optional cardinality when value is null/empty (the existing check only covered schema-level absence)
  • PartOf facet: add optional cardinality checks at all 6 missing-relationship paths

Test plan

  • All 23 existing facet tests pass
  • All 15 existing IDS tests pass
  • New unit tests for optional+null, optional+empty, optional+wrong-value (Attribute)
  • New unit test for optional+no-relationship (PartOf)
  • New integration test: required Name + optional Description with empty Description passes

@Moult Moult marked this pull request as draft February 16, 2026 04:23
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.

Facet optionality is not completely supported

1 participant