Skip to content

Commit d6e1349

Browse files
committed
Document Single Item Array filter
1 parent d6116b6 commit d6e1349

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/advanced-filter.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Here is the list of available filters and an explanation of each:
1111

1212
- [Absent File](/doc/advanced-filter.md#absent-file) - Ignore parameter changes of a file that is declared to be absent
1313
- [JSON](/doc/advanced-filter.md#json) - Ignore whitespace differences if JSON parses to the same object
14+
- [SingleItemArray](/doc/advanced-filter.md#SingleItemArray) - Ignore differences between object and array containing only that object
1415
- [YAML](/doc/advanced-filter.md#yaml) - Ignore whitespace/comment differences if YAML parses to the same object
1516

1617
## Absent File
@@ -84,6 +85,28 @@ If a file resource has extension `.json` and a difference in its content is obse
8485

8586
This allows you to ignore changes in whitespace, comments, etc., that are not meaningful to a machine parsing the file. Note that changes to files may still trigger Puppet to restart services even though these changes are not displayed in the octocatalog-diff output.
8687

88+
## Single Item Array
89+
90+
#### Usage
91+
92+
```
93+
--filters SingleItemArray
94+
```
95+
96+
#### Description
97+
98+
When enabling the future parser or upgrading between certain versions of Puppet, the internal structure of the catalog for certain parameters can change as shown in the following example:
99+
100+
```
101+
Old: { "notify": "Service[foo]" }
102+
New: { "notify": [ "Service[foo]" ] }
103+
```
104+
105+
This filter will suppress differences for the value of a parameter when:
106+
107+
- The value in one catalog is an object, AND
108+
- The value in the other catalog is an array containing *only* that same object
109+
87110
## YAML
88111

89112
#### Usage

0 commit comments

Comments
 (0)