com.ancientlightstudios.quarkus.kotlin.openapi.inspection.RequestInspection.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.inspection
import com.ancientlightstudios.quarkus.kotlin.openapi.models.transformable.TransformableRequest
class RequestInspection(val request: TransformableRequest) {
fun parameters(block: ParameterInspection.() -> Unit) =
request.parameters.forEach { ParameterInspection(it).block() }
fun body(block: BodyInspection.() -> Unit) = request.body?.let { BodyInspection(it).block() }
fun responses(block: ResponseInspection.() -> Unit) = request.responses.forEach { ResponseInspection(it).block() }
}