Skip to content

Commit

Permalink
New decorators for specific request data validation
Browse files Browse the repository at this point in the history
  • Loading branch information
maximdanilchenko committed Oct 6, 2019
1 parent 804edc9 commit 6548bc1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions aiohttp_apispec/decorators/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,18 @@ def wrapper(func):

# For backward compatibility
use_kwargs = request_schema

match_info_schema = partial(
request_schema,
locations=["match_info"],
put_into="match_info"
)
querystring_schema = partial(
request_schema,
locations=["querystring"],
put_into="querystring"
)
form_schema = partial(request_schema, locations=["form"], put_into="form")
json_schema = partial(request_schema, locations=["json"], put_into="json")
headers_schema = partial(request_schema, locations=["headers"], put_into="headers")
cookies_schema = partial(request_schema, locations=["cookies"], put_into="cookies")

0 comments on commit 6548bc1

Please sign in to comment.