532 B
532 B
layout | title | parent | nav_order | summary |
---|---|---|---|---|
default | Using Schemars Attributes | Examples | 3 | Deriving JsonSchema on types that use #[schemars] attributes to customise serialization behaviour. |
Using Serde Attributes
#[serde(...)]
attributes can be overriden (or replaced) with #[schemars(...)]
attributes, which behave identically. You may find this useful if you want to change the generated schema without affecting Serde's behaviour, or if you're just not using Serde.
{% include example.md name="schemars_attrs" %}