ctreminiom / go-atlassian

✨ Golang Client Library for Atlassian Cloud.
https://docs.go-atlassian.io
MIT License
114 stars 29 forks source link

Confluence API V2 uses `string` type for `spaceId` - Library uses `int` #247

Closed mcramer-billgo closed 8 months ago

mcramer-billgo commented 8 months ago

Is your feature request related to a problem? Please describe. The v2 API documentation shows the POST body requiring a string for spaceId Screenshot 2023-10-06 at 3 14 34 PM

However, type PageCreatePayloadSchema has SpaceID int which makes it impossible to send most requests as they use strings.

Describe the solution you'd like Change:

type PageCreatePayloadScheme struct {
    SpaceID int                           `json:"spaceId,omitempty"`
    Status    string                        `json:"status,omitempty"`
    Title       string                        `json:"title,omitempty"`
    Body     *PageBodyRepresentationScheme `json:"body,omitempty"`
}

to:

type PageCreatePayloadScheme struct {
    SpaceID string                          `json:"spaceId,omitempty"`
    Status    string                        `json:"status,omitempty"`
    Title       string                        `json:"title,omitempty"`
    Body     *PageBodyRepresentationScheme `json:"body,omitempty"`
}
mcramer-billgo commented 8 months ago

Opened this PR to fix: https://github.com/ctreminiom/go-atlassian/pull/248