mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: settings: remove required descriptor
This commit is contained in:
1 parent
48d79496d4
commit
b28fa5ca08
1 file changed
+12
-12
@@ -10,26 +10,26 @@ const defaultPath = process.env.CI ? '/tmp/file'
|
|||||||
const FileSetting = Schema.intersect([
|
const FileSetting = Schema.intersect([
|
||||||
Schema.object({
|
Schema.object({
|
||||||
type: Schema.union([
|
type: Schema.union([
|
||||||
Schema.const('file').description('local file provider').required(),
|
Schema.const('file').description('local file provider'),
|
||||||
Schema.const('s3').description('s3 provider').required(),
|
Schema.const('s3').description('s3 provider'),
|
||||||
] as const).description('provider type').default('file'),
|
] as const).description('provider type'),
|
||||||
endPointForUser: Schema.string().default('/fs/').required(),
|
endPointForUser: Schema.string().default('/fs/'),
|
||||||
endPointForJudge: Schema.string().default('/fs/').required(),
|
endPointForJudge: Schema.string().default('/fs/'),
|
||||||
}).description('setting_file'),
|
}).description('setting_file'),
|
||||||
Schema.union([
|
Schema.union([
|
||||||
Schema.object({
|
Schema.object({
|
||||||
type: Schema.const('file').required(),
|
type: Schema.const('file').required(),
|
||||||
path: Schema.string().default(defaultPath).description('Storage path').required(),
|
path: Schema.string().default(defaultPath).description('Storage path'),
|
||||||
secret: Schema.string().description('Download file sign secret').default(nanoid()),
|
secret: Schema.string().description('Download file sign secret').default(nanoid()),
|
||||||
}),
|
}),
|
||||||
Schema.object({
|
Schema.object({
|
||||||
type: Schema.const('s3').required(),
|
type: Schema.const('s3').required(),
|
||||||
endPoint: Schema.string().required(),
|
endPoint: Schema.string(),
|
||||||
accessKey: Schema.string().required().description('access key'),
|
accessKey: Schema.string().description('access key'),
|
||||||
secretKey: Schema.string().required().description('secret key').role('secret'),
|
secretKey: Schema.string().description('secret key').role('secret'),
|
||||||
bucket: Schema.string().default('hydro').required(),
|
bucket: Schema.string().default('hydro'),
|
||||||
region: Schema.string().default('us-east-1').required(),
|
region: Schema.string().default('us-east-1'),
|
||||||
pathStyle: Schema.boolean().default(true).required(),
|
pathStyle: Schema.boolean().default(true),
|
||||||
}),
|
}),
|
||||||
] as const),
|
] as const),
|
||||||
] as const).default({
|
] as const).default({
|
||||||
|
|||||||
Reference in new issue
Block a user