You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/2020-12/meta-data/writeOnly.markdown
+68-46Lines changed: 68 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,80 +28,102 @@ related:
28
28
keyword: deprecated
29
29
---
30
30
31
-
the `writeOnly` keyword is used to indicate that an instance value should be writable, but it won't be included when the instance is retrieved from the owning authority. It's important to note that this doesn't imply the schema itself is writable; schemas must be treated as immutable. Instead, the keyword specifies instances where read/write operation semantics are use case specific.
31
+
The `writeOnly` keyword, when set to `true`, signifies that an instance value
32
+
(such as a specific object property) can be modified or removed but not read,
33
+
whatever that means in the context of the system. For example, form generators
34
+
may rely on this keyword to mark the corresponding input as as a password
35
+
field. This keyword does not affect validation, but the evaluator will collect
36
+
its value as an annotation.
32
37
33
-
*`writeOnly` does not affect data validation but serves as an informative annotation.
38
+
{{<best-practice>}}
34
39
35
-
## Examples
40
+
Avoid setting this keyword to the default value `false`. If an instance value
41
+
is not considered to be write only, the best practice is to omit the use of
42
+
this keyword altogether. This prevents unnecessarily generating and collecting
43
+
an annotation that does not carry any additional meaning.
0 commit comments