prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Show return model of sponsor types list in Swagger spec
  Currently no return model (or schema) is shown for the GET API to get sponsor types used in a Event
  
  ![sponsor_type_old](https://cloud.githubusercontent.com/assets/4047597/16110108/be118070-33c9-11e6-8532-ce104c5a57d3.png)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `open_event/api/sponsors.py`
  Content:
  ```
  1 from flask.ext.restplus import Resource, Namespace
  2 
  3 from open_event.models.sponsor import Sponsor as SponsorModel
  4 
  5 from .helpers.helpers import get_paginated_list, requires_auth, get_object_in_event
  6 from .helpers.utils import PAGINATED_MODEL, PaginatedResourceBase, ServiceDAO, \
  7     PAGE_PARAMS, POST_RESPONSES, PUT_RESPONSES
  8 from .helpers import custom_fields as fields
  9 
  10 api = Namespace('sponsors', description='Sponsors', path='/')
  11 
  12 SPONSOR = api.model('Sponsor', {
  13     'id': fields.Integer(required=True),
  14     'name': fields.String(),
  15     'url': fields.Uri(),
  16     'logo': fields.ImageUri(),
  17     'description': fields.String(),
  18     'level': fields.String(),
  19     'sponsor_type': fields.String(),
  20 })
  21 
  22 SPONSOR_PAGINATED = api.clone('SponsorPaginated', PAGINATED_MODEL, {
  23     'results': fields.List(fields.Nested(SPONSOR))
  24 })
  25 
  26 SPONSOR_POST = api.clone('SponsorPost', SPONSOR)
  27 del SPONSOR_POST['id']
  28 
  29 
  30 # Create DAO
  31 class SponsorDAO(ServiceDAO):
  32     def list_types(self, event_id):
  33         sponsors = self.list(event_id)
  34         return list(set(
  35             sponsor.sponsor_type for sponsor in sponsors
  36             if sponsor.sponsor_type))
  37 
  38 
  39 DAO = SponsorDAO(SponsorModel, SPONSOR_POST)
  40 
  41 
  42 @api.route('/events/<int:event_id>/sponsors/<int:sponsor_id>')
  43 @api.response(404, 'Sponsor not found')
  44 @api.response(400, 'Sponsor does not belong to event')
  45 class Sponsor(Resource):
  46     @api.doc('get_sponsor')
  47     @api.marshal_with(SPONSOR)
  48     def get(self, event_id, sponsor_id):
  49         """Fetch a sponsor given its id"""
  50         return DAO.get(event_id, sponsor_id)
  51 
  52     @requires_auth
  53     @api.doc('delete_sponsor')
  54     @api.marshal_with(SPONSOR)
  55     def delete(self, event_id, sponsor_id):
  56         """Delete a sponsor given its id"""
  57         return DAO.delete(event_id, sponsor_id)
  58 
  59     @requires_auth
  60     @api.doc('update_sponsor', responses=PUT_RESPONSES)
  61     @api.marshal_with(SPONSOR)
  62     @api.expect(SPONSOR_POST)
  63     def put(self, event_id, sponsor_id):
  64         """Update a sponsor given its id"""
  65         return DAO.update(event_id, sponsor_id, self.api.payload)
  66 
  67 
  68 @api.route('/events/<int:event_id>/sponsors')
  69 class SponsorList(Resource):
  70     @api.doc('list_sponsors')
  71     @api.marshal_list_with(SPONSOR)
  72     def get(self, event_id):
  73         """List all sponsors"""
  74         return DAO.list(event_id)
  75 
  76     @requires_auth
  77     @api.doc('create_sponsor', responses=POST_RESPONSES)
  78     @api.marshal_with(SPONSOR)
  79     @api.expect(SPONSOR_POST)
  80     def post(self, event_id):
  81         """Create a sponsor"""
  82         return DAO.create(
  83             event_id,
  84             self.api.payload,
  85             self.api.url_for(self, event_id=event_id)
  86         )
  87 
  88 
  89 @api.route('/events/<int:event_id>/sponsors/types')
  90 class SponsorTypesList(Resource):
  91     @api.doc('list_sponsor_types')
  92     def get(self, event_id):
  93         """List all sponsor types"""
  94         return DAO.list_types(event_id)
  95 
  96 
  97 @api.route('/events/<int:event_id>/sponsors/page')
  98 class SponsorListPaginated(Resource, PaginatedResourceBase):
  99     @api.doc('list_sponsors_paginated', params=PAGE_PARAMS)
  100     @api.marshal_with(SPONSOR_PAGINATED)
  101     def get(self, event_id):
  102         """List sponsors in a paginated manner"""
  103         return get_paginated_list(
  104             SponsorModel,
  105             self.api.url_for(self, event_id=event_id),
  106             args=self.parser.parse_args(),
  107             event_id=event_id
  108         )
  109
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/open_event/api/sponsors.py b/open_event/api/sponsors.py
  --- a/open_event/api/sponsors.py
  +++ b/open_event/api/sponsors.py
  @@ -88,7 +88,7 @@
   
   @api.route('/events/<int:event_id>/sponsors/types')
   class SponsorTypesList(Resource):
  -    @api.doc('list_sponsor_types')
  +    @api.doc('list_sponsor_types', model=[fields.String()])
       def get(self, event_id):
           """List all sponsor types"""
           return DAO.list_types(event_id)
  
verification_info: {"golden_diff": "diff --git a/open_event/api/sponsors.py b/open_event/api/sponsors.py\n--- a/open_event/api/sponsors.py\n+++ b/open_event/api/sponsors.py\n@@ -88,7 +88,7 @@\n \n @api.route('/events/<int:event_id>/sponsors/types')\n class SponsorTypesList(Resource):\n-    @api.doc('list_sponsor_types')\n+    @api.doc('list_sponsor_types', model=[fields.String()])\n     def get(self, event_id):\n         \"\"\"List all sponsor types\"\"\"\n         return DAO.list_types(event_id)\n", "issue": "Show return model of sponsor types list in Swagger spec\nCurrently no return model (or schema) is shown for the GET API to get sponsor types used in a Event\n\n![sponsor_type_old](https://cloud.githubusercontent.com/assets/4047597/16110108/be118070-33c9-11e6-8532-ce104c5a57d3.png)\n\n", "before_files": [{"content": "from flask.ext.restplus import Resource, Namespace\n\nfrom open_event.models.sponsor import Sponsor as SponsorModel\n\nfrom .helpers.helpers import get_paginated_list, requires_auth, get_object_in_event\nfrom .helpers.utils import PAGINATED_MODEL, PaginatedResourceBase, ServiceDAO, \\\n    PAGE_PARAMS, POST_RESPONSES, PUT_RESPONSES\nfrom .helpers import custom_fields as fields\n\napi = Namespace('sponsors', description='Sponsors', path='/')\n\nSPONSOR = api.model('Sponsor', {\n    'id': fields.Integer(required=True),\n    'name': fields.String(),\n    'url': fields.Uri(),\n    'logo': fields.ImageUri(),\n    'description': fields.String(),\n    'level': fields.String(),\n    'sponsor_type': fields.String(),\n})\n\nSPONSOR_PAGINATED = api.clone('SponsorPaginated', PAGINATED_MODEL, {\n    'results': fields.List(fields.Nested(SPONSOR))\n})\n\nSPONSOR_POST = api.clone('SponsorPost', SPONSOR)\ndel SPONSOR_POST['id']\n\n\n# Create DAO\nclass SponsorDAO(ServiceDAO):\n    def list_types(self, event_id):\n        sponsors = self.list(event_id)\n        return list(set(\n            sponsor.sponsor_type for sponsor in sponsors\n            if sponsor.sponsor_type))\n\n\nDAO = SponsorDAO(SponsorModel, SPONSOR_POST)\n\n\n@api.route('/events/<int:event_id>/sponsors/<int:sponsor_id>')\n@api.response(404, 'Sponsor not found')\n@api.response(400, 'Sponsor does not belong to event')\nclass Sponsor(Resource):\n    @api.doc('get_sponsor')\n    @api.marshal_with(SPONSOR)\n    def get(self, event_id, sponsor_id):\n        \"\"\"Fetch a sponsor given its id\"\"\"\n        return DAO.get(event_id, sponsor_id)\n\n    @requires_auth\n    @api.doc('delete_sponsor')\n    @api.marshal_with(SPONSOR)\n    def delete(self, event_id, sponsor_id):\n        \"\"\"Delete a sponsor given its id\"\"\"\n        return DAO.delete(event_id, sponsor_id)\n\n    @requires_auth\n    @api.doc('update_sponsor', responses=PUT_RESPONSES)\n    @api.marshal_with(SPONSOR)\n    @api.expect(SPONSOR_POST)\n    def put(self, event_id, sponsor_id):\n        \"\"\"Update a sponsor given its id\"\"\"\n        return DAO.update(event_id, sponsor_id, self.api.payload)\n\n\n@api.route('/events/<int:event_id>/sponsors')\nclass SponsorList(Resource):\n    @api.doc('list_sponsors')\n    @api.marshal_list_with(SPONSOR)\n    def get(self, event_id):\n        \"\"\"List all sponsors\"\"\"\n        return DAO.list(event_id)\n\n    @requires_auth\n    @api.doc('create_sponsor', responses=POST_RESPONSES)\n    @api.marshal_with(SPONSOR)\n    @api.expect(SPONSOR_POST)\n    def post(self, event_id):\n        \"\"\"Create a sponsor\"\"\"\n        return DAO.create(\n            event_id,\n            self.api.payload,\n            self.api.url_for(self, event_id=event_id)\n        )\n\n\n@api.route('/events/<int:event_id>/sponsors/types')\nclass SponsorTypesList(Resource):\n    @api.doc('list_sponsor_types')\n    def get(self, event_id):\n        \"\"\"List all sponsor types\"\"\"\n        return DAO.list_types(event_id)\n\n\n@api.route('/events/<int:event_id>/sponsors/page')\nclass SponsorListPaginated(Resource, PaginatedResourceBase):\n    @api.doc('list_sponsors_paginated', params=PAGE_PARAMS)\n    @api.marshal_with(SPONSOR_PAGINATED)\n    def get(self, event_id):\n        \"\"\"List sponsors in a paginated manner\"\"\"\n        return get_paginated_list(\n            SponsorModel,\n            self.api.url_for(self, event_id=event_id),\n            args=self.parser.parse_args(),\n            event_id=event_id\n        )\n", "path": "open_event/api/sponsors.py"}], "after_files": [{"content": "from flask.ext.restplus import Resource, Namespace\n\nfrom open_event.models.sponsor import Sponsor as SponsorModel\n\nfrom .helpers.helpers import get_paginated_list, requires_auth, get_object_in_event\nfrom .helpers.utils import PAGINATED_MODEL, PaginatedResourceBase, ServiceDAO, \\\n    PAGE_PARAMS, POST_RESPONSES, PUT_RESPONSES\nfrom .helpers import custom_fields as fields\n\napi = Namespace('sponsors', description='Sponsors', path='/')\n\nSPONSOR = api.model('Sponsor', {\n    'id': fields.Integer(required=True),\n    'name': fields.String(),\n    'url': fields.Uri(),\n    'logo': fields.ImageUri(),\n    'description': fields.String(),\n    'level': fields.String(),\n    'sponsor_type': fields.String(),\n})\n\nSPONSOR_PAGINATED = api.clone('SponsorPaginated', PAGINATED_MODEL, {\n    'results': fields.List(fields.Nested(SPONSOR))\n})\n\nSPONSOR_POST = api.clone('SponsorPost', SPONSOR)\ndel SPONSOR_POST['id']\n\n\n# Create DAO\nclass SponsorDAO(ServiceDAO):\n    def list_types(self, event_id):\n        sponsors = self.list(event_id)\n        return list(set(\n            sponsor.sponsor_type for sponsor in sponsors\n            if sponsor.sponsor_type))\n\n\nDAO = SponsorDAO(SponsorModel, SPONSOR_POST)\n\n\n@api.route('/events/<int:event_id>/sponsors/<int:sponsor_id>')\n@api.response(404, 'Sponsor not found')\n@api.response(400, 'Sponsor does not belong to event')\nclass Sponsor(Resource):\n    @api.doc('get_sponsor')\n    @api.marshal_with(SPONSOR)\n    def get(self, event_id, sponsor_id):\n        \"\"\"Fetch a sponsor given its id\"\"\"\n        return DAO.get(event_id, sponsor_id)\n\n    @requires_auth\n    @api.doc('delete_sponsor')\n    @api.marshal_with(SPONSOR)\n    def delete(self, event_id, sponsor_id):\n        \"\"\"Delete a sponsor given its id\"\"\"\n        return DAO.delete(event_id, sponsor_id)\n\n    @requires_auth\n    @api.doc('update_sponsor', responses=PUT_RESPONSES)\n    @api.marshal_with(SPONSOR)\n    @api.expect(SPONSOR_POST)\n    def put(self, event_id, sponsor_id):\n        \"\"\"Update a sponsor given its id\"\"\"\n        return DAO.update(event_id, sponsor_id, self.api.payload)\n\n\n@api.route('/events/<int:event_id>/sponsors')\nclass SponsorList(Resource):\n    @api.doc('list_sponsors')\n    @api.marshal_list_with(SPONSOR)\n    def get(self, event_id):\n        \"\"\"List all sponsors\"\"\"\n        return DAO.list(event_id)\n\n    @requires_auth\n    @api.doc('create_sponsor', responses=POST_RESPONSES)\n    @api.marshal_with(SPONSOR)\n    @api.expect(SPONSOR_POST)\n    def post(self, event_id):\n        \"\"\"Create a sponsor\"\"\"\n        return DAO.create(\n            event_id,\n            self.api.payload,\n            self.api.url_for(self, event_id=event_id)\n        )\n\n\n@api.route('/events/<int:event_id>/sponsors/types')\nclass SponsorTypesList(Resource):\n    @api.doc('list_sponsor_types', model=[fields.String()])\n    def get(self, event_id):\n        \"\"\"List all sponsor types\"\"\"\n        return DAO.list_types(event_id)\n\n\n@api.route('/events/<int:event_id>/sponsors/page')\nclass SponsorListPaginated(Resource, PaginatedResourceBase):\n    @api.doc('list_sponsors_paginated', params=PAGE_PARAMS)\n    @api.marshal_with(SPONSOR_PAGINATED)\n    def get(self, event_id):\n        \"\"\"List sponsors in a paginated manner\"\"\"\n        return get_paginated_list(\n            SponsorModel,\n            self.api.url_for(self, event_id=event_id),\n            args=self.parser.parse_args(),\n            event_id=event_id\n        )\n", "path": "open_event/api/sponsors.py"}]}