From 463e4ff33f8f2f498d9b8092a22ce03359e9199e Mon Sep 17 00:00:00 2001 From: Gregor Martynus Date: Fri, 31 Jan 2020 13:16:30 -0800 Subject: [PATCH] build: `file` parameter is no `data` for `.repos.uploadReleaseAsset()` --- scripts/update-endpoints/typescript.js | 8 +++++++- scripts/update-endpoints/workarounds.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/update-endpoints/typescript.js b/scripts/update-endpoints/typescript.js index 9e04b171..56c83ded 100644 --- a/scripts/update-endpoints/typescript.js +++ b/scripts/update-endpoints/typescript.js @@ -501,11 +501,17 @@ Most libraries will set the required \`Content-Length\` header automatically. Us GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset.`, params: { - file: { + data: { mapTo: "data", required: true, type: "string | object" }, + file: { + mapTo: "data", + deprecated: true, + type: "string | object", + alias: "data" + }, headers: { required: true, type: "object" diff --git a/scripts/update-endpoints/workarounds.js b/scripts/update-endpoints/workarounds.js index e3011dc0..1af66f64 100644 --- a/scripts/update-endpoints/workarounds.js +++ b/scripts/update-endpoints/workarounds.js @@ -323,12 +323,18 @@ module.exports = [ headers: [], parameters: [ { - name: "file", + name: "data", in: "BODY", mapToData: true, required: true, type: "string | object" }, + { + name: "file", + in: "BODY", + alias: "data", + deprecated: true + }, { name: "headers", in: "BODY",