Swagger throws the error TypeError: property is undefined
through the Javascript console when it tries 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).
It seems that this error has to do with the following method:
public ArrayList<ProductoStock> generarEntradaStock(EntradaRecurso entrada)
If I modify the header of that method so that, for example, it returns 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 "swagger.json" file, and the latest version of swagger-ui (2.1.3).
Apparently version 1.5.0 of swagger-core has some problems processing arrays. So updating the library to version 1.5.4 solves the problems:
io.swagger:swagger-jersey-jaxrs:1.5.0