diff --git a/atlan/client/client.go b/atlan/client/client.go index 2aba36b..399f8a1 100644 --- a/atlan/client/client.go +++ b/atlan/client/client.go @@ -188,9 +188,11 @@ func (ac *AtlanClient) CallAPI(api *API, queryParams map[string]string, requestO response, err := ac.makeRequest(api.Method, path, params) if err != nil { - fmt.Println(err) - errorMessage, _ := ioutil.ReadAll(response.Body) - return nil, handleApiError(response, string(errorMessage)) + if response != nil && response.Body != nil { + errorMessage, _ := ioutil.ReadAll(response.Body) + return nil, handleApiError(response, string(errorMessage)) + } + return nil, err } ac.logHTTPStatus(response) diff --git a/atlan/model/assets/datacontract.go b/atlan/model/assets/datacontract.go index 8728da4..1cd0029 100644 --- a/atlan/model/assets/datacontract.go +++ b/atlan/model/assets/datacontract.go @@ -2,9 +2,9 @@ package assets type DataContract struct { Catalog - DataContractJson *string `json:"dataContractJson,omitempty"` - Version *string `json:"dataContractVersion,omitempty"` - AssetGuid *string `json:"dataContractAssetGuid,omitempty"` + Version *string `json:"dataContractVersion,omitempty"` + AssetGuid *string `json:"dataContractAssetGuid,omitempty"` + Attributes *DataContractAttributes `json:"attributes,omitempty"` // Relationships LatestCertified *[]Asset `json:"dataContractLatestCertified,omitempty"` ContractAssetCertified *[]DataContract `json:"dataContractAssetCertified,omitempty"` @@ -14,6 +14,13 @@ type DataContract struct { ContractNextVersion *[]DataContract `json:"dataContractNextVersion,omitempty"` } +type DataContractAttributes struct { + Name *string `json:"name,omitempty"` + CertificateStatus *string `json:"certificateStatus,omitempty"` + QualifiedName *string `json:"qualifiedName,omitempty"` + DataContractJson *string `json:"dataContractJson,omitempty"` +} + /* type DataContract struct { Asset