main.io.github.smiley4.ktorswaggerui.data.PluginConfigData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktor-swagger-ui Show documentation
Show all versions of ktor-swagger-ui Show documentation
Ktor plugin to document routes and provide a Swagger-UI
package io.github.smiley4.ktorswaggerui.data
import io.github.smiley4.ktorswaggerui.dsl.config.PluginConfigDsl
import kotlin.reflect.KClass
/**
* Complete plugin configuration
*/
data class PluginConfigData(
val specAssigner: SpecAssigner,
val pathFilter: PathFilter,
val ignoredRouteSelectors: Set>,
val swagger: SwaggerUIData,
val info: InfoData,
val servers: List,
val externalDocs: ExternalDocsData,
val specConfigs: MutableMap,
val postBuild: PostBuild?,
val schemaConfig: SchemaConfigData,
val exampleConfig: ExampleConfigData,
val securityConfig: SecurityData,
val tagsConfig: TagsData
) {
companion object {
val DEFAULT = PluginConfigData(
specAssigner = { _, _ -> PluginConfigDsl.DEFAULT_SPEC_ID },
pathFilter = { _, _ -> true },
ignoredRouteSelectors = emptySet(),
swagger = SwaggerUIData.DEFAULT,
info = InfoData.DEFAULT,
servers = emptyList(),
externalDocs = ExternalDocsData.DEFAULT,
specConfigs = mutableMapOf(),
postBuild = null,
schemaConfig = SchemaConfigData.DEFAULT,
exampleConfig = ExampleConfigData.DEFAULT,
securityConfig = SecurityData.DEFAULT,
tagsConfig = TagsData.DEFAULT
)
}
}