Add routing for entities handlers

This commit is contained in:
Stefan Haun 2020-09-28 00:07:00 +02:00
parent 683b4514e6
commit 3c2ba96e05

4
app.py
View file

@ -89,11 +89,13 @@ class Oas3Handler(tornado.web.RequestHandler, metaclass=ABCMeta):
self.finish() self.finish()
def make_app(_auth_provider=None): def make_app(auth_provider=None):
version_path = r"/v[0-9]" version_path = r"/v[0-9]"
return tornado.web.Application([ return tornado.web.Application([
(version_path + r"/health", HealthHandler), (version_path + r"/health", HealthHandler),
(version_path + r"/oas3", Oas3Handler), (version_path + r"/oas3", Oas3Handler),
(version_path + r"/entities", AllEntitiesHandler, {"auth_provider": auth_provider}),
(version_path + r"/entity/{.*}", SingleEntityHandler, {"auth_provider": auth_provider}),
]) ])