Is your feature request related to a problem? Please describe.
Inconvenience when generating from openapi.json because we have a single request that needs some input for a delete. Seeing as the spec allows a body, shouldnt kompendium too?
Describe the solution you'd like
package io.bkbn.kompendium.core.metadata
import com.sun.beans.introspect.PropertyInfo.Name.description
import io.bkbn.kompendium.oas.common.ExternalDocumentation
import io.bkbn.kompendium.oas.payload.Parameter
import jdk.internal.net.http.common.Log.errors
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle.summary
class DeleteInfo private constructor(
override val request: RequestInfo?,
override val response: ResponseInfo,
override val errors: MutableList<ResponseInfo>,
override val tags: Set<String>,
override val summary: String,
override val description: String,
override val externalDocumentation: ExternalDocumentation?,
override val security: Map<String, List<String>>?,
override val operationId: String?,
override val deprecated: Boolean,
override val parameters: List<Parameter>
) : MethodInfoWithRequest {
companion object {
fun builder(init: Builder.() -> Unit): DeleteInfo {
val builder = Builder()
builder.init()
return builder.build()
}
}
class Builder : MethodInfoWithRequest.Builder<DeleteInfo>() {
override fun build() = DeleteInfo(
request = request,
response = response ?: error("Response info must be present"),
errors = errors,
tags = tags,
summary = summary ?: error("Summary must be present"),
description = description ?: error("Description must be present"),
externalDocumentation = externalDocumentation,
operationId = operationId,
deprecated = deprecated,
parameters = parameters,
security = security
)
}
}
Describe alternatives you've considered
Writing the data class ourselves, after generation of everything else.
Additional context
None
Is your feature request related to a problem? Please describe.
Inconvenience when generating from openapi.json because we have a single request that needs some input for a delete. Seeing as the spec allows a body, shouldnt kompendium too?
Describe the solution you'd like
Describe alternatives you've considered
Writing the data class ourselves, after generation of everything else.
Additional context
None