Swagger-ui throws the error "TypeError: property is undefined" when rendering the file swagger.json

2

Swagger throws the error TypeError: property is undefined by the Javascript console when trying to render the "swagger.json" file generated by the swagger-core module that I have integrated into the API that I am developing with Jersey (Java).

Apparently this error has to do with the following method:

public ArrayList<ProductoStock> generarEntradaStock(EntradaRecurso entrada)

If I modify the header of this method so that, for example, I return a ArrayList<Integer> , swagger-ui correctly generates the documentation.

For the development of this application I am using swagger-core 1.5, specifically the library io.swagger:swagger-jersey-jaxrs:1.5.0 for Jersey (Java), which correctly generates the file "swagger.json", and the latest version of swagger-ui ( 2.1.3).

    
asked by hecnabae 17.12.2015 в 12:41
source

1 answer

1

Apparently, version 1.5.0 of swagger-core has some problems to process arrays. So updating the library to version 1.5.4 solve the problems: io.swagger:swagger-jersey-jaxrs:1.5.0

    
answered by 18.12.2015 / 09:25
source