Forum Discussion

PacificNW_Lover's avatar
New Member
5 years ago

Spring Fox (Swagger) 2.9.2's Autogenerated swagger-ui is Not Showing Interactive API

Using Spring Fox 2.9.2 with Spring Boot 2.1.5 RELEASE, I am not able to use the interactive UI generated by Swagger.


This is with the REST Endpoints not expanded:

This is with the REST Endpoint expanded (as you can see there's no text field to type the id inside):

Maven pom.xml:




package com.myservice.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

public class Swagger2Config {
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2).select()

    private ApiInfo apiEndPointsInfo() {
        return new ApiInfoBuilder().title("MyService API")
                                   .description("Buildings you measure.")
                                   .contact(new Contact(null, null, null))
                                   .license("Apache 2.0")

Also noticed is that I didn't need to use any Swagger specific annotations (e.g.@ApiOperation & @ApiResponse) inside the RestController (I did try putting them above getByUsingId(Integer id) method, and whereas my documentation was visible it still didn't have the id text field):



@RequestMapping(value = {"/{id}" }, method = RequestMethod.GET, produces = "APPLICATION/JSON")
public ResponseEntity<Object> getByUsingId(@PathVariable(value = "id", required = true) Integer id) 
throws IOException {
       MyResponse response = myDao.getById(id);
       if (response == null) {
           return new ResponseEntity<Object>(HttpStatus.NOT_FOUND);
       return new ResponseEntity<Object>(response, headers, HttpStatus.OK);

Comparing this to an old Spring Boot 1.5.6 RELEASE project, Spring Fox 2.6.1 has a much better UI and it is interactive (notice the better colors and the visible text field when expanded):



This look & feel (along with the interactive text fields) is exactly, what I want and need...




1. Is this a possible bug (the non-interactive text field) in Spring Fox 2.9.2?

2. Why is the swagger-ui looked dumbed down (the colors being different & not being so sharp looking, etc)?


Since, this forum stated "Message cannot exceed 20,000 characters.", I posted my question on Stack Overflow (SO):


The SO post contains the pom.xml,, code from my older Spring Boot project which works.

No RepliesBe the first to reply