You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was implementing support for App Service Plans / Server Farms - and encountered a bug in the SDK.
Request:
PUT /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfasprg/providers/Microsoft.Web/serverfarms/tfaspexample?allowPendingState=false&api-version=2015-08-01
{"name":"tfaspexample","kind":"app","location":"westus","tags":{},"properties":{"name":"tfaspexample","maximumNumberOfWorkers":1},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}
..which redirects too the following URL to Poll for the outcome:
In the response, the field status is returned as an Integer - however as defined in the Go SDK it's an StatusOptions - which is an Enum:
// ServerFarmWithRichSku is app Service Plan Model
type ServerFarmWithRichSku struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Kind *string `json:"kind,omitempty"`
Location *string `json:"location,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*ServerFarmWithRichSkuProperties `json:"properties,omitempty"`
Sku *SkuDescription `json:"sku,omitempty"`
}
// ServerFarmWithRichSkuProperties is
type ServerFarmWithRichSkuProperties struct {
Name *string `json:"name,omitempty"`
WorkerTierName *string `json:"workerTierName,omitempty"`
Status StatusOptions `json:"status,omitempty"`
Subscription *string `json:"subscription,omitempty"`
AdminSiteName *string `json:"adminSiteName,omitempty"`
HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"`
GeoRegion *string `json:"geoRegion,omitempty"`
PerSiteScaling *bool `json:"perSiteScaling,omitempty"`
NumberOfSites *int32 `json:"numberOfSites,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
Reserved *bool `json:"reserved,omitempty"`
}
// StatusOptions enumerates the values for status options.
type StatusOptions string
const (
// StatusOptionsPending specifies the status options pending state for
// status options.
StatusOptionsPending StatusOptions = "Pending"
// StatusOptionsReady specifies the status options ready state for status
// options.
StatusOptionsReady StatusOptions = "Ready"
)
The specific Exception that I'm seeing is:
Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal number into Go value of type web.StatusOptions' JSON = '........'
I'm assuming this would need a fix in the API, rather than the Swagger?
Thanks! :)
The text was updated successfully, but these errors were encountered:
👋 me again
I was implementing support for App Service Plans / Server Farms - and encountered a bug in the SDK.
Request:
..which redirects too the following URL to Poll for the outcome:
which gives the following Response:
In the response, the field
status
is returned as an Integer - however as defined in the Go SDK it's anStatusOptions
- which is an Enum:The specific Exception that I'm seeing is:
I'm assuming this would need a fix in the API, rather than the Swagger?
Thanks! :)
The text was updated successfully, but these errors were encountered: