main.io.github.smiley4.ktorswaggerui.data.ExampleConfigData.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
/**
* Encoder to produce the final example value.
* Return the unmodified example to fall back to the default encoder.
*/
typealias ExampleEncoder = (type: TypeDescriptor?, example: Any?) -> Any?
class ExampleConfigData(
val sharedExamples: Map,
val securityExamples: List,
val exampleEncoder: ExampleEncoder?
) {
companion object {
val DEFAULT = ExampleConfigData(
sharedExamples = emptyMap(),
securityExamples = emptyList(),
exampleEncoder = null
)
}
}