You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can use it to validate and unmarshal against requests and/or responses.
68
68
69
69
```python
70
-
# raises error if request is invalid
70
+
# raises an error if the request is invalid
71
71
result = openapi.unmarshal_request(request)
72
72
```
73
73
74
-
Retrieve validated and unmarshalled request data
74
+
Retrieve validated and unmarshalled request data.
75
75
76
76
```python
77
77
# get parameters
@@ -85,19 +85,19 @@ body = result.body
85
85
security = result.security
86
86
```
87
87
88
-
Request object should implement OpenAPI Request protocol. Check [Integrations](https://openapi-core.readthedocs.io/en/latest/integrations.html) to find officially supported implementations.
88
+
The request object should implement the OpenAPI Request protocol. Check [Integrations](https://openapi-core.readthedocs.io/en/latest/integrations.html) to find officially supported implementations.
89
89
90
-
For more details read about [Unmarshalling](https://openapi-core.readthedocs.io/en/latest/unmarshalling.html) process.
90
+
For more details read about the [Unmarshalling](https://openapi-core.readthedocs.io/en/latest/unmarshalling.html) process.
91
91
92
92
If you just want to validate your request/response data without unmarshalling, read about [Validation](https://openapi-core.readthedocs.io/en/latest/validation.html) instead.
: Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification. The validator aims to check for full compliance with the Specification.
98
+
: A Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0, and OpenAPI 3.1 specification. The validator aims to check for full compliance with the Specification.
Copy file name to clipboardExpand all lines: docs/contributing.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,24 +5,24 @@ hide:
5
5
6
6
# Contributing
7
7
8
-
Firstly, thank you all for taking the time to contribute.
8
+
Firstly, thank you for taking the time to contribute.
9
9
10
10
The following section describes how you can contribute to the openapi-core project on GitHub.
11
11
12
12
## Reporting bugs
13
13
14
14
### Before you report
15
15
16
-
- Check whether your issue does not already exist in the [Issue tracker](https://github.com/python-openapi/openapi-core/issues).
17
-
- Make sure it is not a support request or question better suited for [Discussion board](https://github.com/python-openapi/openapi-core/discussions).
16
+
- Check whether your issue already exists in the [Issue tracker](https://github.com/python-openapi/openapi-core/issues).
17
+
- Make sure it is not a support request or question better suited for the [Discussion board](https://github.com/python-openapi/openapi-core/discussions).
18
18
19
19
### How to submit a report
20
20
21
-
- Include clear title.
22
-
- Describe your runtime environment with exact versions you use.
23
-
- Describe the exact steps which reproduce the problem, including minimal code snippets.
24
-
- Describe the behavior you observed after following the steps, pasting console outputs.
25
-
- Describe expected behavior to see and why, including links to documentations.
21
+
- Include a clear title.
22
+
- Describe your runtime environment with the exact versions you use.
23
+
- Describe the exact steps to reproduce the problem, including minimal code snippets.
24
+
- Describe the behavior you observed after following the steps, including console outputs.
25
+
- Describe the expected behavior and why, including links to documentation.
26
26
27
27
## Code contribution
28
28
@@ -50,9 +50,9 @@ poetry shell
50
50
51
51
### Static checks
52
52
53
-
The project uses static checks using fantastic [pre-commit](https://pre-commit.com/). Every change is checked on CI and if it does not pass the tests it cannot be accepted. If you want to check locally then run following command to install pre-commit.
53
+
The project uses static checks with the fantastic [pre-commit](https://pre-commit.com/). Every change is checked on CI, and if it does not pass the tests, it cannot be accepted. If you want to check locally, run the following command to install pre-commit.
54
54
55
-
To turn on pre-commit checks for commit operations in git, enter:
55
+
To enable pre-commit checks for commit operations in git, enter:
56
56
57
57
```console
58
58
pre-commit install
@@ -70,4 +70,4 @@ To run all checks on all files, enter:
70
70
pre-commit run --all-files
71
71
```
72
72
73
-
Pre-commit check results are also attached to your PR through integration with Github Action.
73
+
Pre-commit check results are also attached to your PR through integration with GitHub Actions.
Copy file name to clipboardExpand all lines: docs/customizations/extra_format_validators.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Format validators
2
2
3
-
OpenAPI defines a `format` keyword that hints at how a value should be interpreted, e.g. a `string` with the type`date` should conform to the RFC 3339 date format.
3
+
OpenAPI defines a `format` keyword that hints at how a value should be interpreted. For example, a `string` with the format`date` should conform to the RFC 3339 date format.
4
4
5
5
OpenAPI comes with a set of built-in format validators, but it's also possible to add custom ones.
6
6
7
-
Here's how you could add support for a `usdate` format that handles dates of the form MM/DD/YYYY:
7
+
Here's how you can add support for a `usdate` format that handles dates in the form MM/DD/YYYY:
Copy file name to clipboardExpand all lines: docs/customizations/extra_media_type_deserializers.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# Media type deserializers
1
+
# Media Type Deserializers
2
2
3
-
OpenAPI comes with a set of built-in media type deserializers such as:`application/json`, `application/xml`, `application/x-www-form-urlencoded` or`multipart/form-data`.
3
+
The library comes with a set of built-in media type deserializers for formats such as `application/json`, `application/xml`, `application/x-www-form-urlencoded`, and`multipart/form-data`.
4
4
5
-
You can also define your own ones. Pass custom defined media type deserializers dictionary with supported mimetypes as a key to`unmarshal_response` function:
5
+
You can also define your own deserializers. To do this, pass a dictionary of custom media type deserializers with the supported MIME types as keys to the`unmarshal_response` function:
0 commit comments