Skip to content

Commit 52d6c99

Browse files
committed
build(update-endpoints): file parameter is no data for .repos.uploadReleaseAsset()
1 parent e3f31b8 commit 52d6c99

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

scripts/update-endpoints/types.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,17 @@ Most libraries will set the required \`Content-Length\` header automatically. Us
559559
560560
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.`,
561561
params: {
562-
file: {
562+
data: {
563563
mapTo: "data",
564564
required: true,
565565
type: "string | object"
566566
},
567+
file: {
568+
mapTo: "data",
569+
deprecated: true,
570+
type: "string | object",
571+
alias: "data"
572+
},
567573
headers: {
568574
required: true,
569575
type: "object"

scripts/update-endpoints/workarounds.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,18 @@ module.exports = [
323323
headers: [],
324324
parameters: [
325325
{
326-
name: "file",
326+
name: "data",
327327
in: "BODY",
328328
mapToData: true,
329329
required: true,
330330
type: "string | object"
331331
},
332+
{
333+
name: "file",
334+
in: "BODY",
335+
alias: "data",
336+
deprecated: true
337+
},
332338
{
333339
name: "headers",
334340
in: "BODY",

0 commit comments

Comments
 (0)