Commit 99554f9
fix: correct invalid JSON in Swagger UI examples for list parameters (#541)
The examples for languages, ocr_languages, and skip_infer_table_types
parameters were using invalid JSON syntax (e.g., "[eng]" instead of
'["eng"]'). This caused Swagger UI to fail rendering the /general/doc
endpoint with the error: "Unexpected token 'e', \"[eng]\" is not valid
JSON"
Changed:
- languages: "[eng]" -> '["eng"]'
- ocr_languages: "[eng]" -> '["eng"]'
- skip_infer_table_types: "['pdf', 'jpg', 'png']" -> '["pdf", "jpg",
"png"]'
These parameters use multipart/form-data which requires stringified JSON
for array values. The fix uses proper JSON syntax with double quotes,
matching the pattern used elsewhere (e.g., extract_image_block_types).
Fixes #537
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Doc/Swagger example-only updates to form parameter metadata; no
runtime logic or request parsing changes.
>
> **Overview**
> Fixes invalid JSON shown in Swagger UI examples for
multipart/form-data list parameters in `GeneralFormParams.as_form`.
>
> Updates the `examples` strings for `languages`, `ocr_languages`, and
`skip_infer_table_types` to use proper JSON array syntax (double-quoted
strings), preventing Swagger UI rendering errors for the `/general/doc`
endpoint.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f408553. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent b9c9323 commit 99554f9
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments