|
|
有胆有识的泡面 · mySQL中怎么将dmp文件导入数据库开发者社区· 1 周前 · |
|
|
苦恼的白开水 · 又一个游戏破解组织PLAZA宣布解散!曾参与 ...· 3 月前 · |
|
|
寂寞的茶叶 · 王玉雯肖战在一起过吗 - 百度· 1 年前 · |
|
|
低调的绿茶 · 关于启动2023年度“博士后创新人才支持计划 ...· 1 年前 · |
|
|
热心肠的茶叶 · 天降女子这个接档甜蜜惩罚的番大家看了吗? - 知乎· 1 年前 · |
|
|
苦闷的蚂蚁 · 90度|一周车圈话:蓝瘦香菇什么梗?-手机新浪汽车· 1 年前 · |
我试图在我的springdoc swagger文档中添加示例响应值。
比如用“马克吐温”代替“字符串”等等。
我试过使用这个解决方案- springdoc-openapi: How to add example of POST request?
我已经在课堂上使用
org.springframework.web.bind.annotation.RequestBody
了。
如果我用这个-
@io.swagger.v3.oas.annotations.parameters.RequestBody(content =@Content(示例={ @ExampleObject( name = "Person sample",汇总= "person示例“,value =”[email protected]“,”+ ""firstName":"josh",“+ ""lastName":”spring……“+ "}") })
我没那么过分-
no viable alternative at input ',@io.swagger.v3.oas.annotations.parameters.RequestBody(content=@Content(examples={@ExampleObject(name="Person sample",summary="person example",value="{\"email\": [email protected],"+"\"firstName\": \"josh\","+"\"lastName\": \"spring...\""+"}")})))': NoViableAltException
有人能给我一个解决办法吗?
发布于 2022-03-31 12:33:21
这对我来说很管用
@Schema( type = "string", example = "Clark Kent")
private String name;
https://stackoverflow.com/questions/71661223
复制相似问题
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2023 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号: 粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
|
|
有胆有识的泡面 · mySQL中怎么将dmp文件导入数据库开发者社区 1 周前 |
|
|
寂寞的茶叶 · 王玉雯肖战在一起过吗 - 百度 1 年前 |
|
|
热心肠的茶叶 · 天降女子这个接档甜蜜惩罚的番大家看了吗? - 知乎 1 年前 |
|
|
苦闷的蚂蚁 · 90度|一周车圈话:蓝瘦香菇什么梗?-手机新浪汽车 1 年前 |