Skip to content

Escape path delimiters during reserved parameter expansion - #125

Draft
quinnj wants to merge 1 commit into
JuliaComputing:mainfrom
quinnj:fix/reserved-path-delimiters
Draft

quinnj wants to merge 1 commit into
JuliaComputing:mainfrom
quinnj:fix/reserved-path-delimiters

Conversation

@quinnj

@quinnj quinnj commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Reserved path expansion emitted raw /, ?, and #, which split a single parameter into route segments or URL query/fragment components. A generated client calling its generated server reproduced a 404 for opa/examples/public servers.

Escape forbidden path characters in the shared scalar serializer, including content-based parameters. Preserve other valid reserved characters and existing percent escapes. Live tests cover simple/label/matrix styles and final/non-final placeholders. No greedy route extension is added.

Compatibility decision required: this deliberately changes the raw-slash OPA workaround introduced in #112 (versions 1.1.1–1.1.3). Normative OAS 3.2 path templating still forbids unescaped /, ?, and #; RFC 3986 path grammar also excludes brackets. Applications relying on multiple raw segments must check their server's encoded-slash behavior. Generated-server tests do not establish OPA compatibility. The migration guide now calls this out. This draft proposes a standards correction; it does not implement #113's requested greedy-routing API.

Validation: baseline live test failed with 404; 180 new roundtrip assertions pass. Full Julia 1.10.11 suite: 1,368 assertions. Full Julia 1.12.6 suite: 1,418 assertions, including JuliaC trim and all Petstore, Discord, Stripe, and GitHub corpus checks. Independent review found no implementation defect.

References: OAS 3.2 path templating, RFC 3986 path grammar. Related: #113.

Co-authored by Codex

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant