Update swagger.py

This needs checking.  Make sure you have a test suite written with some test data