Skip to content

[Bug]: @example not supported for query parameters #8944

@hoovercj

Description

@hoovercj

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions