You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP QUERY method is now a Proposed Standard — RFC 10008 (published June 2026, from draft-ietf-httpbis-safe-method-w-body). It provides safe, idempotent request semantics like GET, but carries the query in the request body — the long-standing answer to "GET with a body" / oversized query strings.
OpenAPI 3.2.0 already supports it as a first-class path-item operation (query:), alongside the new additionalOperations field.
TypeSpec currently cannot express this method:
HttpVerb in @typespec/http is "get" | "put" | "post" | "patch" | "delete" | "head" (types.ts) — no query.
Notably, the OpenAPI 3.2 document model in @typespec/openapi3 already includes it: OpenAPIHttpMethod3_2 = OpenAPI3HttpMethod | "query" plus additionalOperations on OpenAPIPathItem3_2 (types.d.ts). So the emitter-side representation exists — the gap is purely on the authoring side (verb decorator + HttpVerb), and presumably the converter/emit wiring.
Since @typespec/openapi3 can already emit openapi: 3.2.0 documents (openapi-versions: [3.2.0]), this seems like a natural, well-scoped completion of the existing 3.2 support.
Target 3.2.0: emit as first-class query: operation.
Targets 3.0.x / 3.1.x: report a diagnostic (these versions have a closed operation set; additionalOperations is 3.2-only).
(Optional, symmetric) tsp-openapi3 convert: map query: operations in 3.2 documents back to the new verb.
Related: #2866 (OPTIONS verb support, design:needed) — a generic @verb(...) design could resolve both, though QUERY differs in that it deserves first-class treatment given its RFC status and first-class OpenAPI 3.2 slot.
I'm happy to contribute the implementation once the decorator naming/design is settled.
Clear and concise description of the problem
The HTTP
QUERYmethod is now a Proposed Standard — RFC 10008 (published June 2026, fromdraft-ietf-httpbis-safe-method-w-body). It provides safe, idempotent request semantics likeGET, but carries the query in the request body — the long-standing answer to "GET with a body" / oversized query strings.OpenAPI 3.2.0 already supports it as a first-class path-item operation (
query:), alongside the newadditionalOperationsfield.TypeSpec currently cannot express this method:
HttpVerbin@typespec/httpis"get" | "put" | "post" | "patch" | "delete" | "head"(types.ts) — noquery.@typespec/openapi3already includes it:OpenAPIHttpMethod3_2 = OpenAPI3HttpMethod | "query"plusadditionalOperationsonOpenAPIPathItem3_2(types.d.ts). So the emitter-side representation exists — the gap is purely on the authoring side (verb decorator +HttpVerb), and presumably the converter/emit wiring.Since
@typespec/openapi3can already emitopenapi: 3.2.0documents (openapi-versions: [3.2.0]), this seems like a natural, well-scoped completion of the existing 3.2 support.Describe the solution you'd like
"query"toHttpVerbin@typespec/http.@queryis already the query-parameter decorator in the same namespace. Options:@httpQuery, or a generic escape hatch like@verb("query")(which would also serve issue [Feature Request] HTTP: Consider adding support in Typespec for specifying options object in paths #2866 forOPTIONS, and future methods via OpenAPI 3.2additionalOperations).@typespec/openapi3:3.2.0: emit as first-classquery:operation.3.0.x/3.1.x: report a diagnostic (these versions have a closed operation set;additionalOperationsis 3.2-only).tsp-openapi3convert: mapquery:operations in 3.2 documents back to the new verb.Related: #2866 (OPTIONS verb support,
design:needed) — a generic@verb(...)design could resolve both, though QUERY differs in that it deserves first-class treatment given its RFC status and first-class OpenAPI 3.2 slot.I'm happy to contribute the implementation once the decorator naming/design is settled.
Checklist