summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api')
-rw-r--r--src/server/api/endpoints/drive/files.ts2
-rw-r--r--src/server/api/endpoints/drive/stream.ts2
-rw-r--r--src/server/api/index.ts2
-rw-r--r--src/server/api/openapi/schemas.ts2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts
index 493e14464c..d10c2a3ef4 100644
--- a/src/server/api/endpoints/drive/files.ts
+++ b/src/server/api/endpoints/drive/files.ts
@@ -37,7 +37,7 @@ export const meta = {
},
type: {
- validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/)
+ validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/)
}
},
diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts
index db17979a4b..f75c4273c3 100644
--- a/src/server/api/endpoints/drive/stream.ts
+++ b/src/server/api/endpoints/drive/stream.ts
@@ -27,7 +27,7 @@ export const meta = {
},
type: {
- validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/)
+ validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/)
}
},
diff --git a/src/server/api/index.ts b/src/server/api/index.ts
index 8c2b97775f..49500b2b4a 100644
--- a/src/server/api/index.ts
+++ b/src/server/api/index.ts
@@ -52,7 +52,7 @@ for (const endpoint of endpoints) {
} else {
if (endpoint.name.includes('-')) {
// 後方互換性のため
- router.post(`/${endpoint.name.replace(/\-/g, '_')}`, handler.bind(null, endpoint));
+ router.post(`/${endpoint.name.replace(/-/g, '_')}`, handler.bind(null, endpoint));
}
router.post(`/${endpoint.name}`, handler.bind(null, endpoint));
}
diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts
index 229d10af2a..628bba511f 100644
--- a/src/server/api/openapi/schemas.ts
+++ b/src/server/api/openapi/schemas.ts
@@ -18,7 +18,7 @@ export function convertSchemaToOpenApiSchema(schema: Schema) {
const res: any = schema;
if (schema.type === 'object' && schema.properties) {
- res.required = Object.entries(schema.properties).filter(([k, v]) => v.optional !== true).map(([k]) => k);
+ res.required = Object.entries(schema.properties).filter(([k, v]) => !v.optional).map(([k]) => k);
for (const k of Object.keys(schema.properties)) {
res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]);