com.ancientlightstudios.quarkus.kotlin.openapi.parser.ApiVersion.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi.parser
import com.ancientlightstudios.quarkus.kotlin.openapi.utils.SpecIssue
enum class ApiVersion(private val value: String) {
V3_0("3.0."),
V3_1("3.1.");
companion object {
fun fromString(value: String) = values().firstOrNull { value.startsWith(it.value) }
?: SpecIssue("Unsupported OpenAPI version '$value'")
}
}