mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-26 17:00:19 +01:00
fix(docs): correct information for drive upload (#8736)
This commit is contained in:
parent
3dae18b93c
commit
63a814c70e
1 changed files with 14 additions and 2 deletions
|
@ -59,6 +59,18 @@ export function genOpenapiSpec(lang = 'ja-JP') {
|
||||||
desc += ` / **Permission**: *${kind}*`;
|
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 = {
|
const info = {
|
||||||
operationId: endpoint.name,
|
operationId: endpoint.name,
|
||||||
summary: endpoint.name,
|
summary: endpoint.name,
|
||||||
|
@ -78,8 +90,8 @@ export function genOpenapiSpec(lang = 'ja-JP') {
|
||||||
requestBody: {
|
requestBody: {
|
||||||
required: true,
|
required: true,
|
||||||
content: {
|
content: {
|
||||||
'application/json': {
|
[requestType]: {
|
||||||
schema: endpoint.params,
|
schema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue