Skip to content

[@W-21315017] Fix/grpc oneof unnamed type#96

Merged
alexpmule merged 4 commits intomainfrom
fix/grpc-oneof-unnamed-type
Mar 2, 2026
Merged

[@W-21315017] Fix/grpc oneof unnamed type#96
alexpmule merged 4 commits intomainfrom
fix/grpc-oneof-unnamed-type

Conversation

@alexpmule
Copy link
Copy Markdown
Contributor

@alexpmule alexpmule commented Mar 2, 2026

Show message type names in oneOf composition

  • oneOf/anyOf: Use document#link-label, and when the member is a NodeShape with a single property (gRPC case), the label is taken from that property’s range (name, link-label, or scalar type). This shows "HelloRequest" and "String" instead of "Unnamed type".
  • Enums: Detect enums via shacl:in in _computeRangeDataType and in the default branch of _computeScalarDataType, showing "Enum" instead of "Unknown type".
  • UI: The "Enum" badge is only shown when the displayed type is not already "Enum", to avoid duplicating the label.

Refs: W-21315017

Screenshot 2026-03-02 at 9 13 50 AM Test with grpc model reported: Screenshot 2026-03-02 at 11 45 11 AM

…tion

Use document link-label when core name and shacl name are missing so
gRPC oneOf message types display (e.g. HelloRequest) instead of
'Unnamed type'.

Refs: W-21315032
Made-with: Cursor
… (gRPC)

When anyOf/oneOf member is an anonymous NodeShape wrapping a single
property (e.g. gRPC message reference), take the type label from
that property's range (core:name, shacl:name, or link-label).

Refs: W-21315032
Made-with: Cursor
…cumentMixin

- Added logic to identify 'Enum' types in the mxFunction, improving type classification for shapes with allowed values.
- Updated the API list template in index.js to include 'grpc-test' entry for better demo representation.
- Adjusted rendering conditions in PropertyShapeDocument to ensure proper display of enum types.

Refs: W-21315032
@alexpmule alexpmule self-assigned this Mar 2, 2026
@alexpmule alexpmule requested a review from NazaQuintero March 2, 2026 14:45
@alexpmule alexpmule merged commit 21bd1f3 into main Mar 2, 2026
6 of 7 checks passed
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