···67676868You must provide an input so we can load your OpenAPI specification.
69697070-The input can be a string path, URL, API registry shorthand, an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.
7070+The input can be a string path, URL, [API registry](/openapi-ts/configuration/input#api-registry) shorthand, an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.
71717272You can learn more on the [Input](/openapi-ts/configuration/input) page.
7373
+1-1
docs/openapi-ts/configuration/input.md
···991010## Input
11111212-The input can be a string path, URL, API registry shorthand, an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.
1212+The input can be a string path, URL, [API registry](#api-registry), an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.
13131414::: code-group
1515
+60
docs/openapi-ts/plugins/zod.md
···175175176176You can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.
177177178178+## ISO Datetimes
179179+180180+By default, values without a timezone or with a timezone offset are not allowed in the `z.iso.datetime()` method.
181181+182182+### Timezone offsets
183183+184184+You can allow values with timezone offsets by setting `dates.offset` to `true`.
185185+186186+::: code-group
187187+188188+```ts [example]
189189+export const zFoo = z.iso.datetime({ offset: true });
190190+```
191191+192192+```js [config]
193193+export default {
194194+ input: 'hey-api/backend', // sign up at app.heyapi.dev
195195+ output: 'src/client',
196196+ plugins: [
197197+ // ...other plugins
198198+ {
199199+ name: 'zod',
200200+ dates: {
201201+ offset: true, // [!code ++]
202202+ },
203203+ },
204204+ ],
205205+};
206206+```
207207+208208+:::
209209+210210+### Local times
211211+212212+You can allow values without a timezone by setting `dates.local` to `true`.
213213+214214+::: code-group
215215+216216+```ts [example]
217217+export const zFoo = z.iso.datetime({ local: true });
218218+```
219219+220220+```js [config]
221221+export default {
222222+ input: 'hey-api/backend', // sign up at app.heyapi.dev
223223+ output: 'src/client',
224224+ plugins: [
225225+ // ...other plugins
226226+ {
227227+ name: 'zod',
228228+ dates: {
229229+ local: true, // [!code ++]
230230+ },
231231+ },
232232+ ],
233233+};
234234+```
235235+236236+:::
237237+178238## Metadata
179239180240It's often useful to associate a schema with some additional [metadata](https://zod.dev/metadata) for documentation, code generation, AI structured outputs, form validation, and other purposes. If this is your use case, you can set `metadata` to `true` to generate additional metadata about schemas.
+72-2
docs/openapi-ts/plugins/zod/mini.md
···3636 plugins: [
3737 // ...other plugins
3838 {
3939- compatibilityVersion: 'mini', // [!code ++]
4039 name: 'zod', // [!code ++]
4040+ compatibilityVersion: 'mini', // [!code ++]
4141 },
4242 ],
4343};
···5353 output: 'src/client',
5454 plugins: [
5555 // ...other plugins
5656- 'zod',
5656+ {
5757+ name: 'zod',
5858+ compatibilityVersion: 'mini',
5959+ },
5760 {
5861 name: '@hey-api/sdk', // [!code ++]
5962 validator: true, // [!code ++]
···97100 // ...other plugins
98101 {
99102 name: 'zod',
103103+ compatibilityVersion: 'mini',
100104 requests: true, // [!code ++]
101105 },
102106 ],
···136140 // ...other plugins
137141 {
138142 name: 'zod',
143143+ compatibilityVersion: 'mini',
139144 responses: true, // [!code ++]
140145 },
141146 ],
···168173 // ...other plugins
169174 {
170175 name: 'zod',
176176+ compatibilityVersion: 'mini',
171177 definitions: true, // [!code ++]
172178 },
173179 ],
···178184179185You can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.
180186187187+## ISO Datetimes
188188+189189+By default, values without a timezone or with a timezone offset are not allowed in the `z.iso.datetime()` method.
190190+191191+### Timezone offsets
192192+193193+You can allow values with timezone offsets by setting `dates.offset` to `true`.
194194+195195+::: code-group
196196+197197+```ts [example]
198198+export const zFoo = z.iso.datetime({ offset: true });
199199+```
200200+201201+```js [config]
202202+export default {
203203+ input: 'hey-api/backend', // sign up at app.heyapi.dev
204204+ output: 'src/client',
205205+ plugins: [
206206+ // ...other plugins
207207+ {
208208+ name: 'zod',
209209+ compatibilityVersion: 'mini',
210210+ dates: {
211211+ offset: true, // [!code ++]
212212+ },
213213+ },
214214+ ],
215215+};
216216+```
217217+218218+:::
219219+220220+### Local times
221221+222222+You can allow values without a timezone by setting `dates.local` to `true`.
223223+224224+::: code-group
225225+226226+```ts [example]
227227+export const zFoo = z.iso.datetime({ local: true });
228228+```
229229+230230+```js [config]
231231+export default {
232232+ input: 'hey-api/backend', // sign up at app.heyapi.dev
233233+ output: 'src/client',
234234+ plugins: [
235235+ // ...other plugins
236236+ {
237237+ name: 'zod',
238238+ compatibilityVersion: 'mini',
239239+ dates: {
240240+ local: true, // [!code ++]
241241+ },
242242+ },
243243+ ],
244244+};
245245+```
246246+247247+:::
248248+181249## Metadata
182250183251It's often useful to associate a schema with some additional [metadata](https://zod.dev/metadata) for documentation, code generation, AI structured outputs, form validation, and other purposes. If this is your use case, you can set `metadata` to `true` to generate additional metadata about schemas.
···198266 // ...other plugins
199267 {
200268 name: 'zod',
269269+ compatibilityVersion: 'mini',
201270 metadata: true, // [!code ++]
202271 },
203272 ],
···224293 // ...other plugins
225294 {
226295 name: 'zod',
296296+ compatibilityVersion: 'mini',
227297 types: {
228298 infer: false, // by default, no `z.infer` types [!code ++]
229299 },
+72-2
docs/openapi-ts/plugins/zod/v3.md
···3636 plugins: [
3737 // ...other plugins
3838 {
3939- compatibilityVersion: 3, // [!code ++]
4039 name: 'zod', // [!code ++]
4040+ compatibilityVersion: 3, // [!code ++]
4141 },
4242 ],
4343};
···5353 output: 'src/client',
5454 plugins: [
5555 // ...other plugins
5656- 'zod',
5656+ {
5757+ name: 'zod',
5858+ compatibilityVersion: 3,
5959+ },
5760 {
5861 name: '@hey-api/sdk', // [!code ++]
5962 validator: true, // [!code ++]
···97100 // ...other plugins
98101 {
99102 name: 'zod',
103103+ compatibilityVersion: 3,
100104 requests: true, // [!code ++]
101105 },
102106 ],
···136140 // ...other plugins
137141 {
138142 name: 'zod',
143143+ compatibilityVersion: 3,
139144 responses: true, // [!code ++]
140145 },
141146 ],
···168173 // ...other plugins
169174 {
170175 name: 'zod',
176176+ compatibilityVersion: 3,
171177 definitions: true, // [!code ++]
172178 },
173179 ],
···178184179185You can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.
180186187187+## ISO Datetimes
188188+189189+By default, values without a timezone or with a timezone offset are not allowed in the `z.string().datetime()` method.
190190+191191+### Timezone offsets
192192+193193+You can allow values with timezone offsets by setting `dates.offset` to `true`.
194194+195195+::: code-group
196196+197197+```ts [example]
198198+export const zFoo = z.string().datetime({ offset: true });
199199+```
200200+201201+```js [config]
202202+export default {
203203+ input: 'hey-api/backend', // sign up at app.heyapi.dev
204204+ output: 'src/client',
205205+ plugins: [
206206+ // ...other plugins
207207+ {
208208+ name: 'zod',
209209+ compatibilityVersion: 3,
210210+ dates: {
211211+ offset: true, // [!code ++]
212212+ },
213213+ },
214214+ ],
215215+};
216216+```
217217+218218+:::
219219+220220+### Local times
221221+222222+You can allow values without a timezone by setting `dates.local` to `true`.
223223+224224+::: code-group
225225+226226+```ts [example]
227227+export const zFoo = z.string().datetime({ local: true });
228228+```
229229+230230+```js [config]
231231+export default {
232232+ input: 'hey-api/backend', // sign up at app.heyapi.dev
233233+ output: 'src/client',
234234+ plugins: [
235235+ // ...other plugins
236236+ {
237237+ name: 'zod',
238238+ compatibilityVersion: 3,
239239+ dates: {
240240+ local: true, // [!code ++]
241241+ },
242242+ },
243243+ ],
244244+};
245245+```
246246+247247+:::
248248+181249## Metadata
182250183251It's often useful to associate a schema with some additional [metadata](https://v3.zod.dev/?id=describe) for documentation, code generation, AI structured outputs, form validation, and other purposes. If this is your use case, you can set `metadata` to `true` to generate additional metadata about schemas.
···196264 // ...other plugins
197265 {
198266 name: 'zod',
267267+ compatibilityVersion: 3,
199268 metadata: true, // [!code ++]
200269 },
201270 ],
···222291 // ...other plugins
223292 {
224293 name: 'zod',
294294+ compatibilityVersion: 3,
225295 types: {
226296 infer: false, // by default, no `z.infer` types [!code ++]
227297 },