com.ancientlightstudios.quarkus.kotlin.openapi.models.transformable.RequestMethod.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.models.transformable
import com.ancientlightstudios.quarkus.kotlin.openapi.utils.SpecIssue
enum class RequestMethod(val value: String) {
Get("get"),
Put("put"),
Post("post"),
Delete("delete"),
Options("options"),
Head("head"),
Patch("patch"),
Trace("trace");
companion object {
fun fromString(value: String) = values().firstOrNull { it.value == value.lowercase() }
?: SpecIssue("Unknown request method '$value'")
}
}