Details
-
Bug
-
Status: Closed
-
Should
-
Resolution: Won't Fix
-
2.22.0
-
None
Description
I've been working with the webserivces.rest module for the past few days and I've been getting a lot of errors generated by the API docs screen about missing references within the swagger document. See screenshot taken from QA ref app
Upon further investigation there appears to be two causes to this:
- TaskActionResource1_8 is throwing a null pointer exception inside SwaggerSpecificationCreator.addPaths, causing SwaggerSpecificationCreator.BuildJSON to never call SwaggerSpecficationCreator.addDefaultDefinitions. This creates all the FetchAll errors and also a knock on to all future models not yet processed in the loop.
- There is a filter preventing the definition generation for all models not part of the webservices.rest package. This deserves a separate issue which I'll create shortly.
I have successfully reproduced the error with a debugger connected and all error caused by 1 are eliminated by a simple fix. A test has been created to ensure none of the core methods throw an exception, but I'm now wondering if it would be beneficial to fix how the exceptions are dealt with to provide some useful feedback to module developers.