Skip to content

Commit

Permalink
docs: document @[json: "-"] and @[sql: "-"]
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Dec 30, 2024
1 parent 9f11638 commit fb5bac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit fb5bac1

Please sign in to comment.