The problem is described here.
https://groups.google.com/forum/#!topic/swagger-swaggersocket/v_VTJgMm3PM
I'll attach a PR with a proposed solution which caches classes at the Reader instance.
Alternatively, a slightly more complex solution would be to create a private read method that looks like the current recursively invoked read method but with an extra argument of a map that can be used to detect the self-referencing loop during its recursive calls. The original read method can call this private read method with an empty map object.
Which one to take depends on how the reader is used and how its expected behavior should be.
And I would like to ask for your feedback.
regards, aki