openapi settings

This commit is contained in:
Gauthier Roebroeck 2025-07-21 14:26:14 +08:00
parent c77affe24e
commit ffedac7272
2 changed files with 23 additions and 20 deletions

View file

@ -15,8 +15,21 @@
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Generated server url"
"url": "https://demo.komga.org",
"description": "Demo server"
},
{
"url": "http://localhost:{port}",
"description": "Local development server",
"variables": {
"port": {
"default": "25600",
"enum": [
"8080",
"25600"
]
}
}
}
],
"security": [
@ -13074,12 +13087,7 @@
"type": "integer",
"format": "int32"
}
},
"required": [
"configurationSource",
"databaseSource",
"effectiveValue"
]
}
},
"SettingMultiSourceString": {
"type": "object",
@ -13093,12 +13101,7 @@
"effectiveValue": {
"type": "string"
}
},
"required": [
"configurationSource",
"databaseSource",
"effectiveValue"
]
}
},
"SettingsDto": {
"type": "object",

View file

@ -6,15 +6,15 @@ data class SettingsDto(
val rememberMeDurationDays: Long,
val thumbnailSize: ThumbnailSizeDto,
val taskPoolSize: Int,
val serverPort: SettingMultiSource<Int?>,
val serverContextPath: SettingMultiSource<String?>,
val serverPort: SettingMultiSource<Int>,
val serverContextPath: SettingMultiSource<String>,
val koboProxy: Boolean,
val koboPort: Int?,
val kepubifyPath: SettingMultiSource<String?>,
val kepubifyPath: SettingMultiSource<String>,
)
data class SettingMultiSource<T>(
val configurationSource: T,
val databaseSource: T,
val effectiveValue: T,
val configurationSource: T?,
val databaseSource: T?,
val effectiveValue: T?,
)