mirror of
https://github.com/gotson/komga.git
synced 2026-02-13 10:53:55 +01:00
build: cleanup openapi reference generation
This commit is contained in:
parent
c1fb307f9a
commit
77c1069200
3 changed files with 13 additions and 13 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import nu.studer.gradle.jooq.JooqGenerate
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.flywaydb.gradle.task.FlywayMigrateTask
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Bean
|
|||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
class SwaggerConfiguration {
|
||||
class OpenApiConfiguration {
|
||||
@Bean
|
||||
fun openApi(): OpenAPI =
|
||||
OpenAPI()
|
||||
|
|
@ -20,9 +20,7 @@ class SwaggerConfiguration {
|
|||
.version("v1.0")
|
||||
.description(
|
||||
"""
|
||||
Komga offers 2 APIs: REST and OPDS.
|
||||
|
||||
Both APIs are secured using HTTP Basic Authentication.
|
||||
Komga RESTful API.
|
||||
""".trimIndent(),
|
||||
).license(License().name("MIT").url("https://github.com/gotson/komga/blob/master/LICENSE")),
|
||||
).externalDocs(
|
||||
|
|
@ -33,7 +31,15 @@ class SwaggerConfiguration {
|
|||
Components()
|
||||
.addSecuritySchemes(
|
||||
"basicAuth",
|
||||
SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("basic"),
|
||||
SecurityScheme()
|
||||
.type(SecurityScheme.Type.HTTP)
|
||||
.scheme("basic"),
|
||||
).addSecuritySchemes(
|
||||
"apiKey",
|
||||
SecurityScheme()
|
||||
.type(SecurityScheme.Type.APIKEY)
|
||||
.`in`(SecurityScheme.In.HEADER)
|
||||
.name("X-API-Key"),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
@ -93,14 +93,9 @@ management:
|
|||
enabled: true
|
||||
step: 24h
|
||||
springdoc:
|
||||
group-configs:
|
||||
- group: REST API
|
||||
paths-to-match: /api/**
|
||||
- group: OPDS v1
|
||||
paths-to-match: /opds/v1.2/**
|
||||
- group: OPDS v2
|
||||
paths-to-match: /opds/v2/**
|
||||
swagger-ui:
|
||||
groups-order: desc
|
||||
operations-sorter: alpha
|
||||
disable-swagger-default-url: true
|
||||
tags-sorter: alpha
|
||||
paths-to-match: "/api/**"
|
||||
|
|
|
|||
Loading…
Reference in a new issue