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
@@ -76,6 +86,13 @@ See the [official `@anatine/zod-openapi` docs](https://www.npmjs.com/package/@an
76
86
All Zod schemas defined in your contract can benefit from the additional OpenAPI schema, including `pathParams`, `queryParams`, and `responses`. These keys are all used when generating the OpenAPI JSON file. This could improve the quality of your generated documentation.
77
87
:::
78
88
89
+
### Adding Examples to the Media Type
90
+
91
+
In order to add examples to the media type rather than to the schema itself (this is useful if you want to show multiple examples), we have added a `mediaExamples` property to the `.openapi()` method options.
92
+
This will only work for the schemas of the body, responses and individual query parameters if you are using `jsonQuery` option.
93
+
94
+
You can see an example of its usage in the code snippet above.
0 commit comments