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.
I see. 

The cleanest solution would be have a wrapper function accepting `SharedClass` and delegating to an inner function accepting `ModelCtor`.

If you don't like that, then at least rename `aClass` to something more accurate, e.g. `classCtor`.