Open srijithchandran opened 4 years ago
were you able to convert swagger 2.0 to OpenApi 3.0
If anyone else is having the issue, Remove the older dependencies. For example, If you have Swagger2.0 Parser in your dependencies, you will get this issue. Remove them and it will work fine
I get same error for attached application. I can't find any older dependency. sample.zip
I get same error for attached application.
it is like @Madhan1106 says. If you have other dependencies than swagger-annotations you have to remove them to make it work.
I had to remove springfox dependency.
My actual dependencies for the opens-api-documentation are the following:
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
<version>1.6.14</version>
</dependency>
i am using this dependency with spring boot 3.x version, in one of my micro-services it is working fine but in other i am getting 400 error
try to add the compatibility dependency (if you cannot remove swagger 2.0 parser )
<artifactId>swagger-compat-spec-parser</artifactId>
For me it solved the issue . Be careful which version you choose as it varies alot with errors if you have unaligned ones (not the same, but compatible)
我遇到了同样的问题,这里的问题其实很简单,你的 parser 中的swagger-models 版本需要和 swagger-core 中的一致,但是swagger-ui 和 swagger-annotation等注解中包含了swagger-models,你需要将他们排除。 当时我排除了这些之后,还是报错,后来更换了swagger-annotations的版本就好了,换成和swagger-core下面swagger-models一致的版本。
Im trying convert swagger 2.0 (json) petstore spec into 3.0. Im getting below exception while called SwaggerConverter readContents method.
dependencies are