OpenAPI Specification does not match response

I tried opening a bug for this on github but the bot closed the issue and redirected me here. So, here’s my bug report. Also, if someone can provide some guidance on how the merged.json is generated and how to update the OpenAPI scheme to reflect the correct response, I’d be happy to do so.

I’m attempting to rely on the OpenAPI Spec grafana/api-merged.json at main · grafana/grafana · GitHub to generate the client and boiler plate.

This is related to the /api/users endpoint.

The spec is documented where the response should look as follows:

  "page": 0,
  "perPage": 0,
  "totalCount": 0,
  "users": [
      "authLabels": [
      "avatarUrl": "string",
      "email": "string",
      "id": 0,
      "isAdmin": true,
      "isDisabled": true,
      "lastSeenAt": "2023-03-22T13:11:34.263Z",
      "lastSeenAtAge": "string",
      "login": "string",
      "name": "string"

Actual Response is:

    "id": 1,
    "name": "",
    "login": "admin",
    "email": "admin@localhost",
    "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
    "isAdmin": true,
    "isDisabled": false,
    "lastSeenAt": "2023-03-22T05:20:37Z",
    "lastSeenAtAge": "< 1 minute",
    "authLabels": []
    "id": 2,
    "name": "samir",
    "login": "samir",
    "email": "",
    "avatarUrl": "/avatar/b0af9e9c1c0acf1dc93d4dc9d6bcafb1",
    "isAdmin": false,
    "isDisabled": false,
    "lastSeenAt": "2013-03-22T03:27:45Z",
    "lastSeenAtAge": "10 years",
    "authLabels": []

The Spec definition to match the response returned.

to reproduce it (as minimally and precisely as possible):

curl -X GET -H 'authorization: Basic YWRtaW46YWRtaW4=' ""


Grafana version:

"commit": "cf0a135595",
"version": "9.4.3"