fix for https://github.com/swagger-api/swagger-ui/issues/770, checking method instead of type