Fix apidoc generation

Addressing 'undefined method `expected_type' for nil:NilClass'
Merge pull request #2853 from iNecas/apipie-fix-params

Fix apidoc generation