Skip to content

Commit 65f1ffb

Browse files
Document atlas_doc_format body as a serialized-JSON string
Clarify the -Body help for New-ConfluencePage, Update-ConfluencePage and Add-ConfluenceComment: the v2 API stores body.value as a string for every representation, and for atlas_doc_format the string is the ADF document serialized as JSON. The existing [string]\During review of #17, Copilot suggested that `Remove-ConfluenceLabel` add a `-Prefix` parameter (defaulting to `global`) and include it in the DELETE query. The current behavior is correct for the common case: the v1 `DELETE /wiki/rest/api/content/{id}/label?name=<name>` endpoint defaults `prefix` to `global`, so removing a global label by name works. This is proven by the passing integration test in #17, which removes a label by name and then asserts it is no longer present on the page. This issue tracks the optional enhancement of supporting non-`global` label prefixes (`my`, `team`, `system`) across the label cmdlets (`Add-ConfluenceLabel`, `Get-ConfluenceLabel`, `Remove-ConfluenceLabel`) by adding an optional `-Prefix` parameter, so labels with a non-default prefix can be managed. This is out of scope for #17, which delivers global-label management. handling is correct; this documents the expected input (review threads on atlas_doc_format handling).
1 parent 648ab3c commit 65f1ffb

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/functions/public/Comments/Add-ConfluenceComment.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ function Add-ConfluenceComment {
2626
[Parameter(Mandatory)]
2727
[string]$PageId,
2828

29-
# The comment body.
29+
# The comment body, as a string in the chosen representation. For 'atlas_doc_format' pass
30+
# the ADF document serialized as a JSON string (the v2 API stores body.value as a string
31+
# for every representation).
3032
[Parameter(Mandatory)]
3133
[string]$Body,
3234

src/functions/public/Pages/New-ConfluencePage.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ function New-ConfluencePage {
3434
# The ID of the parent page. Omit to create a top-level page.
3535
[string]$ParentId,
3636

37-
# The page body in the chosen representation. Defaults to empty.
37+
# The page body, as a string in the chosen representation. For 'atlas_doc_format' pass
38+
# the ADF document serialized as a JSON string - the v2 API stores body.value as a string
39+
# for every representation. Defaults to empty.
3840
[string]$Body = '',
3941

4042
# The body representation. Defaults to 'storage'.

src/functions/public/Pages/Update-ConfluencePage.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function Update-ConfluencePage {
3232
# The new title. Defaults to the existing title.
3333
[string]$Title,
3434

35-
# The new body. Defaults to the existing body.
35+
# The new body, as a string in the chosen representation. For 'atlas_doc_format' pass the
36+
# ADF document serialized as a JSON string (the v2 API stores body.value as a string for
37+
# every representation). Defaults to the existing body.
3638
[string]$Body,
3739

3840
# The body representation. Defaults to 'storage'.

0 commit comments

Comments
 (0)