Use relationship label if present in custom properties#1044
Open
garrettsutula wants to merge 5 commits intodatacontract:mainfrom
Open
Use relationship label if present in custom properties#1044garrettsutula wants to merge 5 commits intodatacontract:mainfrom
garrettsutula wants to merge 5 commits intodatacontract:mainfrom
Conversation
jochenchrist
approved these changes
Feb 13, 2026
jochenchrist
pushed a commit
that referenced
this pull request
Feb 13, 2026
jochenchrist
requested changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
relationships[].customProperties['property=label']is specified, that value will be used as the label in the relationship line drawn between schemas in the exported Mermaid diagram.This makes it possible for data model authors to further annotate relationships in a way that will generate meaningful diagrams following a UML-like approach for roles described here: https://stackoverflow.com/questions/16732607/role-name-in-association-relationship
Generally, this gives the user a way to override the default display behavior if desired for whatever reason which I don't think merits specification in the standard because it is not really a primary concern of the data contract.
I did modify
tests/fixtures/export/datacontract.odcs.yamlandtests/test_export_mermaid.pyto add a relationship test assertion and run locally but adding an entity todatacontract.odcs.yamlcaused 7 other test cases to fail so I did not include that in the scope of this work.