Skip to content

Commit c305589

Browse files
authored
Merge pull request #3507 from hey-api/docs/zod-valibot-metadata-2
docs: expand metadata section for zod and valibot
2 parents c6e182f + 2770989 commit c305589

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docs/openapi-ts/plugins/valibot.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export const vFoo = v.pipe(
221221
);
222222
```
223223

224+
<!-- prettier-ignore-start -->
224225
```js [config]
225226
export default {
226227
input: 'hey-api/backend', // sign up at app.heyapi.dev
@@ -229,15 +230,15 @@ export default {
229230
// ...other plugins
230231
{
231232
name: 'valibot',
232-
metadata({ $, node, schema }) {
233-
// [!code ++]
233+
metadata({ $, node, schema }) { // [!code ++]
234234
node.prop('hasTitle', $.literal(Boolean(schema.title))); // [!code ++]
235235
node.prop('createdAt', $.literal(Date.now())); // [!code ++]
236236
}, // [!code ++]
237237
},
238238
],
239239
};
240240
```
241+
<!-- prettier-ignore-end -->
241242

242243
:::
243244

docs/openapi-ts/plugins/zod.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ export const zFoo = z.string().register(z.globalRegistry, {
275275
});
276276
```
277277

278+
<!-- prettier-ignore-start -->
278279
```js [config]
279280
export default {
280281
input: 'hey-api/backend', // sign up at app.heyapi.dev
@@ -283,15 +284,15 @@ export default {
283284
// ...other plugins
284285
{
285286
name: 'zod',
286-
metadata({ $, node, schema }) {
287-
// [!code ++]
287+
metadata({ $, node, schema }) { // [!code ++]
288288
node.prop('hasTitle', $.literal(Boolean(schema.title))); // [!code ++]
289289
node.prop('createdAt', $.literal(Date.now())); // [!code ++]
290290
}, // [!code ++]
291291
},
292292
],
293293
};
294294
```
295+
<!-- prettier-ignore-end -->
295296

296297
:::
297298

0 commit comments

Comments
 (0)