Add models from relations

/to @bajtos 
/cc @STRML

The PR adds related models into the Swagger spec so that REST operations for relations are correctly typed.
There are a few reasons:
- The generation of swagger models only has dependency on model classes (not the SharedClass). 
- The relations only have pointers to model classes instead of SharedClass. For the recursive call, we cannot find the corresponding SharedClass for the related models (some of them are not even shared directly by themselves).