如题出现了这样的错误。怎么解决?网上一大堆。可是并没有解决。找了半天还是这样的错误。
解决方式分为两种:
- 补全example的值(太繁琐了)
- 将当前使用的swagger-models 的版本降为1.5.21
基本就使用第二种解决方式。但是,很多情况。我更换了版本依然出现如此错误。现在贴出来,我解决了的依赖
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>