问题描述
我正在尝试为我的 API 构建一个 swaggerUI,我想为我的 POST 方法指定 pathParameters。
我的代码设置如下:
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,OpenApiFormParam("cameraName",true)],responses = [
OpenApiResponse("200"),OpenApiResponse("400"),OpenApiResponse("409")
]
)
private fun postCamera(context: Context) {...}
我一直在尝试按照 here 中写的信息进行操作,但最终结果仍然是默认的 swaggerUI POST 方法
我做错了什么?
解决方法
不幸的是,对于我的理智,解决方案是使我在 IntelliJ 中的缓存无效。我的代码库中没有问题。