Repository navigation
fix(macro): round-7 parser findings - #304
Merged
Merged
Conversation
- Query/Path: a #[serde(transparent)] struct reads serde's transparent
field (never PhantomData / skipped / serde(default)); transparent and
from/try_from tuple structs are followed too.
- value_type generic substitution splits at the first comma outside
<..> (HashMap<String, T>, Result<T, E>); a -> closes no bracket.
- Request-view recursive generic instances are named `<name>.Input`, so
Tree<User> never collides with Tree<UserInput>.
- Two flattened maps: anyOf of their values in the response view (serde
writes each map's own entries), allOf in the request view.
- A NoContent error side is labelled "Successful response" (204).
- A bare argument of a shapeless type keeps the {type: string} path
placeholder instead of widening it to {}.
- Docs: #[schema(any)] emits {}, custom typed headers are kebab-cased
type names.
- Tests now assert what they claim (exact response sets, content types,
tag values per variant, innermost builtin idents, leaf conversion
arms, more primitive arms, and more).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Changepacksvespera@0.8.0 - Cargo.tomlMaybe you forgot to write the following files to the latest version vespera@0.8.0 → 0.8.1 - crates/vespera/Cargo.tomlPatch
vespera_core@0.8.0 → 0.8.1 - crates/vespera_core/Cargo.tomlPatch
vespera_inprocess@0.8.0 → 0.8.1 - crates/vespera_inprocess/Cargo.tomlPatch
vespera_jni@0.8.0 → 0.8.1 - crates/vespera_jni/Cargo.tomlPatch
vespera_macro@0.8.0 → 0.8.1 - crates/vespera_macro/Cargo.tomlPatch
vespera-bridge@0.8.0 → 0.8.1 - libs/vespera-bridge/build.gradle.ktsPatch
vespera-bridge-gradle-plugin@0.8.0 → 0.8.1 - libs/vespera-bridge-gradle-plugin/build.gradle.ktsPatch
|
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
Round-7 audit of
crates/vespera_macro/src/parser/**.Fixes (failing-first tests)
Query/Pathover a#[serde(transparent)]struct now picks serde's transparent field via the sharedsingle_emitted_field(Deserialize side):PhantomData, skipped and#[serde(default)]fields are excluded (was: the first non-skipped field, so{_p: PhantomData<T>, inner: Filter}documented nothing). Doc comment corrected.from/try_fromtuple structs are followed too (newstruct_definitionof any shape;named_struct_fieldsfilters on top).value_type = ...splits at the first comma outside<..>(HashMap<String, T>,Result<T, Vec<T>>); the>of->closes nothing..Input(no ident holds a.), soTree<User>(request) no longer collides withTree<UserInput>(response). SnapshotTree_i32Input->Tree_i32.Input.#[schema(any)]emits{}; unknown typed headers use the kebab-cased type name.Found while hardening the skimmed tests
anyOfof the value schemas (serde writes each map's own entries); the request view keepsallOf.Result<_, (HeaderMap, NoContent)>: the204error side is labelled "Successful response", like the3XXside is "Redirect".org: OrgCtx) keeps the{type: string}path placeholder instead of widening it to{}.Tests fixed to assert what they claim: exact response sets and content types in
operation/tests.rs, query/header parameter assertions, typed-response replacement, schema JSON in the dedup snapshot, binding names that differ from the enum tag, per-variant tag values in internally/adjacently tagged tests, untagged empty enum checksanyOf,let-elseinstead of silentif let, innermost builtin idents, leaf-arm-only builtin coverage check, missing primitive arms, lifetime-substitution check,take_materializedreset (moved toconversion/tests_instances.rs),ptr::eqfor unwrap identity, de-duplicated response case, misleading names/comments.examples/axum-example/openapi.json: unchanged.🤖 Generated with Claude Code