mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 21:03:09 +02:00
Refactor
This commit is contained in:
parent
563d604812
commit
e6e7cecdb6
1 changed files with 4 additions and 4 deletions
|
@ -96,10 +96,10 @@ export function genOpenapiSpec(lang = 'ja-JP') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endpoint.meta.params) {
|
if (endpoint.meta.params) {
|
||||||
for (const kv of Object.entries(endpoint.meta.params)) {
|
for (const [k, v] of Object.entries(endpoint.meta.params)) {
|
||||||
if (kv[1].desc) (kv[1].validator as any).desc = kv[1].desc[lang];
|
if (v.desc) (v.validator as any).desc = v.desc[lang];
|
||||||
if (kv[1].default) (kv[1].validator as any).default = kv[1].default;
|
if (v.default) (v.validator as any).default = v.default;
|
||||||
porops[kv[0]] = kv[1].validator;
|
porops[k] = v.validator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue