danieldaeschle / swapy

Easy and modular web development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Require decorator

danieldaeschle opened this issue · comments

Description

Expect decorator

@require(MyMarshmallowSchema)
def root():
...

It should automatically validates the incoming payload.
If the payload doesn't pass it should return an HTTP error 400 with the description.

It should only works with:

  • POST
  • PUT

Todo

  • Create it
  • Only PUT and POST
  • Return Error 400 on error
  • Unit tests