Skip to content

Commit acac297

Browse files
authored
Merge pull request #2222 from hey-api/changeset-release/main
Version Packages
2 parents aea5dbd + 62dbbc8 commit acac297

File tree

5 files changed

+35
-36
lines changed

5 files changed

+35
-36
lines changed

.changeset/dry-suits-destroy.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

.changeset/rude-shirts-decide.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/six-birds-peel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/openapi-ts/CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# @hey-api/openapi-ts
22

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+
337
## 0.75.0
438

539
### Minor Changes

packages/openapi-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hey-api/openapi-ts",
3-
"version": "0.75.0",
3+
"version": "0.76.0",
44
"description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
55
"homepage": "https://heyapi.dev/",
66
"repository": {

0 commit comments

Comments
 (0)