From 77936e88034a6b6140ab019b5c06475649423cee Mon Sep 17 00:00:00 2001 From: Kevin Schoonover Date: Sat, 1 Jan 2022 20:03:00 -0800 Subject: [PATCH] add 'omitempty' to APIToken 'name' and 'policies' fields --- api_token.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api_token.go b/api_token.go index 0eb9bf7aee2..a028a0d8cc1 100644 --- a/api_token.go +++ b/api_token.go @@ -13,13 +13,13 @@ import ( // APIToken is the full API token. type APIToken struct { ID string `json:"id,omitempty"` - Name string `json:"name"` + Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` IssuedOn *time.Time `json:"issued_on,omitempty"` ModifiedOn *time.Time `json:"modified_on,omitempty"` NotBefore *time.Time `json:"not_before,omitempty"` ExpiresOn *time.Time `json:"expires_on,omitempty"` - Policies []APITokenPolicies `json:"policies"` + Policies []APITokenPolicies `json:"policies,omitempty"` Condition *APITokenCondition `json:"condition,omitempty"` Value string `json:"value,omitempty"` }