Add summary and kind fields to @tagMetadata decorator#10769
Open
Copilot wants to merge 3 commits into
Open
Conversation
3 tasks
- Add summary and kind to TagMetadata model in decorators.tsp - Update generated-defs TypeSpec.OpenAPI.ts with new fields - Emit summary/kind as native fields for OpenAPI 3.2 - Emit summary/kind as x-oai-summary/x-oai-kind extensions for OpenAPI 3.0/3.1 - Update converter to import summary/kind from both native and x-oai- fields - Add tests for version-specific summary/kind behavior - Update tag-metadata spec snapshot to include summary and kind - Add 3.2 tag-metadata spec snapshot test - Add changelog entry Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/73460656-985a-4d04-9a50-f6010a0c0987 Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
…of any cast Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/73460656-985a-4d04-9a50-f6010a0c0987 Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for summary and kind in tagMetadata decorator
Add May 22, 2026
summary and kind fields to @tagMetadata decorator
baywet
approved these changes
May 22, 2026
timotheeguerin
approved these changes
May 22, 2026
commit: |
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.
@tagMetadatalackedsummaryandkindfields introduced in OpenAPI 3.2 tag objects. These fields needed version-aware handling since they don't exist in OpenAPI 3.0/3.1.Changes
TagMetadatamodel (packages/openapi/lib/decorators.tsp,generated-defs): Addedsummaryandkindoptional fields.Emitter (
packages/openapi3/src/openapi.ts): Version-aware emission inresolveDocumentTags:summary/kindfieldsx-oai-summary/x-oai-kindextensionsConverter (
transform-tags.ts,generate-tags.ts,interfaces.ts): Bidirectional support — reads both native 3.2 fields andx-oai-extensions from 3.0/3.1 documents, and generates the corresponding TypeSpec decorator properties.Usage
OpenAPI 3.2 output:
OpenAPI 3.0/3.1 output: