diff --git a/admin_user.go b/admin_user.go index 76e1a9ae5..c6d055317 100644 --- a/admin_user.go +++ b/admin_user.go @@ -81,10 +81,10 @@ type AdminUserListOptions struct { Query string `url:"q,omitempty"` // Can be "true" or "false" to show only administrators or non-administrators. - Administrators string `url:"filter[admin]"` + Administrators string `url:"filter[admin],omitempty"` // Can be "true" or "false" to show only suspended users or users who are not suspended. - SuspendedUsers string `url:"filter[suspended]"` + SuspendedUsers string `url:"filter[suspended],omitempty"` Include []AdminUserIncludeOps `url:"include,omitempty"` } diff --git a/oauth_token.go b/oauth_token.go index 705c89e7a..be7a2fc35 100644 --- a/oauth_token.go +++ b/oauth_token.go @@ -109,7 +109,7 @@ type OAuthTokenUpdateOptions struct { Type string `jsonapi:"primary,oauth-tokens"` // A private SSH key to be used for git clone operations. - PrivateSSHKey *string `jsonapi:"attr,ssh-key"` + PrivateSSHKey *string `jsonapi:"attr,ssh-key,omitempty"` } // Update an existing OAuth token. diff --git a/policy.go b/policy.go index 8a72eeb5a..b65bbc4ef 100644 --- a/policy.go +++ b/policy.go @@ -127,7 +127,7 @@ type PolicyCreateOptions struct { // EnforcementOptions represents the enforcement options of a policy. type EnforcementOptions struct { - Path *string `json:"path,omitempty"` + Path *string `json:"path"` Mode *EnforcementLevel `json:"mode"` } diff --git a/state_version.go b/state_version.go index 1397f954f..e59f38cfc 100644 --- a/state_version.go +++ b/state_version.go @@ -131,7 +131,7 @@ type StateVersionCreateOptions struct { // Force can be set to skip certain validations. Wrong use // of this flag can cause data loss, so USE WITH CAUTION! - Force *bool `jsonapi:"attr,force"` + Force *bool `jsonapi:"attr,force,omitempty"` // Specifies the run to associate the state with. Run *Run `jsonapi:"relation,run,omitempty"` diff --git a/team_access.go b/team_access.go index 00549f979..23f60cb2d 100644 --- a/team_access.go +++ b/team_access.go @@ -103,7 +103,7 @@ type TeamAccess struct { // TeamAccessListOptions represents the options for listing team accesses. type TeamAccessListOptions struct { ListOptions - WorkspaceID string `url:"filter[workspace][id],omitempty"` + WorkspaceID string `url:"filter[workspace][id]"` } //check that workspaceID field has a valid value