Add validation stub #5

Merged
dkdent merged 4 commits from validation_stub into master 2020-12-01 23:53:32 +01:00
Showing only changes of commit 114c632797 - Show all commits

15
app.py
View file

@ -68,6 +68,21 @@ class Oas3Handler(tornado.web.RequestHandler, metaclass=ABCMeta):
self.finish()
class ValidateHandler(tornado.web.RequestHandler, metaclass=ABCMeta):
def post(self):
self.set_header("Content-Type", "application/json")
entity = self.request.body.decode()
# TODO call validator
validation_result = {
"valid": "true"
}
self.write(validation_result)
self.finish()
def make_app():
version_path = r"/v[0-9]"
return tornado.web.Application([