Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Possible mismatch in PATCH /mock/entitlements/drops response #252

Closed
frifugio opened this issue Jul 13, 2023 · 0 comments · Fixed by #256
Closed

[Bug] Possible mismatch in PATCH /mock/entitlements/drops response #252

frifugio opened this issue Jul 13, 2023 · 0 comments · Fixed by #256

Comments

@frifugio
Copy link
Contributor

frifugio commented Jul 13, 2023

What is the problem?

I have encountered a strange situation while using mock-api server in order to test Drops.
In particular I noticed a mismatch between the response in the official documentation: https://dev.twitch.tv/docs/api/reference/#update-drops-entitlements and the response I'm getting from the mock server. Below you can see both:

Official documentation

{
  "data": [
    {
      "status": "SUCCESS",
      "ids": [
        "fb78259e-fb81-4d1b-8333-34a06ffc24c0", "862750a5-265e-4ab6-9f0a-c64df3d54dd0"
      ]
    },
    {
      "status": "UNAUTHORIZED",
      "ids": [
        "d8879baa-3966-4d10-8856-15fdd62cce02"
      ]
    },
    {
      "status": "UPDATE_FAILED",
      "ids": [
        "9a290126-7e3b-4f66-a9ae-551537893b65"
      ]
    }
  ]
}

Mock API

[
  {
    "status": "SUCCESS",
    "ids": [
      "bedd1eff-dd39-b5a5-3a5e-945eaa6bea22"
    ]
  }
]

You can notice that in the mock-api there is no "data" property.

Since I don't know which is the real response, and so if the source of truth is the documentation or the mock-api response, I'm not sure this is a proper bug.
In case this is actually a bug, I already have a fix ready for a new PR, but before submitting it I preferred to discuss if it is needed.

Thank you.

Operating System

linux, macOS, windows

Architecture Version (x86, x64, arm, etc)

x86, x64, arm

Steps to reproduce

  1. Start the mock server
  2. Call the endpoint: PATCH /mock/entitlements/drops and check the response, which is different from the one in the official documentation

Relevant log output

No response

@lleadbet lleadbet mentioned this issue Jul 22, 2023
4 tasks
@Xemdo Xemdo linked a pull request Jul 22, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant