← All repos

schemars

Generate JSON Schema documents from Rust code

json-schemarustserde
Browse cluster: Cluster 100
670commits
37contributors
2languages

Tech stack & purpose

Schemars is a Rust library that generates JSON Schema documents from Rust code, enabling developers to automatically create schema specifications that match how their types serialize and deserialize with Serde. The project is built in Rust and integrates with the Serde ecosystem, providing a `#[derive(JsonSchema)]` macro and `schema_for!` macro for schema generation, with support for numerous popular Rust crates like chrono, uuid, and bytes through optional feature flags. The library maintains compatibility with Serde's serialization behavior by respecting `#[serde(...)]` attributes and offers an alternative `schema_for_value!` macro for types that implement `Serialize` but not `JsonSchema`.

Languages

Rust
99.9%
Shell
0.1%

Contributors (top 30 of 37)