Respect #[serde(transparent)] attribute (#17)

This commit is contained in:
Graham Esau 2020-05-16 21:16:59 +01:00
parent 509a1c3b7b
commit 5a28cef598
8 changed files with 121 additions and 5 deletions

View file

@ -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