feat: expand corpus protocol and multipart coverage - #49
Merged
Conversation
Add bounded AWS query conventions, typed multipart client/server generation, simple array headers, and embedded path affixes. Enforce validation, size limits, route collision checks, and deterministic rejection of unsupported wire shapes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lightsofapollo
marked this pull request as ready for review
July 29, 2026 14:20
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
Expands the real-spec corpus follow-up with bounded, contract-driven support for several wire patterns that previously prevented generated clients and Axum servers from compiling or interoperating:
info.x-providerName: amazonaws.com;{api}.json, with canonical Axum route-collision rejection.Protocol and safety details
AWS query conventions
BTreeMap<usize, _>reconstruction.additionalProperties, and duplicate/conflicting representations instead of guessing.form+explodeobjects.Multipart
reqwest::multipart::Forminternally.BinaryStrategy::BytesandBinaryStrategy::VecU8; supports textualBinaryStrategy::Stringsymmetrically.uint64abovei64::MAX.server.validation.max_body_byteswith AxumDefaultBodyLimit.serde_json::Valueexpansion: binary payloads stay in dedicated byte slots and are restored into the typed model after validation.additionalPropertiesmultipart shapes deterministically.multipartfeature only when required.Headers and routes
{id}and{name}cannot evade collision detection.Corpus and real-spec verification
The rebuilt generator was run across all 241 corpus entries:
Real-spec spot checks covered Adobe AEM, api.video, Amazon DocumentDB, Amazon S3, and apis.guru.
MinIO smoke test
A regenerated S3 client successfully completed:
ListBucketsCreateBucketPutObjectGetObjectVerification
cargo test --all-featurescargo fmt --all -- --checkcargo clippy --all-features -- -D warningsRUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-featuresCONFORMANCE_REPORT=1 cargo test --test conformance --test conformance_json_schemacargo build --quiet --bin openapi-to-rustcargo clippy --all-targets --all-features -- -D warningsremains affected by established test/exampleunwrap/expectlint failures; the CI-equivalent library/all-feature clippy command above is clean.Review notes
The query and multipart implementations are intentionally bounded. This PR rejects shapes for which client/server symmetry, extraction closure, validation semantics, or memory behavior cannot be guaranteed. Please review those generation-time rejection boundaries as part of the API contract.
Draft for human review; no auto-merge.