schemars
schemars copied to clipboard
Generate JSON Schema documents from Rust code
Hello, I was looking for a way to generate a schema compatible with [Avro](https://avro.apache.org/docs/1.11.1/specification/) based on a struct (for use with Apache Kafka), and it seems schemars is very close...
The `strip` and `merge` operations in `get_doc` and `merge_description_lines` will mess up code block format(or markdown format). This PR tries to avoid it in some scenarios.
Hi! I am using custom `serde` deserializers on some of my structs to parse data. For example the string `$hello.world` is deserialized into: ```rust #[derive(Clone, Debug, JsonSchema)] pub struct Reference...
Partial solution for https://github.com/GREsau/schemars/issues/246 - replace the manual construction of `Schema::Object` with a helper method - replace metadata setting with a function call per-metadata Taking the enum from https://github.com/adamchalmers/rust-problems/blob/achalmers/schemars-llvm-lines/src/lib.rs and...
Add ipnetwork with both IPV4 and IPV6 support.
Fix https://github.com/GREsau/schemars/issues/165. Use all_of when flattening multiple subschemas. There is still a limitation when flattening required enum. We lose the information that the field is required. This is not caused...
This PR takes the same strategy as the `arrayvec` and `uuid` crates and implements features with the names `smol_str01` and `smol_str02` with the `smol_str` feature enabling the `smol_str01` feature for...
Hey, thanks for your work on this great crate! At the moment, [80% of the Rust crates on `crates.io` depend on `syn` v2](https://lib.rs/crates/syn/rev), which is not semver-compatible with `syn` v1,...
I tried to cross compile a rocket server using rocket_okapi, but I get an error with [email protected] having 3 generic parameters but the code only providing 2. I tested updating...
Serde 1.0.164 [added the ability](https://github.com/serde-rs/serde/releases/tag/v1.0.164) to mark individual enum variants as `untagged`. Unfortunately, `schemars` seems to still bail upon encountering a variant-level `#[serde(untagged)]` attribute, e.g.: ```rust #[derive(JsonSchema)] enum Foo {...