Skip to content

Commit cbf4a87

Browse files
committed
fix: Ensure file uploads use RFC 7578 standard for multipart arrays
See new docs from Speakeasy folks: https://www.speakeasy.com/docs/speakeasy-reference/generation/gen-yaml#multipartarrayformat Remove the work around in `MultipartFileFieldFixHook` now that `multipartArrayFormat: standard` handles RFC 7578 compliance at code generation time.
1 parent 873aa21 commit cbf4a87

File tree

4 files changed

+1
-299
lines changed

4 files changed

+1
-299
lines changed

.speakeasy/gen.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ generation:
2929
generateTests: true
3030
generateNewTests: true
3131
skipResponseBodyAssertions: true
32+
multipartArrayFormat: standard
3233
python:
3334
version: 0.11.22
3435
additionalDependencies:

src/glean/api_client/_hooks/multipart_fix_hook.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/glean/api_client/_hooks/registration.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .types import Hooks
2-
from .multipart_fix_hook import MultipartFileFieldFixHook
32
from .agent_file_upload_error_hook import AgentFileUploadErrorHook
43

54

@@ -14,8 +13,5 @@ def init_hooks(hooks: Hooks):
1413
with an instance of a hook that implements that specific Hook interface
1514
Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance"""
1615

17-
# Register hook to fix multipart file field names that incorrectly have '[]' suffix
18-
hooks.register_sdk_init_hook(MultipartFileFieldFixHook())
19-
2016
# Register hook to provide helpful error messages for agent file upload issues
2117
hooks.register_after_error_hook(AgentFileUploadErrorHook())

tests/test_multipart_fix_hook.py

Lines changed: 0 additions & 203 deletions
This file was deleted.

0 commit comments

Comments
 (0)