Update docs and changelog
This commit is contained in:
parent
75419fa3d5
commit
61c106fd5b
2 changed files with 12 additions and 2 deletions
|
@ -31,6 +31,8 @@ Serde also allows setting `#[serde(...)]` attributes which change how types are
|
|||
- [`with`](#with)
|
||||
1. [Other Attributes](#other-attributes)
|
||||
- [`schema_with`](#schema_with)
|
||||
- [`title` / `description`](#title-description)
|
||||
- [`deprecated`](#deprecated)
|
||||
- [Doc Comments (`doc`)](#doc)
|
||||
|
||||
## Supported Serde Attributes
|
||||
|
@ -153,12 +155,19 @@ Serde docs: [container](https://serde.rs/container-attrs.html#transparent)
|
|||
|
||||
Set on a variant or field to generate this field's schema using the given function. This function must be callable as `fn(&mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema`.
|
||||
|
||||
<h3 id="title-description">
|
||||
|
||||
`#[schemars(title = "Some title", description = "Some description)]`
|
||||
</h3>
|
||||
|
||||
Set on a container, variant or field to set the generated schema's `title` and/or `description`. If present, these will be used instead of values from any [`doc` comments/attributes](#doc).
|
||||
|
||||
<h3 id="deprecated">
|
||||
|
||||
`#[deprecated]`
|
||||
</h3>
|
||||
|
||||
Set the Rust build-in [`deprecated`](https://doc.rust-lang.org/edition-guide/rust-2018/the-compiler/an-attribute-for-deprecation.html) attribute on a struct, enum, field or variant to set the generated schema's `deprecated` keyword to `true`.
|
||||
Set the Rust built-in [`deprecated`](https://doc.rust-lang.org/edition-guide/rust-2018/the-compiler/an-attribute-for-deprecation.html) attribute on a struct, enum, field or variant to set the generated schema's `deprecated` keyword to `true`.
|
||||
|
||||
<h3 id="doc">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue