Skip to content

Commit 9fb226b

Browse files
Update docs to include value precedence
1 parent 9ce6d33 commit 9fb226b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/developer/meta/config-specs.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,14 @@ It respects a few extra [option](#options)-level attributes:
134134

135135
It also respects a few extra fields under the `value` attribute of each option:
136136

137-
- `display_default` - This is the default value that will be shown in the header of each option, useful if it differs from the `example`.
138-
This will take precedence over the `default`. You may also set it to `null` explicitly to disable showing this part of the header.
137+
- `display_default` - Overrides the default value shown in the commented-out header of the example file. This is useful if the value you want to *display* differs from the `example` value or the functional `default` value.
138+
139+
* **Value Precedence:** When generating the header, the consumer displays the *first* value it finds from this priority list:
140+
1. `display_default`
141+
2. `default` (from the [Data model consumer](#data-model-consumer))
142+
3. `example` (from the [Values](#values) section)
143+
144+
* **Suppressing the Default:** To explicitly *prevent* any default value from being shown in the header, set this field to `null`. This will suppress the output even if `default` or `example` are set.
139145
- `compact_example` - Whether or not to display complex types like arrays in their most compact representation. It defaults to `false`.
140146

141147
### Usage

0 commit comments

Comments
 (0)