10 releases (breaking)

0.8.0 Dec 9, 2023
0.7.0 Oct 18, 2023
0.6.0 Apr 30, 2023
0.5.0 Jan 15, 2023
0.1.0 Sep 6, 2022

#24 in #validate-json

Download history 1307/week @ 2024-11-16 1263/week @ 2024-11-23 1063/week @ 2024-11-30 1613/week @ 2024-12-07 898/week @ 2024-12-14 745/week @ 2024-12-21 290/week @ 2024-12-28 688/week @ 2025-01-04 924/week @ 2025-01-11 855/week @ 2025-01-18 655/week @ 2025-01-25 676/week @ 2025-02-01 839/week @ 2025-02-08 722/week @ 2025-02-15 750/week @ 2025-02-22 884/week @ 2025-03-01

3,272 downloads per month
Used in 8 crates (4 directly)

MIT/Apache

1.5MB
2K SLoC

Rust 1.5K SLoC // 0.0% comments JavaScript 424 SLoC // 0.0% comments

axum-jsonschema

A drop-in replacement for Json extractor and response that validates requests based on JSON schemas.


lib.rs:

A simple crate provides a drop-in replacement for axum::Json that uses jsonschema to validate requests schemas generated via schemars.

You might want to do this in order to provide a better experience for your clients and not leak serde's error messages.

All schemas are cached in a thread-local storage for the life of the application (or thread).

Features

  • aide: support for aide

Dependencies

~13–22MB
~319K SLoC