Skip to content

Add TypeSpec examples to flat-bag and subtypes pattern docs (#1061)#588

Open
mary-wan wants to merge 2 commits into
microsoft:vNextfrom
mary-wan:marynjenga/graph-patterns
Open

Add TypeSpec examples to flat-bag and subtypes pattern docs (#1061)#588
mary-wan wants to merge 2 commits into
microsoft:vNextfrom
mary-wan:marynjenga/graph-patterns

Conversation

@mary-wan

Copy link
Copy Markdown

Summary

  • Adds a TypeSpec representation section to api-guidelines/graph/patterns/flat-bag.md with a runnable @flatBag("type") + @variant(...) example
  • Adds a TypeSpec representation section to api-guidelines/graph/patterns/subtypes.md with an @abstract + extends example using the directoryObject → user/group hierarchy

Companion to issue #1061 (@flatBag / @variant decorators shipped in @microsoft/typespec-msgraph Issue#1061). The API guidelines previously documented these patterns in CSDL/JSON only; this PR adds the TypeSpec authoring guidance developers need now that the pattern decorators ship.

@mary-wan mary-wan requested a review from a team as a code owner June 23, 2026 07:55
- Type hierarchy: @abstract + extends
- Flat bag: @flatBag + @variant
- Facets: left blank pending separate work

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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