Skip to content

Commit

Permalink
Adding omitempty to client resource struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishal Kotcherlakota committed May 21, 2018
1 parent ef2ec8c commit 98e104e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resource_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ type Client struct {
Description string `json:"description"`
Cross_origin_auth bool `json:"cross_origin_auth"`
Sso bool `json:"sso"`
Token_endpoint_auth_method string `json:"token_endpoint_auth_method"`
Token_endpoint_auth_method string `json:"token_endpoint_auth_method,omitempty"`
Grant_types []interface{} `json:"grant_types"`
App_type string `json:"app_type"`
App_type string `json:"app_type,omitempty"`
Custom_login_page_on bool `json:"custom_login_page_on"`
}

Expand All @@ -111,7 +111,7 @@ func resourceClientCreate(d *schema.ResourceData, m interface{}) error {
if err != nil {
return err
}
log.Println("Request JSON: " + string(jsonValue))
log.Println("[DEBUG] Request JSON: " + string(jsonValue))

config := m.(Config)
client := http.Client{}
Expand All @@ -127,7 +127,7 @@ func resourceClientCreate(d *schema.ResourceData, m interface{}) error {
if err != nil {
return err
}
log.Println("Response JSON:" + string(data))
log.Println("[DEBUG] Response JSON:" + string(data))

if resp.StatusCode != 201 {
return errors.New("Error: Invalid status code during create: " + string(data))
Expand Down

0 comments on commit 98e104e

Please sign in to comment.