Skip to content

Commit

Permalink
ENGSUP-8949: consistently use zone_name instead of zoneName. (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPsychick authored Jan 7, 2025
1 parent 3556fa4 commit e4bd6a2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Some examples, more below in the actual changelog (newer entries are more likely

### Fixed

* CloudDNS now consistently uses `zone_name` during requests, fixing integration tests (#432, @drpsychick)
* golang/x/net: update to 0.33.0 due to CVE-2024-45338 (#431, @drpsychick)

## [0.7.6] -- 2024-11-04
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/clouddns/v1/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func mock_update_zone(z clouddnsv1.Zone) {

expectedData := struct {
clouddnsv1.Zone
Name string `json:"zoneName"`
Name string `json:"zone_name"`
}{
Zone: z,
Name: z.Name,
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/clouddns/v1/zone_genclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func (z *Zone) FilterAPIRequestBody(ctx context.Context) (interface{}, error) {
if err != nil {
return nil, err
}
// The Create and Update endpoints expect the Zone's name to be in the request body under the key "zoneName"
// The Create and Update endpoints expect the Zone's name to be in the request body under the key "zone_name"
if op == types.OperationCreate || op == types.OperationUpdate {
zWithZoneName := struct {
Zone
ZoneName string `json:"zoneName"`
ZoneName string `json:"zone_name"`
}{*z, z.Name}

// `name` does not exist as a field on the Engine API for these requests,
Expand Down
4 changes: 2 additions & 2 deletions pkg/clouddns/zone/zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type Definition struct {

// Required - Zone name parameter
// Parameter used for create/update/delete etc.
ZoneName string `json:"zoneName"`
ZoneName string `json:"zone_name"`

// Required - Is master flag
// Flag designating if CloudDNS operates as master or slave.
Expand Down Expand Up @@ -116,7 +116,7 @@ type ResourceRecord struct {
}

type Create struct {
Name string `json:"zoneName"`
Name string `json:"zone_name"`
Master bool `json:"master"`
}

Expand Down

0 comments on commit e4bd6a2

Please sign in to comment.