Skip to content

Commit 55dc25a

Browse files
committed
Resolve remarks Mikey
1 parent 85bdbcf commit 55dc25a

File tree

3 files changed

+18
-29
lines changed

3 files changed

+18
-29
lines changed

docs/reference/schemas/config/functions/coalesce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ coalesce(<value1>, <value2>, ...)
2020
## Description
2121

2222
The `coalesce()` function evaluates arguments from left to right and returns the first argument that
23-
is not null. This function is useful for providing fallback values when dealing with potentially
23+
isn't null. This function is useful for providing fallback values when dealing with potentially
2424
null data.
2525

2626
If all arguments are null, the function returns null.
@@ -41,7 +41,7 @@ resources:
4141
output:
4242
firstNonNull: "[coalesce(null(), 'DSC', 'landscape')]"
4343
allNull: "[coalesce(null(), null(), null())]"
44-
firstNotNull: "[coalesce('first', 'second', 'third')]"
44+
noneNull: "[coalesce('first', 'second', 'third')]"
4545
```
4646
4747
```bash
@@ -57,7 +57,7 @@ results:
5757
output:
5858
firstNonNull: DSC
5959
allNull: null
60-
firstNotNull: first
60+
noneNull: first
6161
messages: []
6262
hadErrors: false
6363
```

docs/reference/schemas/config/functions/createObject.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ resources:
110110
properties:
111111
output:
112112
nestedObject: "[createObject('config', createObject('timeout', 30, 'enabled', true))]"
113-
objectWithArray: "[createObject('items', createArray('Yoda', 'Darth Vader', 'Palpetine'))]"
113+
objectWithArray: "[createObject('items', createArray('foo', 'bar', 'baz'))]"
114114
```
115115
116116
```bash
@@ -130,9 +130,9 @@ results:
130130
enabled: true
131131
objectWithArray:
132132
items:
133-
- Yoda
134-
- 'Darth Vader'
135-
- Palpetine
133+
- foo
134+
- bar
135+
- baz
136136
messages: []
137137
hadErrors: false
138138
```
@@ -180,7 +180,7 @@ hadErrors: false
180180

181181
## Parameters
182182

183-
### key, value pairs
183+
### Key-value pairs
184184

185185
The `createObject()` function accepts zero or more key-value pairs. Each key must be a string,
186186
and values can be of any type.
@@ -228,11 +228,11 @@ The function will return an error in the following cases:
228228

229229
## Notes
230230

231-
- Keys must be strings; numeric or other types are not allowed as keys
232-
- Values can be any valid JSON type including null, arrays, and nested objects
233-
- Duplicate keys will result in the last value overwriting previous values
234-
- Empty object creation (`createObject()` with no arguments) is supported
235-
- The function preserves the order of properties as specified
231+
- Keys must be strings. If you specify numeric or other types, DSC raises an error.
232+
- Values can be any valid JSON type including null, arrays, and nested objects.
233+
- Duplicate keys will result in the last value overwriting previous values.
234+
- Empty object creation (`createObject()` with no arguments) is supported.
235+
- The function preserves the order of properties as specified.
236236

237237
## Related functions
238238

docs/reference/schemas/config/functions/null.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@ messages: []
123123
hadErrors: false
124124
```
125125
126-
## Parameters
127-
128-
The `null()` function accepts no parameters.
129-
130-
```yaml
131-
Type: none
132-
Required: false
133-
MinimumCount: 0
134-
MaximumCount: 0
135-
```
136-
137126
## Output
138127
139128
The `null()` function always returns a JSON null value.
@@ -144,11 +133,11 @@ Type: null
144133

145134
## Notes
146135

147-
- The `null()` function is particularly useful when working with other functions that handle null values
148-
, such as `coalesce()`
149-
- Unlike undefined or missing values, `null()` explicitly represents the JSON null value
150-
- When used in object creation with `createObject()`, null properties are included in the resulting object
151-
- The function takes no arguments and will return an error if any arguments are provided
136+
- The `null()` function is particularly useful when working with other functions that handle null
137+
values, such as `coalesce()`.
138+
- Unlike undefined or missing values, `null()` explicitly represents the JSON null value.
139+
- When used in object creation with `createObject()`, null properties are included in the resulting object.
140+
- The function takes no arguments and will return an error if any arguments are provided.
152141

153142
## Related functions
154143

0 commit comments

Comments
 (0)