Skip to content
Snippets Groups Projects
Unverified Commit 63a814c7 authored by Johann150's avatar Johann150 Committed by GitHub
Browse files

fix(docs): correct information for drive upload (#8736)

parent 3dae18b9
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,18 @@ export function genOpenapiSpec(lang = 'ja-JP') {
desc += ` / **Permission**: *${kind}*`;
}
const requestType = endpoint.meta.requireFile ? 'multipart/form-data' : 'application/json';
const schema = endpoint.params;
if (endpoint.meta.requireFile) {
schema.properties.file = {
type: 'string',
format: 'binary',
description: 'The file contents.',
};
schema.required.push('file');
}
const info = {
operationId: endpoint.name,
summary: endpoint.name,
......@@ -78,8 +90,8 @@ export function genOpenapiSpec(lang = 'ja-JP') {
requestBody: {
required: true,
content: {
'application/json': {
schema: endpoint.params,
[requestType]: {
schema,
},
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment