Skip to content

Commit

Permalink
fix(Global Catalog): re-gen service after recent API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
padamstx committed Nov 19, 2020
1 parent fa8bc94 commit aeb899f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ package-lock.json

# IDE files
*.idea

*.log
1 change: 0 additions & 1 deletion common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ func ToJSON(obj interface{}) string {
panic(err)
}
return string(b)

}
23 changes: 12 additions & 11 deletions globalcatalogv1/global_catalog_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-8d569e8f-20201030-111043
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-ef9b3113-20201118-074613
*/


Expand Down Expand Up @@ -832,7 +832,7 @@ func (globalCatalog *GlobalCatalogV1) UpdateVisibilityWithContext(ctx context.Co

// GetPricing : Get the pricing for an object
// This endpoint returns the pricing for an object. Static pricing is defined in the catalog. Dynamic pricing is stored
// in Bluemix Pricing Catalog.
// in IBM Cloud Pricing Catalog.
func (globalCatalog *GlobalCatalogV1) GetPricing(getPricingOptions *GetPricingOptions) (result *PricingGet, response *core.DetailedResponse, err error) {
return globalCatalog.GetPricingWithContext(context.Background(), getPricingOptions)
}
Expand Down Expand Up @@ -1699,25 +1699,26 @@ type CatalogEntry struct {
// Catalog entry's unique ID. It's the same across all catalog instances.
ID *string `json:"id,omitempty"`

CatalogCrn interface{} `json:"catalog_crn,omitempty"`
// The CRN associated with the catalog entry.
CatalogCrn *string `json:"catalog_crn,omitempty"`

// URL to get details about this object.
URL interface{} `json:"url,omitempty"`
URL *string `json:"url,omitempty"`

// URL to get details about children of this object.
ChildrenURL interface{} `json:"children_url,omitempty"`
ChildrenURL *string `json:"children_url,omitempty"`

// tags to indicate the locations this service is deployable to.
GeoTags interface{} `json:"geo_tags,omitempty"`
GeoTags []string `json:"geo_tags,omitempty"`

// tags to indicate the type of pricing plans this service supports.
PricingTags interface{} `json:"pricing_tags,omitempty"`
PricingTags []string `json:"pricing_tags,omitempty"`

// Date created.
Created interface{} `json:"created,omitempty"`
Created *strfmt.DateTime `json:"created,omitempty"`

// Date last updated.
Updated interface{} `json:"updated,omitempty"`
Updated *strfmt.DateTime `json:"updated,omitempty"`
}

// Constants associated with the CatalogEntry.Kind property.
Expand Down Expand Up @@ -3081,8 +3082,8 @@ type Message struct {
// message describing action.
Message *string `json:"message,omitempty"`

// JSON object containing details on changes made to object data.
Data interface{} `json:"data,omitempty"`
// An object containing details on changes made to object data.
Data map[string]interface{} `json:"data,omitempty"`
}


Expand Down
5 changes: 5 additions & 0 deletions globalcatalogv1/global_catalog_v1_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ var _ = Describe("Global Catalog - Integration Tests", func() {
Expect(err).To(BeNil())
Expect(detailedResponse.StatusCode).To(Equal(200))
Expect(result).ToNot(BeNil())
fmt.Fprintf(GinkgoWriter, "GetChildObjects() result:\n%s", common.ToJSON(result))
Expect(*result.Offset).To(Equal(expectedOffset))
Expect(*result.Count).To(Equal(expectedCount))
Expect(*result.ResourceCount).To(Equal(expectedResourceCount))
Expand Down Expand Up @@ -401,6 +402,8 @@ var _ = Describe("Global Catalog - Integration Tests", func() {
result, detailedResponse, err := service.GetVisibility(getVisibility)
Expect(err).To(BeNil())
Expect(detailedResponse.StatusCode).To(Equal(200))
Expect(result).ToNot(BeNil())
fmt.Fprintf(GinkgoWriter, "GetVisibility() result:\n%s", common.ToJSON(result))
Expect(*result.Restrictions).To(Equal(visibilityRestriction))
})

Expand Down Expand Up @@ -458,6 +461,8 @@ var _ = Describe("Global Catalog - Integration Tests", func() {
result, detailedResponse, err := service.ListArtifacts(listArtifacts)
Expect(err).To(BeNil())
Expect(detailedResponse.StatusCode).To(Equal(200))
Expect(result).ToNot(BeNil())
fmt.Fprintf(GinkgoWriter, "ListArtifacts() result:\n%s", common.ToJSON(result))
Expect(*result.Count).To(Equal(expectedCount))
Expect(len(result.Resources)).To(Equal(1))
Expect(result.Resources[0].Name).To(Equal(uploadArtifactList.ArtifactID))
Expand Down
Loading

0 comments on commit aeb899f

Please sign in to comment.