springboot中集成swagger3.0的问题
springboot吧
全部回复
仅看楼主
level 2
shanxm520 楼主
springboot中集成了swagger3.0,按照网上的配置,添加了swagger的依赖,启动类中加了@EnableOpenApi,接口类型也改成了DocumentationType.OAS_30,但是现在启动项目后,访问接口文档,显示以下错误,想问下是什么问题?
Unable to render this definition
The provided definition does not specify a valid version field.
Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).
我在网上也查找了资料,有说类名重复的,有说controller中加HttpPost,等等,但是都未能解决。有没有人有遇到过这个问题的?
2021年08月11日 04点08分 1
level 2
shanxm520 楼主
有遇到这个问题的么? 急,在线等。。。。
2021年08月16日 04点08分 2
level 5
要不换成2.0,不知道是不是版本不支持3.0
2021年09月02日 07点09分 3
level 1
楼主解决了没有,我也遇到了
2021年09月22日 08点09分 4
1