Azure-rest-api-specs: Kusto: Wrong type of ReadWriteDatabaseProperties#isFollowed

Created on 13 May 2020  路  10Comments  路  Source: Azure/azure-rest-api-specs

ReadWriteDatabaseProperties#isFollowed must be of type bool, but is of type string.

https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json#L2879

This leads to a unmarshal error within the Go library.

Bug reference: https://github.com/Azure/azure-sdk-for-go/issues/9339

Service Attention customer-reported

All 10 comments

@ArcturusZhang Could you help on this go sdk issue?

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @radennis.

I think this should be a valid fix for the issue:

diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
index 9f6452aaa..de503c5dc 100644
--- a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
+++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
@@ -2877,7 +2877,7 @@
           "description": "The statistics of the database."
         },
         "isFollowed": {
-          "type": "string",
+          "type": "boolean",
           "readOnly": true,
           "description": "Indicates whether the database is followed."
         }
-- 

It seems that the real API returns a Boolean value, but the model indicates that it is a string.

Hi, I'm Dor for Kusto team.
@jrauschenbusch your fix should work. Do you need us to make the change or can you do it ?

I'll open an PR. The question would be, if this should also be applied to the API 2019-11-09, as the property was also already available there, but also of type string. I don't know if this was intended there, or if it's also a bug within the spec.

see https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2019-11-09/kusto.json#L2711

I also have to scan the Examples, if this property was used and also have to update it.

Some feedback would be really good.

Both versions need this fix. I've checked and we don't use this property in the examples.

PR is created. The rest is up to you now 馃槃

Sorry I mistakenly though you are a Microsoft employee, I will handle the PR.

Hey @docohe,

Sorry I mistakenly though you are a Microsoft employee

not yet ;-) alright, just ping back as soon as the fix is out.

Thanks

Hi @jrauschenbusch a new GO SDK version is now available.

Was this page helpful?
0 / 5 - 0 ratings