Skip to content

Do not interpolate non string values automatically#10183

Draft
timotheeguerin wants to merge 3 commits intomicrosoft:mainfrom
timotheeguerin:fix/file-type-interpolation
Draft

Do not interpolate non string values automatically#10183
timotheeguerin wants to merge 3 commits intomicrosoft:mainfrom
timotheeguerin:fix/file-type-interpolation

Conversation

@timotheeguerin
Copy link
Copy Markdown
Member

fix #10182

Only interpolate options with other options values if the value is a string, number or boolean. As its most likely not going to produce the expected result with array or objects. This delegate the interpolation for those to the emitters.

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Mar 27, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@10183

commit: 590e815

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Do not interpolate non primitive values in config automatically,> yaml,> file-type: ["json", "yaml"],> output-file: "openapi.{file-type}",> ,> Will not be interpolated as openapi.json,yaml but keep the placeholder {file-type} intact for the emitter to handle.

@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented Mar 27, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openapi3 multiple files output doesn't work

2 participants