com.ancientlightstudios.quarkus.kotlin.openapi.emitter.RestInterfaceUtils.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.emitter
import com.ancientlightstudios.quarkus.kotlin.openapi.models.kotlin.AnnotationAware
import com.ancientlightstudios.quarkus.kotlin.openapi.models.kotlin.KotlinAnnotation
import com.ancientlightstudios.quarkus.kotlin.openapi.models.kotlin.expression.StringExpression.Companion.stringExpression
import com.ancientlightstudios.quarkus.kotlin.openapi.models.transformed.name.ClassName.Companion.rawClassName
import com.ancientlightstudios.quarkus.kotlin.openapi.models.transformed.name.VariableName.Companion.variableName
fun AnnotationAware.addPathAnnotation(path: String) {
addAnnotation(
KotlinAnnotation(
"Path".rawClassName(), "value".variableName() to path.stringExpression()
)
)
}