discord/discord-api-spec

`update_my_user` payload is an x-discord-union of 1 type

Closed this issue · 2 comments

The update_my_user endpoint accepts an x-discord-union of a single type. Wouldnt it be better typed as just referencing the inner type instead?

"operationId": "update_my_user",
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/BotAccountPatchRequestPartial"
}
],
"x-discord-union": "oneOf"
}
}
},
"required": true
},

Proposed:

        "operationId": "update_my_user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotAccountPatchRequestPartial"
              }
            }
          },
          "required": true
        },

I agree, it's on the backlog

should be fixed