From fb5bac112e36e3606a9584ad021e9e3071da04cf Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 30 Dec 2024 10:30:26 +0200 Subject: [PATCH] docs: document `@[json: "-"]` and `@[sql: "-"]` --- doc/docs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index 653348c2081cce..9d6fddb340a166 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -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]