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
{{ message }}
Repository navigation
Commit 8884f54
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+3-19Lines changed: 3 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,7 +268,9 @@ When a response schema(s) are defined, the return value from the function is typ
268
268
269
269
#### Custom Content Types
270
270
271
-
By default, Zeta will use `application/json` as the content type in the OpenAPI docs. you can override this by setting the `contentType` metadata on your schema:
271
+
By default, Zeta will use `application/json` as the content type in the OpenAPI docs and infer the content type of the response at runtime based on the response type.
272
+
273
+
You can override both the docs and the response content type by setting the `contentType` metadata on your schema:
272
274
273
275
```ts
274
276
app.get(
@@ -282,24 +284,6 @@ app.get(
282
284
);
283
285
```
284
286
285
-
> [!WARNING]
286
-
>
287
-
> Zeta ignores this metadata when building the response. Make sure to set the `Content-Type` header in your handler:
0 commit comments