From ffedac7272140ff139fe0e9d878ac0e74e58730a Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 21 Jul 2025 14:26:14 +0800 Subject: [PATCH] openapi settings --- komga/docs/openapi.json | 31 ++++++++++--------- .../interfaces/api/rest/dto/SettingsDto.kt | 12 +++---- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/komga/docs/openapi.json b/komga/docs/openapi.json index c0f272b3..19a86ae6 100644 --- a/komga/docs/openapi.json +++ b/komga/docs/openapi.json @@ -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", diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SettingsDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SettingsDto.kt index cbd7a31f..1da5f8c0 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SettingsDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SettingsDto.kt @@ -6,15 +6,15 @@ data class SettingsDto( val rememberMeDurationDays: Long, val thumbnailSize: ThumbnailSizeDto, val taskPoolSize: Int, - val serverPort: SettingMultiSource, - val serverContextPath: SettingMultiSource, + val serverPort: SettingMultiSource, + val serverContextPath: SettingMultiSource, val koboProxy: Boolean, val koboPort: Int?, - val kepubifyPath: SettingMultiSource, + val kepubifyPath: SettingMultiSource, ) data class SettingMultiSource( - val configurationSource: T, - val databaseSource: T, - val effectiveValue: T, + val configurationSource: T?, + val databaseSource: T?, + val effectiveValue: T?, )