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 #2222 from hey-api/changeset-release/main

Version Packages

authored by

Lubos and committed by
GitHub
acac2979 aea5dbd2

+35 -36
-25
.changeset/dry-suits-destroy.md
··· 1 - --- 2 - '@hey-api/openapi-ts': minor 3 - --- 4 - 5 - feat(valibot): generate a single schema for requests 6 - 7 - ### Single Valibot schema per request 8 - 9 - Previously, we generated a separate schema for each endpoint parameter and request body. In v0.76.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 vData = v.object({ 13 - body: v.optional(v.object({ 14 - foo: v.optional(v.string()), 15 - bar: v.optional(v.union([v.number(), v.null()])), 16 - })), 17 - headers: v.optional(v.never()), 18 - path: v.object({ 19 - baz: v.string(), 20 - }), 21 - query: v.optional(v.never()), 22 - }); 23 - ``` 24 - 25 - If you need to access individual fields, you can do so using the [`.entries`](https://valibot.dev/api/object/) API. For example, we can get the request body schema with `vData.entries.body`.
-5
.changeset/rude-shirts-decide.md
··· 1 - --- 2 - '@hey-api/openapi-ts': patch 3 - --- 4 - 5 - fix(parser): prefer JSON media type
-5
.changeset/six-birds-peel.md
··· 1 - --- 2 - '@hey-api/openapi-ts': patch 3 - --- 4 - 5 - fix(valibot): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes
+34
packages/openapi-ts/CHANGELOG.md
··· 1 1 # @hey-api/openapi-ts 2 2 3 + ## 0.76.0 4 + 5 + ### Minor Changes 6 + 7 + - [#2226](https://github.com/hey-api/openapi-ts/pull/2226) [`1c66d88`](https://github.com/hey-api/openapi-ts/commit/1c66d8866fa25dc9cf978ef94eab3bf8ca64d9f3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(valibot): generate a single schema for requests 8 + 9 + ### Single Valibot schema per request 10 + 11 + Previously, we generated a separate schema for each endpoint parameter and request body. In v0.76.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 vData = v.object({ 15 + body: v.optional( 16 + v.object({ 17 + foo: v.optional(v.string()), 18 + bar: v.optional(v.union([v.number(), v.null()])), 19 + }), 20 + ), 21 + headers: v.optional(v.never()), 22 + path: v.object({ 23 + baz: v.string(), 24 + }), 25 + query: v.optional(v.never()), 26 + }); 27 + ``` 28 + 29 + If you need to access individual fields, you can do so using the [`.entries`](https://valibot.dev/api/object/) API. For example, we can get the request body schema with `vData.entries.body`. 30 + 31 + ### Patch Changes 32 + 33 + - [#2221](https://github.com/hey-api/openapi-ts/pull/2221) [`e335e1e`](https://github.com/hey-api/openapi-ts/commit/e335e1ea31256b3b284b7ef968d566c1315096b3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): prefer JSON media type 34 + 35 + - [#2226](https://github.com/hey-api/openapi-ts/pull/2226) [`1c66d88`](https://github.com/hey-api/openapi-ts/commit/1c66d8866fa25dc9cf978ef94eab3bf8ca64d9f3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes 36 + 3 37 ## 0.75.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.75.0", 3 + "version": "0.76.0", 4 4 "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.", 5 5 "homepage": "https://heyapi.dev/", 6 6 "repository": {