move swagger API handler off of existing /api

that spot was already taken

also set the content-type correctly
This commit is contained in:
Min RK 2015-09-03 22:33:35 +02:00
parent f9885818e2
commit 798fc8acef

View File

@ -15,8 +15,9 @@ class APIHandler(web.StaticFileHandler, IPythonHandler):
@web.authenticated
def get(self):
self.log.debug("Serving api")
self.set_header('Content-Type', 'text/x-yaml')
return web.StaticFileHandler.get(self, 'api.yaml')
default_handlers = [
(r"/api", APIHandler)
(r"/api/spec.yaml", APIHandler)
]