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

#511 in Encoding

Download history 418/week @ 2024-01-20 396/week @ 2024-01-27 514/week @ 2024-02-03 517/week @ 2024-02-10 433/week @ 2024-02-17 497/week @ 2024-02-24 438/week @ 2024-03-02 430/week @ 2024-03-09 584/week @ 2024-03-16 398/week @ 2024-03-23 420/week @ 2024-03-30 357/week @ 2024-04-06 386/week @ 2024-04-13 814/week @ 2024-04-20 701/week @ 2024-04-27 567/week @ 2024-05-04

2,498 downloads per month
Used in 7 crates (4 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–22MB
~350K SLoC