[api] allow to dynamically define the view classes used in response types

Fixes #48
Merge pull request #50 from jippi/feature/api-allow-dynamic-view-classes

[api] allow to dynamically define the view classes used in response types