fix: skip example checks in instance data - #64
FanouZeng-TT wants to merge 3 commits into
Conversation
|
Thanks for submitting this fix @FanouZeng-TT! A couple of quick observations and suggestions:
|
|
Addressed both points in |
|
Small follow-up in |
aab664d to
d959d8a
Compare
|
Rebased onto the latest Full local verification passed: the targeted instance-keyword, schema-map collision, and referenced-example tests; |
d959d8a to
406358f
Compare
damaz91
left a comment
There was a problem hiding this comment.
Thanks @FanouZeng-TT! Rebased onto the latest main (adopting pointer_path from #65). LGTM!
Description
check_exampleswalked every object and array value below a schema node.default,const,examples, andenumhold JSON instance data, so a business object such as{ "type": "string", "examples": [123] }inside one of those keywords was reinterpreted as a schema and reported asE008.Fix: skip those four instance-data keyword values during example traversal while preserving validation at real schema locations. The regression test covers all four keywords, and the existing invalid-example test continues to protect real
examplesarrays.Category (Required)
Related Issues
N/A
Checklist
generate_models.shunderpython_sdk(not applicable).Screenshots / Logs (if applicable)
N/A — verified with
cargo test --all-targets,cargo clippy --all-targets -- -D warnings,cargo fmt --check, all pre-commit hooks, andgit diff --check.