Add example for schemars attributes
This commit is contained in:
parent
601fc3aaad
commit
b11536e527
7 changed files with 175 additions and 2 deletions
13
docs/examples/3-schemars_attrs.md
Normal file
13
docs/examples/3-schemars_attrs.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: default
|
||||
title: Using Schemars Attributes
|
||||
parent: Examples
|
||||
nav_order: 3
|
||||
summary: '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" %}
|
Loading…
Add table
Add a link
Reference in a new issue