fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #2193 from hey-api/changeset-release/main

Version Packages

authored by

Lubos and committed by
GitHub
c778f692 a6329f7f

+35 -36
-25
.changeset/famous-ducks-lay.md
··· 1 - --- 2 - '@hey-api/openapi-ts': minor 3 - --- 4 - 5 - feat(zod): generate a single schema for requests 6 - 7 - ### Single Zod schema per request 8 - 9 - Previously, we generated a separate schema for each endpoint parameter and request body. In v0.74.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers. 10 - 11 - ```ts 12 - const zData = z.object({ 13 - body: z.object({ 14 - foo: z.string().optional(), 15 - bar: z.union([z.number(), z.null()]).optional(), 16 - }).optional(), 17 - headers: z.never().optional(), 18 - path: z.object({ 19 - baz: z.string() 20 - }), 21 - query: z.never().optional() 22 - }); 23 - ``` 24 - 25 - If you need to access individual fields, you can do so using the [`.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.shape.body`.
-5
.changeset/odd-yaks-love.md
··· 1 - --- 2 - "@hey-api/openapi-ts": patch 3 - --- 4 - 5 - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format
-5
.changeset/poor-stingrays-remember.md
··· 1 - --- 2 - '@hey-api/openapi-ts': patch 3 - --- 4 - 5 - fix(parser): do not mark schemas as duplicate if they have different format
+34
packages/openapi-ts/CHANGELOG.md
··· 1 1 # @hey-api/openapi-ts 2 2 3 + ## 0.74.0 4 + 5 + ### Minor Changes 6 + 7 + - [#2201](https://github.com/hey-api/openapi-ts/pull/2201) [`ab8cede`](https://github.com/hey-api/openapi-ts/commit/ab8cedefe0ca99492d064dfc191f5445bd8102fb) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(zod): generate a single schema for requests 8 + 9 + ### Single Zod schema per request 10 + 11 + Previously, we generated a separate schema for each endpoint parameter and request body. In v0.74.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers. 12 + 13 + ```ts 14 + const zData = z.object({ 15 + body: z 16 + .object({ 17 + foo: z.string().optional(), 18 + bar: z.union([z.number(), z.null()]).optional(), 19 + }) 20 + .optional(), 21 + headers: z.never().optional(), 22 + path: z.object({ 23 + baz: z.string(), 24 + }), 25 + query: z.never().optional(), 26 + }); 27 + ``` 28 + 29 + If you need to access individual fields, you can do so using the [`.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.shape.body`. 30 + 31 + ### Patch Changes 32 + 33 + - [#2192](https://github.com/hey-api/openapi-ts/pull/2192) [`7a740ed`](https://github.com/hey-api/openapi-ts/commit/7a740ed2007b81c0088f4d80dd3401c9af673767) Thanks [@Daschi1](https://github.com/Daschi1)! - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format 34 + 35 + - [#2201](https://github.com/hey-api/openapi-ts/pull/2201) [`a889c3c`](https://github.com/hey-api/openapi-ts/commit/a889c3c899b54aec73a3ecffc071a412b44c112a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): do not mark schemas as duplicate if they have different format 36 + 3 37 ## 0.73.0 4 38 5 39 ### Minor Changes
+1 -1
packages/openapi-ts/package.json
··· 1 1 { 2 2 "name": "@hey-api/openapi-ts", 3 - "version": "0.73.0", 3 + "version": "0.74.0", 4 4 "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.", 5 5 "homepage": "https://heyapi.dev/", 6 6 "repository": {