typespec icon indicating copy to clipboard operation
typespec copied to clipboard

[Bug]: @example not supported for query parameters

Open hoovercj opened this issue 4 months ago • 1 comments

Describe the bug

Per the Open API 3.0 spec for parameter object, the "example" and "examples" properties are valid for query parameters.

However, when adding the @example decorator to a query parameter in typespec, no example is emitted in the open api file.

Reproduction

This Playground Link shows the simplest example of a query that doesn't work.

This Playground Link shows a slightly more complicated example with queries coming from several different levels of indirection, and I'd hope it would work for all of them the way that the @pattern decorator does.

Checklist

hoovercj avatar Nov 06 '25 17:11 hoovercj

@markcowl find duplicate issue

markcowl avatar Nov 10 '25 19:11 markcowl