Skip to content

Unable to generate document with swagger UI - error Uncaught TypeError: Cannot read property 'toLowerCase' of undefined #1908

Closed
@ReenaRobinson

Description

@ReenaRobinson

Using swagger-ui version 2.1.4 and io.swagger version 1.5.6, we are trying to generate the swagger doc for the following REST API:

  @PUT 
  @ApiResponses( value =
  {
     @ApiResponse( code = 200, message = "OK" ),
     @ApiResponse( code = 400, message = "Bad request" ),
    } )
  public Response activateServer( @QueryParam( "enabled" )
  Boolean status ) throws BadRequestException;

While invoking the swagger ui index.html page, the following error is shown in the browser console. "Uncaught TypeError: Cannot read property 'toLowerCase' of undefined"
We are using chrome browser version 47.0.2526.111 m.

We also noticed that this error does not occur for QueryParam data types like string or integer. However, here we require a boolean data type and hence, we are unable to generate the document.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions