2

I have Swagger library in Spring Boot project and I added it using the following dependency:

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.7.0</version>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.7.0</version>
    </dependency>

Currently Swagger UI looks like on screenshot below: enter image description here On the Swagger's site I see a bit another design and it looks better: enter image description here

How can I add same design to my project? Thanks!

boden
  • 1,621
  • 1
  • 21
  • 42
  • 1
    Possible duplicate of [How can I modify swagger-ui.html for springfox?](https://stackoverflow.com/questions/36165448/how-can-i-modify-swagger-ui-html-for-springfox) and [Spring Boot + Swagger + custom swagger-ui.html](https://stackoverflow.com/questions/39976369/spring-boot-swagger-custom-swagger-ui-html) – Helen Mar 08 '18 at 20:05
  • 1
    It should have the new design if you upgrade to 2.8.0 for both the libraries – Dilip Krishnan Mar 10 '18 at 14:09
  • 2
    @BohdanKorinnyi Its the same url. You may need to refresh your browser cache – Dilip Krishnan Mar 11 '18 at 20:12

1 Answers1

2

In order to get the new Swagger design just need to change dependency version from 2.7.0 to 2.8.0 or upper

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>2.8.0</version>
</dependency>
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.8.0</version>
</dependency>

Refresh your browser cache with Ctrl-F5 to be sure you have picked up the changes.

opticyclic
  • 7,412
  • 12
  • 81
  • 155
boden
  • 1,621
  • 1
  • 21
  • 42