schemars icon indicating copy to clipboard operation
schemars copied to clipboard

Generate JSON Schema documents from Rust code

Results 203 schemars issues
Sort by recently updated
recently updated
newest added

It would be really helpful if there were a way for a type like: ```rust HashMap ``` to provide docs for K and V neatly. Right now I think the...

## Problem `0.8.8` version added schema for `BigDecimal`, but it is incorrect, because BigDecimal serialized as string, and can be deserialized from string, number or integer. ## Details Current schema...

When you have a struct with the following structure: ```rust #[derive(Serialize, Deserialize, JsonSchema)] pub struct MyStruct { #[serde(flatten)] pub item: OtherItem, pub my_int: i32, } #[derive(Serialize, Deserialize, JsonSchema)] pub struct...

It looks like schemars validation attrs get lost when applied to newtypes in combination with using derive for `JsonSchema`. I think because the derive for `JsonSchema` assumes that it's not...

I was looking for an example of a totally manual implementation of `JsonSchema` but could not find this easily so created one by combining a few different things. Note that...

I added a small feature: I tried to add multiple examples to a single struct field but found it quite cumbersome. I had to create a new function for every...

I have a lot of types whose deserialization behavior allows for more types than the serialization does. For example: ```rust // Deserialize is implemented such that any non-string JSON object...

I've been working on Schemars for a little over 2 years now - it's always just been a personal project of mine, which does mean its progress depends on my...

1.0

[1.51 stabilized support for const generics on arrays](https://blog.rust-lang.org/2021/02/26/const-generics-mvp-beta.html), that way array length can be supported. I had the need for `[u8; 65]` (64 byte signature + nonce) but had to...