question

Scott Brooks avatar image
Scott Brooks asked

Swagger Admin API GetUserDataResult mismatch.

I was attempting to call /Admin/GetUserInternalData, but based off the swagger generated library I was unable to get the results.

The swagger definition seemed to be skipping the "keys"

This is the result I was getting.

{"code":200,"status":"OK","data":{"PlayFabId":"ARealPFID","DataVersion":5,"Data":{"roles":{"Value":"csr","LastUpdated":"2020-06-03T20:40:26.416Z","Permission":"Private"}}}}

Which appears to match the C# sdk:

https://github.com/PlayFab/CSharpSDK/blob/master/PlayFabSDK/source/PlayFabAdminModels.cs#L3307

According to the swagger though, it's missing the dictionary of keys to UserDataRecords

Here is my diff for the fix.

diff --git a/pkg/swagger/Admin.swagger.json b/pkg/swagger/Admin.swagger.json
index 8450caf..2696540 100644
--- a/pkg/swagger/Admin.swagger.json
+++ b/pkg/swagger/Admin.swagger.json
@@ -8966,10 +8966,12 @@
       "type": "object",
       "properties": {
         "Data": {
-          "$ref": "#/definitions/UserDataRecord",
           "description": "User specific data for this title.",
           "type": "object",
-          "x-isclass": true
+          "x-isclass": true,
+          "additionalProperties": {
+            "$ref": "#/definitions/UserDataRecord"
+          }
         },
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Thanks for sharing your insight with our community!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.