docs: document @[json: "-"] and @[sql: "-"]

This commit is contained in:
Delyan Angelov 2024-12-30 10:30:26 +02:00
parent 9f11638cba
commit fb5bac112e
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -4686,7 +4686,9 @@ struct User {
// and decoding will not fail.
name string @[required]
age int
// Use the `skip` attribute to skip certain fields
// Use the `@[skip]` attribute to skip certain fields.
// You can also use `@[json: '-']`, and `@[sql: '-']`, which will cause only
// the `json` module to skip the field, or only the SQL orm to skip it.
foo Foo @[skip]
// If the field name is different in JSON, it can be specified
last_name string @[json: lastName]