Skip to content

Commit e3dfe17

Browse files
Use documentation-safe pointer examples
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 06cca7e commit e3dfe17

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ operation budget. Alias and expanded-tag budgets are also enforced on the result
224224

225225
```powershell
226226
$cleanYaml = Get-Content -Path '.\config.yaml' |
227-
Remove-YamlEntry -Path @('/metadata/internalId', '/services/1/deprecated')
227+
Remove-YamlEntry -Path @('/metadata/internalIdentifier', '/services/1/deprecated')
228228
```
229229

230230
Paths use [RFC 6901 JSON Pointer](https://www.rfc-editor.org/rfc/rfc6901). An empty pointer selects a document root, `~0` addresses a tilde, and `~1` addresses a slash. Mapping tokens match only scalar YAML string keys by ordinal content, so numeric, complex, and unknown-tagged keys are never coerced or guessed. Sequence tokens must be `0` or a non-zero decimal index without signs or leading zeros.

src/functions/public/Remove-YamlEntry.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function Remove-YamlEntry {
7979
Aggregates file lines and removes one nested mapping entry from document zero.
8080
8181
.EXAMPLE
82-
$clean = Remove-YamlEntry -InputObject $yaml -Path @('/metadata/id', '/items/2')
82+
$clean = Remove-YamlEntry -InputObject $yaml -Path @('/metadata/identifier', '/items/2')
8383
8484
Resolves both paths against the original graph, then applies them atomically.
8585

0 commit comments

Comments
 (0)