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

#515 in Encoding

Download history 127/week @ 2023-12-22 111/week @ 2023-12-29 178/week @ 2024-01-05 315/week @ 2024-01-12 390/week @ 2024-01-19 409/week @ 2024-01-26 493/week @ 2024-02-02 553/week @ 2024-02-09 405/week @ 2024-02-16 497/week @ 2024-02-23 451/week @ 2024-03-01 421/week @ 2024-03-08 567/week @ 2024-03-15 464/week @ 2024-03-22 352/week @ 2024-03-29 399/week @ 2024-04-05

1,862 downloads per month
Used in 4 crates (3 directly)

MIT/Apache

1MB
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–23MB
~344K SLoC