Validate typed JSON filter paths before transport - #82
Merged
Conversation
terjekv
force-pushed
the
agent/validate-json-filter-paths
branch
from
August 29, 2026 16:32
98e79f0 to
77415a0
Compare
terjekv
force-pushed
the
agent/validate-json-filter-paths
branch
from
August 29, 2026 16:35
77415a0 to
7a3eb85
Compare
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
JsonPathtype that validates the Hubuum v0.0.9 JSON-path grammar.path([...]).operator(...)API while carrying invalid paths to a local terminal-operation errortry_pathfor eager validation andwith_pathfor reusable validated pathsObjectAggregateJsonPathas a compatibility aliasBehavior and compatibility
Invalid, empty, or missing JSON filter paths now return
ApiError::InvalidJsonPathlocally before any request is sent. Existing valid chains continue to compile unchanged:client .classes() .json_schema() .path(["properties", "hostname"]) .eq("string")Callers that want immediate validation can use
try_path(...)?; callers that reuse a path can constructJsonPathonce and pass it towith_path.Invalid aggregate paths now use the same
ApiError::InvalidJsonPathvariant. The old aggregate path type name remains available as an alias.No breaking change. No dependency, MSRV, target-server, or OpenAPI snapshot changes are included.
Closes #68
Verification
cargo fmt --all -- --checkcargo run -p hubuum_reconcile --locked -- checkcargo clippy --workspace --all-targets --all-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-depscargo test --workspace --all-features --lockedcargo +1.88 check --workspace --all-targets --all-features --lockedpython3 scripts/openapi-contract.py validate./scripts/run-integration-tests.sh --with-e2e-client -- --test-threads=1against the pinned server image