Repository navigation
openapi: spec-compliant parameter serialization with url-template - #354
Closed
RhysSullivan wants to merge 1 commit into
Closed
RhysSullivan wants to merge 1 commit into
RhysSullivan wants to merge 1 commit into
Conversation
Replace ad-hoc `String(value)` serialization in the OpenAPI invoke path with RFC 6570 expansion via `url-template` for the styles the spec covers (simple / label / matrix / form), plus hand-rolled handlers for the three OpenAPI-only styles (spaceDelimited, pipeDelimited, deepObject). Respects `explode` in every position. Also: - Emit cookie parameters as a single `Cookie:` header (previously silently dropped). - Enforce required query/header/cookie params and required request bodies with clear `OpenApiInvocationError` messages at invoke time rather than letting malformed requests hit the server. Fixes the LLM-emits-`?tag=a,b` class of bugs (server sees a single string), the missing-cookie-on-wire class, and gives us up-front validation for anything declared required. Tests: new `parameter-styles.test.ts` asserts the exact bytes on the wire for each style/explode combo plus the missing-required-param error paths. 48 tests pass in the openapi package.
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Apr 20, 2026
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | dd5459e | Apr 20 2026, 10:21 PM |
@executor/sdk
@executor/plugin-file-secrets
@executor/plugin-google-discovery
@executor/plugin-graphql
@executor/plugin-keychain
@executor/plugin-mcp
@executor/plugin-oauth2
@executor/plugin-onepassword
@executor/plugin-openapi
@executor/plugin-workos-vault
executor
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
url-template(RFC 6570 reference implementation). Maps OpenAPIstyle+explodeto the matching RFC 6570 operator —form(""/"?"),simple(default),label("."),matrix(";") — and leaves the exploder to the library.spaceDelimited,pipeDelimited, anddeepObjectby hand since they're OpenAPI-specific and not in RFC 6570.in: cookieparams.required: trueon non-path params and on request bodies; previously these silently produced malformed requests.HttpClientRequest.setUrlParam— Effect's helper routes throughURLSearchParams, which would re-encode pipes, breakdeepObject, and turn%20into+.Why
The old serializer ignored
style/explodeentirely, so any spec that relied on a non-default form (Stripe'sexpand/limit, GitHub'slabels, anything usingmatrixorlabelpath params) emitted the wrong wire format and the server either errored or silently dropped the values.Test plan
parameter-styles.test.tscovering: default form explode, form collapsed, pipeDelimited, spaceDelimited, deepObject, primitive baseline, special-char encoding, path label (.red.green.blue), path matrix (;color=red,green,blue), cookie header, missing required query, missing required bodybunx vitest runinpackages/plugins/openapi— 48/48 passbun run typecheckclean