Add validate handler
This commit is contained in:
parent
2f0dd4cf1c
commit
31b9859aeb
1 changed files with 15 additions and 0 deletions
15
app.py
15
app.py
|
@ -68,6 +68,21 @@ class Oas3Handler(tornado.web.RequestHandler, metaclass=ABCMeta):
|
||||||
self.finish()
|
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():
|
def make_app():
|
||||||
version_path = r"/v[0-9]"
|
version_path = r"/v[0-9]"
|
||||||
return tornado.web.Application([
|
return tornado.web.Application([
|
||||||
|
|
Loading…
Reference in a new issue