diff options
Diffstat (limited to 'server/core/src/main/kotlin/moe')
-rw-r--r-- | server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt | 4 | ||||
-rw-r--r-- | server/core/src/main/kotlin/moe/nea/ledger/server/core/api/BaseApi.kt | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt b/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt index f00f26d..0f13606 100644 --- a/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt +++ b/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt @@ -14,6 +14,7 @@ import moe.nea.ledger.server.core.api.Documentation import moe.nea.ledger.server.core.api.Info import moe.nea.ledger.server.core.api.apiRouting import moe.nea.ledger.server.core.api.openApiDocsJson +import moe.nea.ledger.server.core.api.openApiUi import java.io.File fun main(args: Array<String>) { @@ -46,6 +47,9 @@ fun Application.module() { route("/api.json") { openApiDocsJson() } + route("/openapi") { + openApiUi("/api.json") + } } } diff --git a/server/core/src/main/kotlin/moe/nea/ledger/server/core/api/BaseApi.kt b/server/core/src/main/kotlin/moe/nea/ledger/server/core/api/BaseApi.kt index ad05118..d407f0b 100644 --- a/server/core/src/main/kotlin/moe/nea/ledger/server/core/api/BaseApi.kt +++ b/server/core/src/main/kotlin/moe/nea/ledger/server/core/api/BaseApi.kt @@ -21,8 +21,21 @@ fun Route.apiRouting(database: Database) { } call.respond(profiles) }.docs { + summary = "List all profiles and players known to ledger" + operationId = "listProfiles" + tag(Tags.PROFILE) respondsOk { schema<List<Profile>>() } } } + +enum class Tags : IntoTag { + PROFILE, + MANAGEMENT, + ; + + override fun intoTag(): String { + return name + } +}
\ No newline at end of file |