fix for https://github.com/wordnik/swagger-ui/issues/644, verify path object by type