mirror of
https://github.com/correl/openapi-core.git
synced 2025-01-04 03:00:15 +00:00
README fixes
This commit is contained in:
parent
0bbf787423
commit
76d508181d
1 changed files with 6 additions and 2 deletions
|
@ -66,8 +66,10 @@ and unmarshal request data from validation result
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# get parameters dictionary with path, query, cookies and headers parameters
|
# get parameters object with path, query, cookies and headers parameters
|
||||||
validated_params = result.parameters
|
validated_params = result.parameters
|
||||||
|
# or specific parameters
|
||||||
|
validated_path_params = result.parameters.path
|
||||||
|
|
||||||
# get body
|
# get body
|
||||||
validated_body = result.body
|
validated_body = result.body
|
||||||
|
@ -154,7 +156,9 @@ or simply specify response factory for shortcuts
|
||||||
from openapi_core import validate_parameters, validate_body
|
from openapi_core import validate_parameters, validate_body
|
||||||
|
|
||||||
validated_data = validate_data(
|
validated_data = validate_data(
|
||||||
spec, request, response, response_factory=FlaskOpenAPIResponse)
|
spec, request, response,
|
||||||
|
request_factory=FlaskOpenAPIRequest,
|
||||||
|
response_factory=FlaskOpenAPIResponse)
|
||||||
|
|
||||||
Related projects
|
Related projects
|
||||||
================
|
================
|
||||||
|
|
Loading…
Reference in a new issue