Enhance query describe to include metadata attributes in Summary#45
Merged
Conversation
Query describe now emits Metadata {Type}/{Type}.{Attribute}: {value} lines
in the Summary output for SysmlMetadataNode instances attached to an
element's Children, mirroring the existing Comment/Documentation
annotation lines. Covers scalar (Boolean/Number/String) attribute values,
list/unsupported attribute values via raw-text fallback, bare metadata
with no attributes, and multiple metadata annotations on the same
element. Purely additive to Summary; Children/Entries semantics and
existing Comment/Documentation/Supertypes/Typing output are unchanged.
Adds 5 unit tests to QueryVerbsTests.cs covering scalar attributes,
list-valued fallback, no-metadata regression, bare metadata, multiple
annotations, and JSON format shape parity.
Updates design, verification, reqstream, and user guide docs for the
Query subsystem describe verb to document the new behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jul 20, 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.
This pull request extends the
describequery verb in SysML2Tools to include applied metadata annotations in its output. It updates both the implementation and documentation to ensure that metadata annotations—along with their attributes—are surfaced in the summary lines, and adds comprehensive tests to verify correct rendering in both Markdown and JSON formats.Enhancements to the
describeverb:describeverb now reports applied metadata annotations for an element, including:"Metadata {Type}"."Metadata {Type}.{Attribute}: {value}", with appropriate formatting (e.g., booleans astrue/false, numbers in invariant culture, strings unquoted).Documentation updates:
describeoutput, both in prose and tabular summaries. [1] [2] [3] [4] [5] [6] [7]Test coverage improvements:
Internal code changes:
FormatMetadataAttributeValuehelper method to encapsulate correct formatting of metadata attribute values.These changes ensure that applied metadata is fully and correctly represented in the
describeoutput, improving traceability and completeness for users.