Skip to content

Commit 151141d

Browse files
authored
🩹 Add vnd.oai.openapi to mime type list that are not base64 encoded (#271)
1 parent baa514d commit 151141d

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

docs/adapter.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ handler = Mangum(
77
app,
88
lifespan="auto",
99
api_gateway_base_path=None,
10-
text_mime_types=None,
1110
)
1211
```
1312

docs/http.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ Binary responses are determined using the `Content-Type` and `Content-Encoding`
3333

3434
### Text MIME types
3535

36-
By default, all response data will be [base64 encoded](https://docs.python.org/3/library/base64.html#base64.b64encode) and include `isBase64Encoded=True` in the response ***except*** the default text MIME types and any MIME types included in the `TEXT_MIME_TYPES` list setting.
37-
38-
The following types are excluded from binary responses by default:
36+
By default, all response data will be [base64 encoded](https://docs.python.org/3/library/base64.html#base64.b64encode) and include `isBase64Encoded=True` in the response ***except*** the following MIME types:
3937

4038
- `application/json`
4139
- `application/javascript`
4240
- `application/xml`
4341
- `application/vnd.api+json`
42+
- `application/vnd.oai.openapi`
4443

4544
Additionally, any `Content-Type` header prefixed with `text/` is automatically excluded.
4645

mangum/handlers/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"application/javascript",
1212
"application/xml",
1313
"application/vnd.api+json",
14+
"application/vnd.oai.openapi",
1415
]
1516

1617

0 commit comments

Comments
 (0)