# Why does SpringOpenApi3.0 still need io.swagger.models dependency?

**URL:** <https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235>\
**Category:** Swagger OS\
**Tags:** api, migrated, swagger-oss\
**Created:** [October 12, 2020, 2:18am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235 "2020-10-12T02:18:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 12, 2020, 2:18am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/1 "2020-10-12T02:18:51Z")

</div>

> Originally posted by **星小梦** on October 11, 2020

Project current dependencies

**io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.pom**

**io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.pom**

Use OpenApi3.0 annotations, do you still need

io/swagger/models/Swagger: Is the 1.5.X version of the dependency package?

In the Maven warehouse ([https://mvnrepository.com/artifact/io.swagger/swagger-models](https://mvnrepository.com/artifact/io.swagger/swagger-models)), you can see that it is migrated to the new warehouse location

**Note** : This artifact was moved to:

| |
| --- |
| [io.swagger.core.v3](https://mvnrepository.com/artifact/io.swagger.core.v3) » [swagger-models](https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-models) |

So, I want to ask **io\swagger\core\v3\swagger-models\2.1.2** Is the dependency package not the migration optimized version of **io.swagger:swagger-models: 1.6.2**? Why rely on the predecessor of models? swagger -annotation problem is the same

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 12, 2020, 2:25am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/2 "2020-10-12T02:25:34Z")

</div>

> Originally posted by **星小梦** on October 11, 2020

 ![星小梦_0-1602469463508.png](https://canada1.discourse-cdn.com/flex049/uploads/smartbear_prod/original/1X/bb0ac828f9c8a28e33be8b43fbc2d7ee4686258e.png)

So, why does the 2.1.5 version need to depend on the 1.6.2 version?

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 12, 2020, 2:28am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/3 "2020-10-12T02:28:20Z")

</div>

> Originally posted by **星小梦** on October 11, 2020

**This is my swagger related dependency**

```auto
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version> <exclusions> <exclusion> <artifactId>swagger-models</artifactId> <groupId>io.swagger</groupId> </exclusion> </exclusions></dependency><dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-common</artifactId> <version>3.0.0</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.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>3.0.0</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> </exclusion> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> </exclusion> </exclusions></dependency>

```

**Exception information**

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘openApiControllerWebMvc’ defined in URL [jar:file:/E:/Develop/Maven/Repository/io/springfox/springfox-oas/3.0.0/springfox-oas-3.0.0.jar!/springfox/documentation/oas/web/OpenApiControllerWebMvc.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jsonSerializer’ defined in springfox.documentation.spring.web.SpringfoxWebConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [springfox.documentation.spring.web.json.JsonSerializer]: Factory method ‘jsonSerializer’ threw exception; nested exception is java.lang.NoClassDefFoundError: io/swagger/models/Swagger  
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]  
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 12, 2020, 7:30am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/4 "2020-10-12T07:30:16Z")

</div>

> Originally posted by **星小梦** on October 12, 2020

Why is the annotation @Schema of swagger2.0 (OpenApi3.0 specification) added to the model data field, no description information is output, and it cannot be hidden, and other annotations have attributes that do not work? This is because swagger2.0 is not perfect? Currently in the testing and development stage?

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 31, 2020, 7:23am UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/5 "2020-10-31T07:23:46Z")

</div>

> Originally posted by **frantuma** on October 31, 2020

Your question seems to be related to an external project (springfox); please report this issue/question there

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 7, 2026, 5:13pm UTC](https://community.smartbear.com/t/why-does-springopenapi3-0-still-need-io-swagger-models-dependency/235/6 "2026-10-07T17:13:45Z")

</div>

Closed on October 7, 2026, 5:13pm UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
