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
fix: resolve FastAPI deprecation warning for example fields (#507)
## PR Summary
This small PR resolves deprecation warnings for the `example` parameter
in FastAPI's `Form` object, replacing it with the recommended `examples`
parameter. These warnings are visible in the [CI
logs](https://github.com/Unstructured-IO/unstructured-api/actions/runs/15281651418/job/42982178029#step:4:1697):
```python
/home/runner/work/unstructured-api/unstructured-api/prepline_general/api/models/form_params.py:54: DeprecationWarning: `example` has been deprecated, please use `examples` instead
```
Signed-off-by: Emmanuel Ferdman <[email protected]>
description="If file is gzipped, use this content type after unzipping",
86
-
example="application/pdf",
86
+
examples=["application/pdf"],
87
87
),
88
88
] =None,
89
89
output_format: Annotated[
90
90
Literal["application/json", "text/csv"],
91
91
Form(
92
92
title="Output Format",
93
93
description="The format of the response. Supported formats are application/json and text/csv. Default: application/json.",
94
-
example="application/json",
94
+
examples=["application/json"],
95
95
),
96
96
] ="application/json",
97
97
coordinates: Annotated[
@@ -107,7 +107,7 @@ def as_form(
107
107
Form(
108
108
title="Content type",
109
109
description="A hint about the content type to use (such as text/markdown), when there are problems processing a specific file. This value is a MIME type in the format type/subtype.",
0 commit comments