Fixes for models / schemas

Changes:

1. Fixed isListType to handle data types like mytype[] instead of assuming that square brackets implied List[mytype]

2. Set models on resources when accessing specific APIs e.g. "http://host/app/api-docs/myapi" rather than "http://host/app/api-docs".