schemars/docs/_v0/examples/6-doc_comments.md
2024-06-09 19:01:24 +01:00

713 B

title parent nav_order summary
Doc Comments Examples 6 Giving schemas a custom title and/or description using doc comments.

Setting a Custom Title and/or Description Using Doc Comments

If a struct, variant or field has any doc comments (or doc attributes), then these will be used as the generated schema's description. If the first line is an ATX-style markdown heading (i.e. it begins with a # character), then it will be used as the schema's title, and the remaining lines will be the description.

{% include example_v0.md name="doc_comments" %}