Refixed Swagger.php

reincluded the check for argument "serialize".