Add docs permalinks
This commit is contained in:
parent
938d273d42
commit
64b0f79851
8 changed files with 9 additions and 3 deletions
|
@ -3,6 +3,7 @@ layout: default
|
|||
title: Attributes
|
||||
parent: Deriving JsonSchema
|
||||
nav_order: 1
|
||||
permalink: /deriving/attributes
|
||||
---
|
||||
|
||||
<style>
|
||||
|
@ -40,7 +41,7 @@ Serde also allows setting `#[serde(...)]` attributes which change how types are
|
|||
`#[serde(rename = "name")]` / `#[schemars(rename = "name")]`
|
||||
</h3>
|
||||
|
||||
Set on a struct, enum, field or variant to use the given name in the generated schema instead of the Rust name. When used on a struct or enum, the given name will be used as the title for root schemas, and as the schema identifier for schemas referenced from another schema's `$ref` property.
|
||||
Set on a struct, enum, field or variant to use the given name in the generated schema instead of the Rust name. When used on a struct or enum, the given name will be used as the title for root schemas, and the key within the root's `definitions` property for subschemas.
|
||||
|
||||
If set on a struct or enum with generic type parameters, then the given name may contain them enclosed in curly braces (e.g. `{T}`) and they will be replaced with the concrete type names when the schema is generated.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue