I'm trying to build a swaggerUI for my API and I'd like to specify pathParameters for my POST method.
My code is setup as follows:
app.routes {
post("/cameras") { context -> postCamera(context) }
}
@OpenApi(
summary = "Create Camera",
operationId = "postCamera",
tags = ["Camera"],
formParams = [OpenApiFormParam("userId", String::class, true),
OpenApiFormParam("groupIds", List::class, true),
OpenApiFormParam("cameraName", String::class, true)],
responses = [
OpenApiResponse("200"),
OpenApiResponse("400"),
OpenApiResponse("409")
]
)
private fun postCamera(context: Context) {...}
I've been attempting to follow the information written here, but the end result is still the default swaggerUI POST method
What am I doing wrong?
Unfortunately for my sanity, the solution was to invalidate my cache in IntelliJ. There was no issue in my codebase.