Respect #[serde(transparent)] attribute (#17)
This commit is contained in:
parent
509a1c3b7b
commit
5a28cef598
8 changed files with 121 additions and 5 deletions
|
@ -133,6 +133,15 @@ Setting this on a container will set the `additionalProperties` keyword on gener
|
|||
|
||||
Serde docs: [container](https://serde.rs/container-attrs.html#deny_unknown_fields)
|
||||
|
||||
<h3 id="transparent">
|
||||
|
||||
`#[serde(transparent)]` / `#[schemars(transparent)]`
|
||||
</h3>
|
||||
|
||||
Set on a newtype struct or a braced struct with one field to make the struct's generated schema exactly the same as that of the single field's.
|
||||
|
||||
Serde docs: [container](https://serde.rs/container-attrs.html#transparent)
|
||||
|
||||
</div>
|
||||
|
||||
## Other Attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue