Skip to content

Fix tagMetadata extension diagnostic targets - #10776

Merged
timotheeguerin merged 1 commit into
microsoft:mainfrom
kiwigitops:fix-openapi-tagmetadata-extension-target
Jun 2, 2026
Merged

Fix tagMetadata extension diagnostic targets#10776
timotheeguerin merged 1 commit into
microsoft:mainfrom
kiwigitops:fix-openapi-tagmetadata-extension-target

Conversation

@kiwigitops

Copy link
Copy Markdown
Contributor

Closes #10767

This keeps the OpenAPI extension-key validation tied to the metadata object literal, so invalid keys such as custom are reported on the offending property instead of the tag name.

Verification:

  • npx pnpm --filter @typespec/openapi build
  • npx pnpm --filter @typespec/openapi test -- decorators.test.ts

@pkg-pr-new

pkg-pr-new Bot commented Jun 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/openapi@10776

commit: f0bf9be

Comment thread packages/openapi/test/decorators.test.ts
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/openapi
Show changes

@typespec/openapi - fix ✏️

Fix tagMetadata extension diagnostic targets

@kiwigitops
kiwigitops force-pushed the fix-openapi-tagmetadata-extension-target branch from 2fc1378 to 85c43b1 Compare June 1, 2026 19:59
@kiwigitops

kiwigitops commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Updated: the test now uses compileAndDiagnose with a /*custom*/ marker and asserts pos: pos.custom.pos. I also added the Chronus changeset for @typespec/openapi.

Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
@kiwigitops
kiwigitops force-pushed the fix-openapi-tagmetadata-extension-target branch from 85c43b1 to f0bf9be Compare June 1, 2026 21:41
@timotheeguerin
timotheeguerin added this pull request to the merge queue Jun 2, 2026
Merged via the queue into microsoft:main with commit 123882f Jun 2, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tagMetadata custom property without x report error on wrong location

2 participants