Skip to content

Commit a40a252

Browse files
committed
Validation shortcurs README updated
1 parent 78afae3 commit a40a252

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ and unmarshal request data from validation result
7272
# get body
7373
validated_body = result.body
7474
75+
or use shortcuts for simple validation
76+
77+
.. code-block:: python
78+
79+
from openapi_core import validate_parameters, validate_body
80+
81+
validated_params = validate_parameters(spec, request)
82+
validated_body = validate_body(spec, request)
83+
7584
Request object should implement BaseOpenAPIRequest interface. You can use FlaskOpenAPIRequest a Flask/Werkzeug request wrapper implementation:
7685

7786
.. code-block:: python

0 commit comments

Comments
 (0)