We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 358ad9b commit fb252b4Copy full SHA for fb252b4
docs/Usage/Request.md
@@ -83,6 +83,26 @@ Receive flask **`request.headers`**.
83
84
Receive flask **`request.cookies`**.
85
86
+### raw
87
+
88
+Receive flask **`request`** and no data validation.
89
90
+```python
91
+from flask_openapi3 import RawModel
92
93
94
+class BookRaw(RawModel):
95
+ mimetypes = ["text/csv", "application/json"]
96
97
98
+@app.post("/book")
99
+def get_book(raw: BookRaw):
100
+ # raw equals to flask.request
101
+ print(raw.data)
102
+ print(raw.mimetype)
103
+ return "ok"
104
+```
105
106
## Request model
107
108
First, you need to define a [pydantic](https://github.com/pydantic/pydantic) model:
0 commit comments