From 6dde61b1791b4e5662798d459bf7e4e4355e4442 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 6 Apr 2026 04:28:53 +0200 Subject: [PATCH 1/2] docs: new changelog --- .changeset/changelog.js | 51 +- .changeset/config.json | 2 +- .github/workflows/release.yml | 21 +- CHANGELOG.md | 2880 +++++++++++++++++ .../community/contributing/developing.md | 83 + package.json | 3 + scripts/changelog/assemble/grouper.ts | 233 ++ scripts/changelog/assemble/index.ts | 225 ++ scripts/changelog/assemble/reader.ts | 98 + scripts/changelog/breaking.ts | 40 + scripts/changelog/config.ts | 43 + scripts/changelog/format.ts | 210 ++ scripts/changelog/index.ts | 24 + scripts/changelog/parse.ts | 90 + scripts/changelog/release/contributors.ts | 51 + scripts/changelog/release/format.ts | 112 + scripts/changelog/release/notes.ts | 46 + scripts/changelog/release/tag.ts | 20 + 18 files changed, 4208 insertions(+), 24 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 scripts/changelog/assemble/grouper.ts create mode 100644 scripts/changelog/assemble/index.ts create mode 100644 scripts/changelog/assemble/reader.ts create mode 100644 scripts/changelog/breaking.ts create mode 100644 scripts/changelog/config.ts create mode 100644 scripts/changelog/format.ts create mode 100644 scripts/changelog/index.ts create mode 100644 scripts/changelog/parse.ts create mode 100644 scripts/changelog/release/contributors.ts create mode 100644 scripts/changelog/release/format.ts create mode 100644 scripts/changelog/release/notes.ts create mode 100644 scripts/changelog/release/tag.ts diff --git a/.changeset/changelog.js b/.changeset/changelog.js index a0348d5590..9f7bd93592 100644 --- a/.changeset/changelog.js +++ b/.changeset/changelog.js @@ -30,8 +30,11 @@ export default { /** @type string[] */ const usersFromSummary = []; + // Parse summary to extract scope and description + const summary = changeset.summary; + // Remove PR, commit, author/user lines from summary - const replacedChangelog = changeset.summary + const replacedChangelog = summary .replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => { const num = Number(pr); if (!Number.isNaN(num)) { @@ -49,6 +52,24 @@ export default { }) .trim(); + // Detect scope from **scope**: format + const scopeMatch = replacedChangelog.match(/^\*\*([^:]+)\*\*:?\s*(.*)$/); + const scope = scopeMatch ? scopeMatch[1] : null; + const description = scopeMatch ? scopeMatch[2] : replacedChangelog; + + // Detect breaking changes (explicit BREAKING or major version) - for future use + const explicitBreaking = + /^BREAKING[:\s]/i.test(replacedChangelog) || /\bBREAKING CHANGE\b/i.test(replacedChangelog); + void explicitBreaking; + + // Build formatted entry + const entryParts = []; + if (scope) { + entryParts.push(`**${scope}**: ${description}`); + } else { + entryParts.push(description); + } + const links = await (async () => { if (prFromSummary !== undefined) { let { links } = await getInfoFromPullRequest({ @@ -81,27 +102,13 @@ export default { }; })(); - const users = usersFromSummary.length - ? usersFromSummary - .map((userFromSummary) => `[@${userFromSummary}](https://github.com/${userFromSummary})`) - .join(', ') - : links.user; - - const metadata = [ - links.pull === null ? '' : ` (${links.pull})`, - links.commit === null ? '' : ` (${links.commit})`, - users === null ? '' : ` by ${users}`, - ].join(''); - - // Split summary into first line and the rest - const [firstLine, ...rest] = replacedChangelog.split('\n'); - const restSummary = rest.join('\n').trim(); - - // No code block conversion: preserve original triple backtick code blocks and indentation - let releaseLine = `\n- ${firstLine}${metadata}`; - if (restSummary) { - releaseLine += '\n\n' + restSummary; + // Add PR link at end + if (links.pull) { + entryParts.push(`(${links.pull})`); + } else if (prFromSummary !== undefined) { + entryParts.push(`([#${prFromSummary}](https://github.com/${repo}/pull/${prFromSummary}))`); } - return releaseLine; + + return `\n- ${entryParts.join(' ')}`; }, }; diff --git a/.changeset/config.json b/.changeset/config.json index db9764ce02..8ec6840953 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", "access": "public", "baseBranch": "main", - "changelog": "./changelog.js", + "changelog": ["./changelog.js", { "repo": "hey-api/openapi-ts" }], "commit": false, "fixed": [], "ignore": [], diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b9ff06fb9..ce06bcaf74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,13 +49,32 @@ jobs: uses: changesets/action@v1.7.0 with: commit: 'ci: release' + createGithubReleases: false publish: pnpm changeset publish title: 'ci: release' - version: pnpm changeset version + version: pnpm changeset version && pnpm changelog:assemble env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} NPM_CONFIG_PROVENANCE: true + - name: Generate Release Tag + id: tag + run: echo "tag=$(pnpm changelog:release:tag)" >> $GITHUB_OUTPUT + + - name: Generate Release Notes + id: notes + run: pnpm changelog:release:notes > release-notes.md + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.tag.outputs.tag }} + name: Release ${{ steps.tag.outputs.tag }} + body_path: release-notes.md + generate_release_notes: false + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + - name: Get current branch run: echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..abc7a75f1f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2880 @@ +# Changelog + +## 2026-04-02 + +### @hey-api/openapi-ts 0.95.0 + +#### Core +- **internal**: remove `plugin.getSymbol` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +#### @hey-api/client-angular +###### Fixed +- **@hey-api/client-angular**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) + +#### @hey-api/client-axios +###### Fixed +- **@hey-api/client-axios**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) + +#### @hey-api/client-fetch +###### Fixed +- **@hey-api/client-fetch**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) + +#### @hey-api/client-ky +###### Fixed +- **@hey-api/client-ky**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) + +#### @hey-api/client-next +###### Fixed +- **@hey-api/client-next**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) + +#### @hey-api/sdk +###### Changed +- **@hey-api/sdk**: improve types for SSE events ([#3466](https://github.com/hey-api/openapi-ts/pull/3466)) + +#### orpc +###### Fixed +- **orpc**: adjust input shape ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +#### valibot +###### Changed +- **valibot**: remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- **valibot**: export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +#### zod +###### Changed +- **zod**: remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- **zod**: export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +--- + +### @hey-api/shared 0.3.0 + +### Added +- **plugins**: add request validator helpers ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +### Changed +- **internal**: remove `plugin.getSymbol` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +--- + +## 2026-03-20 + +### @hey-api/openapi-ts 0.94.4 + +#### orpc +###### Changed +- **orpc**: initial release ([#3264](https://github.com/hey-api/openapi-ts/pull/3264)) + +--- + +## 2026-03-19 + +### @hey-api/openapi-ts 0.94.3 + +#### Core +- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) +- **output**: pass context as second argument in `module.resolve` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) +- **parser**: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) + +#### @hey-api/client-nuxt +###### Changed +- **@hey-api/client-nuxt**: preserve AbortSignal, FormData, and ReadableStream in unwrapRefs ([#3614](https://github.com/hey-api/openapi-ts/pull/3614)) + +#### @hey-api/transformers +###### Changed +- **@hey-api/transformers**: expose `plugin` and `$` in transformer function context ([#3610](https://github.com/hey-api/openapi-ts/pull/3610)) + +--- + +### @hey-api/codegen-core 0.7.4 + +### Changed +- **planner**: language-aware declaration sharing check ([#3606](https://github.com/hey-api/openapi-ts/pull/3606)) + +--- + +### @hey-api/shared 0.2.5 + +### Added +- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) + +### Fixed +- **parser**: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) + +### Changed +- **output**: pass context as second argument in `module.resolve` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) + +--- + +## 2026-03-16 + +### @hey-api/openapi-ts 0.94.2 + +#### Core +- **internal**: export Plugins namespace ([#3586](https://github.com/hey-api/openapi-ts/pull/3586)) +- **internal**: expand TypeScript peer dependency range ([#3588](https://github.com/hey-api/openapi-ts/pull/3588)) +- **output**: pass default value to `header` function ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) + +#### nestjs +###### Changed +- **nestjs**: initial release ([#3573](https://github.com/hey-api/openapi-ts/pull/3573)) + +--- + +### @hey-api/codegen-core 0.7.3 + +### Changed +- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) + +--- + +### @hey-api/shared 0.2.4 + +### Changed +- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) +- **utils**: `outputHeaderToPrefix` function signature change ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) + +--- + +### @hey-api/types 0.1.4 + +### Changed +- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) + +--- + +## 2026-03-12 + +### @hey-api/openapi-ts 0.94.1 + +#### Core +- **cli**: show environment value in development ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) + +#### @hey-api/transformers +###### Fixed +- **@hey-api/transformers**: support `anyOf` schema with null ([#3504](https://github.com/hey-api/openapi-ts/pull/3504)) + +#### @hey-api/typescript +###### Added +- **@hey-api/typescript**: add Resolvers API ([#3531](https://github.com/hey-api/openapi-ts/pull/3531)) +###### Changed +- **@hey-api/typescript**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) + +#### valibot +###### Changed +- **valibot**: provide more resolvers ([#3547](https://github.com/hey-api/openapi-ts/pull/3547)) +- **valibot**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) + +#### zod +###### Changed +- **zod**: handle `guid` string format ([#3552](https://github.com/hey-api/openapi-ts/pull/3552)) +- **zod**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) +- **zod**: provide more resolvers ([#3554](https://github.com/hey-api/openapi-ts/pull/3554)) + +- **config(plugins)**: show warning when plugin infer fails ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) +- **dsl**: expand list of JavaScript globals ([#3508](https://github.com/hey-api/openapi-ts/pull/3508)) + +--- + +### @hey-api/codegen-core 0.7.2 + +### Changed +- **log**: make group optional in warn method ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) + +--- + +### @hey-api/shared 0.2.3 + +### Added +- **parser**: add `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) + +### Changed +- **cli**: export isEnvironment function ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) +- **internal**: export more IR types ([#3513](https://github.com/hey-api/openapi-ts/pull/3513)) + +--- + +## 2026-03-05 + +### @hey-api/openapi-ts 0.94.0 + +### ⚠️ Breaking +- **BREAKING** **client**: `buildUrl` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) + +#### Core +- **internal**: simplify dev mode check ([#3498](https://github.com/hey-api/openapi-ts/pull/3498)) +- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) +- **output**: avoid double sanitizing leading character ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) +- **parser**: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) + +#### @pinia/colada +###### Fixed +- **@pinia/colada**: pass error type generic to `defineQueryOptions` ([#3483](https://github.com/hey-api/openapi-ts/pull/3483)) + +#### @tanstack/preact-query +###### Changed +- **@tanstack/preact-query**: initial release ([#3499](https://github.com/hey-api/openapi-ts/pull/3499)) + +#### @tanstack/react-query +###### Changed +- **@tanstack/react-query**: support generating `useMutation` hooks ([#3432](https://github.com/hey-api/openapi-ts/pull/3432)) + +#### typescript +###### Fixed +- **typescript**: reference enum object when creating enum types ([#3500](https://github.com/hey-api/openapi-ts/pull/3500)) + +#### valibot +###### Changed +- **valibot**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) + +#### zod +###### Changed +- **zod**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) + +- **BREAKING** **client**: `buildUrl` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) +- **client**: change serializer types from `any` to `unknown` ([#3471](https://github.com/hey-api/openapi-ts/pull/3471)) +- **dsl(reserved)**: expand reserved keywords with more globals ([#3487](https://github.com/hey-api/openapi-ts/pull/3487)) +- **output(header)**: support function signature in client and core files ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) + +--- + +### @hey-api/codegen-core 0.7.1 + +### Changed +- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) + +--- + +### @hey-api/shared 0.2.2 + +### Fixed +- **parser**: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) + +### Changed +- **output**: context file is optional ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) + +--- + +## 2026-02-27 + +### @hey-api/openapi-ts 0.93.1 + +#### Core +- **cli**: do not set `logs.file` to `true` by default ([#3469](https://github.com/hey-api/openapi-ts/pull/3469)) + +#### @hey-api/sdk +###### Fixed +- **@hey-api/sdk**: correctly set required flat parameters ([#3458](https://github.com/hey-api/openapi-ts/pull/3458)) + +#### @hey-api/typescript +###### Changed +- **@hey-api/typescript**: simplify union types if a member is `unknown` ([#3454](https://github.com/hey-api/openapi-ts/pull/3454)) + +#### @tanstack/query +###### Fixed +- **@tanstack/query**: skip mutation queries for SSE endpoints ([#3470](https://github.com/hey-api/openapi-ts/pull/3470)) + +#### valibot +###### Added +- **valibot**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) + +#### zod +###### Added +- **zod**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) +###### Fixed +- **zod**: apply nullable modifier to `additionalProperties` schema ([#3452](https://github.com/hey-api/openapi-ts/pull/3452)) + +- **client**: avoid removing empty arrays from flat arguments ([#3451](https://github.com/hey-api/openapi-ts/pull/3451)) +- **client**: support async `createClientConfig` ([#3445](https://github.com/hey-api/openapi-ts/pull/3445)) +- **client(@hey-api/nuxt)**: do not unwrap blob values ([#3459](https://github.com/hey-api/openapi-ts/pull/3459)) + +--- + +## 2026-02-24 + +### @hey-api/openapi-ts 0.93.0 + +#### Core +- **input**: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) +- **input**: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) +- **output**: apply `output.header` to bundled files ([#3438](https://github.com/hey-api/openapi-ts/pull/3438)) +- **parser**: add `patch.input` and shorthand `patch` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) +- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) +- **parser**: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) +- **parser**: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) +- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) +- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) + +#### valibot +###### Changed +- **valibot**: remove `enum.nodes.nullable` resolver node ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) +- **valibot**: use `.nullable` and `.nullish` methods ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) + +#### zod +###### Changed +- **zod**: remove `enum.nodes.nullable` resolver node ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) +- **zod**: use `.nullable` and `.nullish` methods ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) + +- **client**: expose `onRequest` in RequestOptions for SSE request interception ([#3392](https://github.com/hey-api/openapi-ts/pull/3392)) +- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) +- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) +- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) + +--- + +### @hey-api/json-schema-ref-parser 1.3.1 + +### Fixed +- **input**: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) +- **parser**: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) + +### Changed +- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) + +--- + +### @hey-api/shared 0.2.1 + +### Added +- **parser**: add `patch.input` and shorthand `patch` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) +- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) +- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) + +### Fixed +- **input**: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) +- **parser**: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) + +### Changed +- **internal**: export schema walker interfaces ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) +- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) +- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) +- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) + +--- + +## 2026-02-13 + +### @hey-api/openapi-ts 0.92.4 + +#### Core +- **internal**: use shared schema processor ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) +- **output**: detect `importFileExtension` from tsconfig `module` option ([#3380](https://github.com/hey-api/openapi-ts/pull/3380)) + +#### @angular/common +###### Changed +- **@angular/common**: use generics for HttpRequests ([#3384](https://github.com/hey-api/openapi-ts/pull/3384)) + +#### @hey-api/client-nuxt +###### Fixed +- **@hey-api/client-nuxt**: forward `asyncDataOptions` to `useFetch` and `useLazyFetch` ([#3382](https://github.com/hey-api/openapi-ts/pull/3382)) +###### Changed +- **@hey-api/client-nuxt**: unwrap `ComputedRef` body before initial serialization ([#3361](https://github.com/hey-api/openapi-ts/pull/3361)) + +#### @hey-api/transformers +###### Fixed +- **@hey-api/transformers**: false positive warning for discriminated `oneOf` schemas ([#3379](https://github.com/hey-api/openapi-ts/pull/3379)) +- **@hey-api/transformers**: handle `$ref` keywords in `allOf` compositions ([#3374](https://github.com/hey-api/openapi-ts/pull/3374)) + +#### @hey-api/typescript +###### Fixed +- **@hey-api/typescript**: deduplicate enum keys to avoid name collision ([#3376](https://github.com/hey-api/openapi-ts/pull/3376)) + +--- + +### @hey-api/json-schema-ref-parser 1.3.0 + +### Changed +- **feat**: clean up dependencies ([#3386](https://github.com/hey-api/openapi-ts/pull/3386)) +- **fix**: pass seen references through crawl stack ([#3387](https://github.com/hey-api/openapi-ts/pull/3387)) + +--- + +### @hey-api/shared 0.2.0 + +### Changed +- **utils**: rename `isTopLevelComponentRef` to `isTopLevelComponent` ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) + +--- + +## 2026-02-05 + +### @hey-api/openapi-ts 0.92.2 + +(No parsed entries) + + +--- + +### @hey-api/openapi-ts 0.92.3 + +#### zod +###### Changed +- **zod**: use namespace import for zod v4 ([#3325](https://github.com/hey-api/openapi-ts/pull/3325)) + +--- + +### @hey-api/codegen-core 0.7.0 + +### ⚠️ Breaking +- **BREAKING:** **symbol**: replace `exportFrom` array with `getExportFromFilePath` function ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) + +--- + +### @hey-api/shared 0.1.2 + +### Added +- **parser**: add `getExportFromFilePath` hook ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) + +### Changed +- **config**: `includeInEntry` accepts function in addition to primitive value ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) +- **transform(read-write)**: improve discriminated schemas split ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) + +--- + +## 2026-01-30 + +### @hey-api/openapi-ts 0.91.1 + +(No parsed entries) + + +--- + +### @hey-api/codegen-core 0.6.1 + +### Fixed +- **planner**: fix duplicate import when same symbol is imported as both type and value ([#3291](https://github.com/hey-api/openapi-ts/pull/3291)) + +--- + +### @hey-api/shared 0.1.1 + +(No parsed entries) + + +--- + +## 2026-01-29 + +### @hey-api/openapi-ts 0.91.0 + +### ⚠️ Breaking +- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +--- + +### @hey-api/codegen-core 0.6.0 + +### ⚠️ Breaking +- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +--- + +### @hey-api/shared 0.1.0 + +### Changed +- **feat**: initial release ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +--- + +### @hey-api/types 0.1.3 + +### Added +- **types**: add `AnyString` utility type ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +--- + +## 2026-01-25 + +### @hey-api/openapi-ts 0.90.10 + +#### Core +- **parser**: inline deep path `$ref` references ([#3242](https://github.com/hey-api/openapi-ts/pull/3242)) + +#### @hey-api/sdk +###### Changed +- **@hey-api/sdk**: correctly map body keys in flat mode ([#3255](https://github.com/hey-api/openapi-ts/pull/3255)) + +#### @tanstack/angular-query-experimental +###### Changed +- **@tanstack/angular-query-experimental**: index mutation options symbol ([#3249](https://github.com/hey-api/openapi-ts/pull/3249)) + +#### @tanstack/react-query +###### Changed +- **@tanstack/react-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) + +#### @tanstack/solid-query +###### Changed +- **@tanstack/solid-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) + +#### @tanstack/svelte-query +###### Changed +- **@tanstack/svelte-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) + +#### @tanstack/vue-query +###### Changed +- **@tanstack/vue-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) + +--- + +## 2026-01-23 + +### @hey-api/openapi-ts 0.90.9 + +#### Core +- **cli**: clean up interface ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) +- **config**: move `loadConfigFile` function to `@hey-api/codegen-core` ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) + +- **ts-dsl**: allow removing object properties by passing `null` ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) +- **ts-dsl**: override object properties when called multiple times with the same name ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) + +--- + +### @hey-api/codegen-core 0.5.5 + +### Changed +- **config**: export `loadConfigFile` function (moved from `@hey-api/openapi-ts`) ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) + +--- + +### @hey-api/types 0.1.2 + +### Added +- feat: add `ToArray`, `ToReadonlyArray`, and `AnyObject` types ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) + +--- + +## 2026-01-22 + +### @hey-api/openapi-ts 0.90.7 + +- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) + +--- + +### @hey-api/openapi-ts 0.90.8 + +#### Core +- **cli**: do not show ascii logo on generate command ([#3238](https://github.com/hey-api/openapi-ts/pull/3238)) +- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) + +--- + +### @hey-api/codegen-core 0.5.3 + +### Changed +- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) + +--- + +### @hey-api/codegen-core 0.5.4 + +### Changed +- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) + +--- + +## 2026-01-21 + +### @hey-api/openapi-ts 0.90.6 + +#### @hey-api/sdk +###### Changed +- **@hey-api/sdk**: do not warn on mutualTLS security schemes ([#3227](https://github.com/hey-api/openapi-ts/pull/3227)) + +--- + +### @hey-api/types 0.1.1 + +### Changed +- Publish `@hey-api/types` so workspace packages can resolve it from npm. ([#3224](https://github.com/hey-api/openapi-ts/pull/3224)) + +--- + +## 2026-01-16 + +### @hey-api/openapi-ts 0.90.4 + +#### @hey-api/client-fetch +###### Fixed +- **@hey-api/client-fetch**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) + +#### @hey-api/client-ky +###### Fixed +- **@hey-api/client-ky**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) + +#### @hey-api/client-next +###### Fixed +- **@hey-api/client-next**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) + +#### valibot +###### Added +- **valibot**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) + +#### zod +###### Added +- **zod**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) + +--- + +## 2026-01-11 + +### @hey-api/openapi-ts 0.90.3 + +#### Core +- **output**: add `oxfmt` preset ([#3197](https://github.com/hey-api/openapi-ts/pull/3197)) + +--- + +## 2026-01-07 + +### @hey-api/openapi-ts 0.90.2 + +#### Core +- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) + +#### @hey-api/sdk +###### Fixed +- **@hey-api/sdk**: do not use bodySerializer if format is binary ([#3190](https://github.com/hey-api/openapi-ts/pull/3190)) + +--- + +### @hey-api/vite-plugin 0.2.1 + +### Changed +- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) + +--- + +### @hey-api/codegen-core 0.5.2 + +### Changed +- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) + +--- + +## 2026-01-04 + +### @hey-api/openapi-ts 0.90.1 + +#### Core +- **output**: add `source` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) + +#### @hey-api/sdk +###### Added +- **@hey-api/sdk**: add `examples` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) + +--- + +### @hey-api/codegen-core 0.5.1 + +### Changed +- **project**: expose `.plan` method ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) + +--- + +## 2026-01-03 + +### @hey-api/openapi-ts 0.90.0 + +### ⚠️ Breaking +- **valibot**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) +- **sdk**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +- **zod**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) +- **@angular/common**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +#### @angular/common +###### Breaking +- **@angular/common**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +#### @hey-api/client-angular +###### Changed +- **@hey-api/client-angular**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) + +#### @hey-api/client-axios +###### Changed +- **@hey-api/client-axios**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) + +#### @hey-api/client-fetch +###### Changed +- **@hey-api/client-fetch**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) + +#### @hey-api/client-ky +###### Changed +- **@hey-api/client-ky**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) + +#### @hey-api/client-next +###### Changed +- **@hey-api/client-next**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) + +#### @hey-api/client-nuxt +###### Changed +- **@hey-api/client-nuxt**: use serialized body in SSE requests ([#3123](https://github.com/hey-api/openapi-ts/pull/3123)) +- **@hey-api/client-nuxt**: preserve null in `WithRefs` type for nullable fields ([#3131](https://github.com/hey-api/openapi-ts/pull/3131)) + +#### sdk +###### Breaking +- **sdk**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +#### valibot +###### Breaking +- **valibot**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +#### zod +###### Breaking +- **zod**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) +###### Changed +- **zod**: expand support for bigint types ([#3145](https://github.com/hey-api/openapi-ts/pull/3145)) + +- **renderer**: correctly render default import ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +--- + +### @hey-api/codegen-core 0.5.0 + +### Changed +- **core**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +- **fix**: simplify symbol merging logic ([#3169](https://github.com/hey-api/openapi-ts/pull/3169)) +- **types**: document default values for `importKind` and `kind` ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +--- + +## 2025-12-20 + +### @hey-api/openapi-ts 0.89.2 + +#### @hey-api/client-axios +###### Changed +- **@hey-api/client-axios**: revert use `query` option when no `paramsSerializer` is provided ([#3125](https://github.com/hey-api/openapi-ts/pull/3125)) + +#### @hey-api/typescript +###### Changed +- **@hey-api/typescript**: improve type narrowing in discriminated types ([#3120](https://github.com/hey-api/openapi-ts/pull/3120)) + +--- + +## 2025-12-19 + +### @hey-api/openapi-ts 0.89.1 + +#### Core +- **output**: sanitize reserved names with underscore suffix instead of prefix ([#3102](https://github.com/hey-api/openapi-ts/pull/3102)) +- **output**: default to `.js` extension when module resolution is set to `node16` ([#3115](https://github.com/hey-api/openapi-ts/pull/3115)) +- **parser**: expose OpenAPI extension keywords ([#3119](https://github.com/hey-api/openapi-ts/pull/3119)) +- **parser**: improve discriminator support in nested `allOf` fields ([#3117](https://github.com/hey-api/openapi-ts/pull/3117)) + +#### @hey-api/client-axios +###### Changed +- **@hey-api/client-axios**: use `query` option when no `paramsSerializer` is provided ([#3062](https://github.com/hey-api/openapi-ts/pull/3062)) + +#### @hey-api/sdk +###### Changed +- **@hey-api/sdk**: lazily initialize sub-resources to improve performance ([#3099](https://github.com/hey-api/openapi-ts/pull/3099)) + +--- + +## 2025-12-11 + +### @hey-api/openapi-ts 0.89.0 + +#### Core +- **output**: add `preferExportAll` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) +- **output**: add `nameConflictResolver` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) +- **parser**: removed `symbol:setValue:*` events ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) + +--- + +### @hey-api/codegen-core 0.4.0 + +### Changed +- **symbols**: remove `placeholder` property ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) + +--- + +## 2025-12-10 + +### @hey-api/openapi-ts 0.88.2 + +No user-facing changes. + + +--- + +## 2025-12-08 + +### @hey-api/openapi-ts 0.88.1 + +- **@hey-api/sdk**: correctly map flat parameters ([#3047](https://github.com/hey-api/openapi-ts/pull/3047)) + +--- + +## 2025-11-20 + +### @hey-api/openapi-ts 0.88.0 + +#### Core +- **output**: use TypeScript DSL ([#2986](https://github.com/hey-api/openapi-ts/pull/2986)) + +--- + +## 2025-11-14 + +### @hey-api/openapi-ts 0.87.5 + +- **client-ofetch**: fix FormData boundary mismatch ([#2940](https://github.com/hey-api/openapi-ts/pull/2940)) + +--- + +## 2025-11-13 + +### @hey-api/openapi-ts 0.87.3 + +- **@tanstack/query**: add type annotations to `queryOptions` ([#2964](https://github.com/hey-api/openapi-ts/pull/2964)) +- **@tanstack/query**: prettier mutation options ([#2972](https://github.com/hey-api/openapi-ts/pull/2972)) +- **client-fetch**: intercept AbortError ([#2970](https://github.com/hey-api/openapi-ts/pull/2970)) +- **valibot**: allow generating custom pipes with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) +- **zod**: allow generating custom chains with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) + +--- + +### @hey-api/openapi-ts 0.87.4 + +- **valibot**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) +- **zod**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) + +--- + +## 2025-11-11 + +### @hey-api/openapi-ts 0.87.2 + +#### Core +- **output**: run lint before format ([#2937](https://github.com/hey-api/openapi-ts/pull/2937)) +- **parser**: merge `default` keyword with `$ref` in OpenAPI 3.1 ([#2946](https://github.com/hey-api/openapi-ts/pull/2946)) + +- **@pinia/colada**: correctly access instantiated SDKs ([#2942](https://github.com/hey-api/openapi-ts/pull/2942)) +- **@tanstack/query**: prettier query options ([#2947](https://github.com/hey-api/openapi-ts/pull/2947)) +- **clients**: add support for Ky client ([#2958](https://github.com/hey-api/openapi-ts/pull/2958)) +- **valibot**: use `.strictObject` instead of `.objectWithRest` when additional properties are not allowed ([#2945](https://github.com/hey-api/openapi-ts/pull/2945)) + +--- + +## 2025-11-07 + +### @hey-api/openapi-ts 0.87.1 + +- fix(typescript): remove legacy options ([#2929](https://github.com/hey-api/openapi-ts/pull/2929)) +- fix(tanstack-query): correctly access instantiated SDKs ([#2939](https://github.com/hey-api/openapi-ts/pull/2939)) + +--- + +## 2025-11-04 + +### @hey-api/openapi-ts 0.86.12 + +- fix(transformers): do not reference undefined transformers ([#2924](https://github.com/hey-api/openapi-ts/pull/2924)) +- fix(sdk): add `paramsStructure` option ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) +- fix(sdk): handle conflicts between method names and subclasses in class-based SDKs ([#2920](https://github.com/hey-api/openapi-ts/pull/2920)) +- bundled context types ([#2923](https://github.com/hey-api/openapi-ts/pull/2923)) + +--- + +### @hey-api/openapi-ts 0.87.0 + +- feat: remove legacy clients and plugins ([#2925](https://github.com/hey-api/openapi-ts/pull/2925)) + +--- + +### @hey-api/codegen-core 0.3.3 + +### Fixed +- remove most of readonly properties to allow mutating in place ([#2919](https://github.com/hey-api/openapi-ts/pull/2919)) +- update types ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) + +--- + +## 2025-10-31 + +### @hey-api/openapi-ts 0.86.10 + +- fix(parser): handle OpenAPI 2.0 body as JSON by default if not explicitly defined ([#2893](https://github.com/hey-api/openapi-ts/pull/2893)) + +--- + +### @hey-api/openapi-ts 0.86.11 + +- fix(types): use unique generic names in `PluginInstance` to avoid typing issues ([#2897](https://github.com/hey-api/openapi-ts/pull/2897)) + +--- + +### @hey-api/openapi-ts 0.86.9 + +- fix(valibot): handle `time` string format ([#2889](https://github.com/hey-api/openapi-ts/pull/2889)) +- gracefully handle errors in debug reports ([#2884](https://github.com/hey-api/openapi-ts/pull/2884)) +- refactor: replace plugin references with queries ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) + +--- + +### @hey-api/codegen-core 0.3.2 + +### Added +- feat: add `.query` method to symbol registry ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) + +--- + +## 2025-10-28 + +### @hey-api/openapi-ts 0.86.8 + +- fix(valibot): improve handling of additionalProperties type ([#2870](https://github.com/hey-api/openapi-ts/pull/2870)) + +--- + +## 2025-10-27 + +### @hey-api/openapi-ts 0.86.5 + +- fix(parser): write-only schema incorrectly used in response schemas ([#2850](https://github.com/hey-api/openapi-ts/pull/2850)) +- fix(cli): move cli script to typescript ([#2852](https://github.com/hey-api/openapi-ts/pull/2852)) + +--- + +### @hey-api/openapi-ts 0.86.6 + +- fix(transformers): revert function order to fix infinite cycle regression ([#2855](https://github.com/hey-api/openapi-ts/pull/2855)) + +--- + +### @hey-api/openapi-ts 0.86.7 + +- fix(types): export Operation type ([#2862](https://github.com/hey-api/openapi-ts/pull/2862)) + +--- + +## 2025-10-25 + +### @hey-api/openapi-ts 0.86.4 + +- feat(parser): pass tags to symbol meta ([#2845](https://github.com/hey-api/openapi-ts/pull/2845)) +- feat(clients): granular query parameter serialization strategy ([#2837](https://github.com/hey-api/openapi-ts/pull/2837)) + +--- + +## 2025-10-24 + +### @hey-api/openapi-ts 0.86.3 + +- feat(parser): add `events` hooks ([#2829](https://github.com/hey-api/openapi-ts/pull/2829)) +- fix(parser): writeOnly schema properties missing from request types in nested schemas ([#2793](https://github.com/hey-api/openapi-ts/pull/2793)) + +--- + +## 2025-10-23 + +### @hey-api/openapi-ts 0.86.2 + +- fix(validators): do not reference variables before they are declared ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) +- fix(renderer): allow duplicate names when one symbol is a type ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) + +--- + +### @hey-api/codegen-core 0.3.1 + +### Added +- feat: add `isRegistered` method to file and symbol registry ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) + +--- + +## 2025-10-20 + +### @hey-api/openapi-ts 0.86.1 + +- fix(client-axios): revert return error when axios request fails ([#2804](https://github.com/hey-api/openapi-ts/pull/2804)) + +--- + +## 2025-10-19 + +### @hey-api/openapi-ts 0.86.0 + +- feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) +- do not print error details if logs are set to silent ([#2776](https://github.com/hey-api/openapi-ts/pull/2776)) +- fix(client-axios): return error when axios request fails ([#2763](https://github.com/hey-api/openapi-ts/pull/2763)) + +--- + +### @hey-api/codegen-core 0.3.0 + +### Added +- feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) + +--- + +## 2025-10-13 + +### @hey-api/openapi-ts 0.85.2 + +- dynamically load c12 to work with cjs modules ([#2755](https://github.com/hey-api/openapi-ts/pull/2755)) +- fix(cli): detect watch mode with input array ([#2751](https://github.com/hey-api/openapi-ts/pull/2751)) + +--- + +## 2025-10-08 + +### @hey-api/openapi-ts 0.85.1 + +- fix(zod): allOf in array items being generated as union instead of intersection ([#2736](https://github.com/hey-api/openapi-ts/pull/2736)) + +--- + +## 2025-10-06 + +### @hey-api/openapi-ts 0.85.0 + +- feat: support multiple configurations ([#2602](https://github.com/hey-api/openapi-ts/pull/2602)) +- feat(config): add `output.importFileExtension` option ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) +- feat(pinia-colada): query options use `defineQueryOptions` ([#2610](https://github.com/hey-api/openapi-ts/pull/2610)) +- refactor(config): replace 'off' with null to disable options ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) + +--- + +## 2025-09-30 + +### @hey-api/openapi-ts 0.84.4 + +- fix(client-ofetch): add missing credentials property support ([#2710](https://github.com/hey-api/openapi-ts/pull/2710)) +- fix(config): do not override interactive config from CLI if defined in config file ([#2708](https://github.com/hey-api/openapi-ts/pull/2708)) +- fix(zod): correct schemas for numeric and boolean enums ([#2704](https://github.com/hey-api/openapi-ts/pull/2704)) + +--- + +## 2025-09-25 + +### @hey-api/openapi-ts 0.84.3 + +- fix(validators): escaping slashes in regular expressions ([#2692](https://github.com/hey-api/openapi-ts/pull/2692)) + +--- + +## 2025-09-24 + +### @hey-api/openapi-ts 0.84.2 + +- fix(parser): add `propertiesRequiredByDefault` transform option ([#2678](https://github.com/hey-api/openapi-ts/pull/2678)) +- fix(typescript): do not mark enums as types ([#2680](https://github.com/hey-api/openapi-ts/pull/2680)) + +--- + +## 2025-09-23 + +### @hey-api/openapi-ts 0.84.1 + +- feat: add `ofetch` client available as `@hey-api/client-ofetch` ([#2642](https://github.com/hey-api/openapi-ts/pull/2642)) +- fix(renderer): replace default import placeholder ([#2674](https://github.com/hey-api/openapi-ts/pull/2674)) + +--- + +## 2025-09-22 + +### @hey-api/openapi-ts 0.84.0 + +- feat: Symbol API +- fix(plugin): every plugin extends Plugin.Hooks interface ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) +- fix(renderer): group and sort imported modules +- fix(parser): expand schema deduplication by including validation constraints in type ID ([#2650](https://github.com/hey-api/openapi-ts/pull/2650)) +- fix(parser): bump support for OpenAPI 3.1.2 ([#2667](https://github.com/hey-api/openapi-ts/pull/2667)) +- fix(config): add `output.fileName` option ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) + +--- + +### @hey-api/codegen-core 0.2.0 + +### Added +- feat: Symbol API ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) + +--- + +## 2025-09-11 + +### @hey-api/openapi-ts 0.83.1 + +No user-facing changes. + + +--- + +## 2025-09-10 + +### @hey-api/openapi-ts 0.83.0 + +- feat: Symbol API +- feat(pinia-colada): remove `groupByTag` option + +--- + +### @hey-api/codegen-core 0.1.0 + +### Added +- feat: expand Symbol API ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) + +--- + +## 2025-09-07 + +### @hey-api/openapi-ts 0.82.5 + +- fix(client): `mergeHeaders` functions use `.forEach` instead of `.entries` ([#2585](https://github.com/hey-api/openapi-ts/pull/2585)) +- fix(client): move `getValidRequestBody` function to `client-core` ([#2605](https://github.com/hey-api/openapi-ts/pull/2605)) + +--- + +## 2025-09-05 + +### @hey-api/openapi-ts 0.82.4 + +- feat(pinia-colada): implicit `$fetch` for `client-nuxt` (hide `composable`) ([#2598](https://github.com/hey-api/openapi-ts/pull/2598)) +- fix(client): improve handling of plain text, falsy, and unserialized request bodies ([#2564](https://github.com/hey-api/openapi-ts/pull/2564)) +- fix(pinia-colada): optional `options` in mutation factory ([#2593](https://github.com/hey-api/openapi-ts/pull/2593)) +- fix(parser): improve $ref handling ([#2588](https://github.com/hey-api/openapi-ts/pull/2588)) + +--- + +## 2025-09-01 + +### @hey-api/nuxt 0.2.1 + +### Fixed +- update peer dependencies to be more permissible ([#2574](https://github.com/hey-api/openapi-ts/pull/2574)) + +--- + +## 2025-08-30 + +### @hey-api/openapi-ts 0.82.1 + +- Thanks @ixnas! - feat(typescript): add `typescript-const` to `enums.mode` for generating TypeScript enums as constants ([#2541](https://github.com/hey-api/openapi-ts/pull/2541)) +- Thanks @carson2222! - fix(parser): prune `required` array after removing properties ([#2556](https://github.com/hey-api/openapi-ts/pull/2556)) +- Thanks @jgoz! - fix(output): avoid appending `.gen` to file names multiple times when `output.clean` is `false` ([#2559](https://github.com/hey-api/openapi-ts/pull/2559)) + +--- + +## 2025-08-29 + +### @hey-api/openapi-ts 0.82.0 + +- Thanks @SebastiaanWouters! - feat(parser): add Hooks API ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) +- Thanks @mrlubos! - fix(client): pass fetch option to sse client ([#2542](https://github.com/hey-api/openapi-ts/pull/2542)) +- Thanks @SebastiaanWouters! - feat(plugin): add `@pinia/colada` plugin ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) +- Thanks @alexedme! - feat(client): added angular, axios, fetch, next & nuxt client type export for external typing purposes. ([#2535](https://github.com/hey-api/openapi-ts/pull/2535)) +- Thanks @carson2222! - fix(parser): improve handling multiple references to shared external variable ([#2544](https://github.com/hey-api/openapi-ts/pull/2544)) +- Thanks @volesen! - fix(client): improve empty response body handling ([#2519](https://github.com/hey-api/openapi-ts/pull/2519)) +- Thanks @josh-hemphill! - feat(plugin): add `@pinia/colada` plugin ([#1680](https://github.com/hey-api/openapi-ts/pull/1680)) +- Thanks @carson2222! - fix(parser): improve `readWrite` transformer splitting logic ([#2530](https://github.com/hey-api/openapi-ts/pull/2530)) +- Thanks @carson2222! - fix(parser): handle `patternProperties` in OpenAPI 3.1 ([#2523](https://github.com/hey-api/openapi-ts/pull/2523)) + +--- + +## 2025-08-24 + +### @hey-api/openapi-ts 0.81.1 + +- Thanks @mrlubos! - feat(typescript): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) +- Thanks @malcolm-kee! - fix(parser): correctly handle schema extending discriminated schema ([#2515](https://github.com/hey-api/openapi-ts/pull/2515)) +- Thanks @mrlubos! - fix(client): move sse functions into their own namespace ([#2513](https://github.com/hey-api/openapi-ts/pull/2513)) +- Thanks @mrlubos! - feat(validator): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) +- Thanks @mrlubos! - feat(parser): handle webhooks in OpenAPI 3.1 ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) + +--- + +## 2025-08-23 + +### @hey-api/openapi-ts 0.81.0 + +- Thanks @mrlubos! - feat(client): add support for server-sent events (SSE) ([#2510](https://github.com/hey-api/openapi-ts/pull/2510)) + +--- + +## 2025-08-21 + +### @hey-api/openapi-ts 0.80.16 + +- Thanks @mrlubos! - fix(client): Nuxt client receives raw body in request validators ([#2490](https://github.com/hey-api/openapi-ts/pull/2490)) +- Thanks @dracomithril! - fix(parser): deduplicate security schemas based on name ([#2479](https://github.com/hey-api/openapi-ts/pull/2479)) +- Thanks @mrlubos! - feat(parser): input supports Hey API Registry shorthand ([#2489](https://github.com/hey-api/openapi-ts/pull/2489)) +- Thanks @bombillazo! - feat(parser): input supports ReadMe API Registry with `readme:` prefix ([#2485](https://github.com/hey-api/openapi-ts/pull/2485)) +- Thanks @mrlubos! - feat(parser): input supports Scalar API Registry with `scalar:` prefix ([#2491](https://github.com/hey-api/openapi-ts/pull/2491)) + +--- + +### @hey-api/openapi-ts 0.80.17 + +- Thanks @max-scopp! - fix(client): Angular client correctly applies default GET method ([#2500](https://github.com/hey-api/openapi-ts/pull/2500)) + +--- + +### @hey-api/openapi-ts 0.80.18 + +- Thanks @malcolm-kee! - fix(parser): OpenAPI 3.1 parser handles multiple `type` values ([#2502](https://github.com/hey-api/openapi-ts/pull/2502)) + +--- + +## 2025-08-20 + +### @hey-api/openapi-ts 0.80.15 + +- Thanks @dracomithril! - fix(client): call `auth` function for every unique security `name` ([#2480](https://github.com/hey-api/openapi-ts/pull/2480)) +- Thanks @mrlubos! - fix(parser): cache parent to children nodes ([#2481](https://github.com/hey-api/openapi-ts/pull/2481)) + +--- + +## 2025-08-19 + +### @hey-api/openapi-ts 0.80.14 + +- Thanks @mrlubos! - fix(parser): cache visited graph nodes to boost performance ([#2475](https://github.com/hey-api/openapi-ts/pull/2475)) + +--- + +## 2025-08-18 + +### @hey-api/openapi-ts 0.80.12 + +- Thanks @bjornhenriksson! - fix(zod): add `dates.local` option to allow unqualified (timezone-less) datetimes ([#2467](https://github.com/hey-api/openapi-ts/pull/2467)) + +--- + +### @hey-api/openapi-ts 0.80.13 + +- Thanks @josstn! - fix(parser): handle non-ascii characters in discriminator ([#2471](https://github.com/hey-api/openapi-ts/pull/2471)) + +--- + +## 2025-08-16 + +### @hey-api/openapi-ts 0.80.11 + +- Thanks @mrlubos! - feat(client): add `@hey-api/client-angular` client ([#2452](https://github.com/hey-api/openapi-ts/pull/2452)) +- Thanks @max-scopp! - feat(plugin): add `@angular/common` plugin ([#2423](https://github.com/hey-api/openapi-ts/pull/2423)) + +--- + +## 2025-08-14 + +### @hey-api/openapi-ts 0.80.10 + +- Thanks @mrlubos! - fix(client): handle dates in formdata serializer ([#2438](https://github.com/hey-api/openapi-ts/pull/2438)) + +--- + +## 2025-08-13 + +### @hey-api/openapi-ts 0.80.9 + +- Thanks @flow96! - fix(sdk): handle infinite loop in nested operation IDs and tags with duplicate values ([#2426](https://github.com/hey-api/openapi-ts/pull/2426)) + +--- + +## 2025-08-11 + +### @hey-api/openapi-ts 0.80.8 + +- Thanks @mrlubos! - fix(client): add auto-generated header to client files ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) +- Thanks @mrlubos! - fix(client): correctly rename client files with nodenext bundler ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) +- Thanks @mrlubos! - fix(tanstack-query): set correct name for pagination parameters in infinite query options ([#2416](https://github.com/hey-api/openapi-ts/pull/2416)) + +--- + +## 2025-08-09 + +### @hey-api/openapi-ts 0.80.6 + +- Thanks @ahmedrowaihi! - feat(tanstack-query): support generating `meta` fields ([#2399](https://github.com/hey-api/openapi-ts/pull/2399)) +- Thanks @dovca! - feat(clients): pass raw `body` to interceptors, provide serialized body in `serializedBody` ([#2406](https://github.com/hey-api/openapi-ts/pull/2406)) +- Thanks @flow96! - fix(sdk): prevent infinite loop when a schema tag matches operation ID ([#2407](https://github.com/hey-api/openapi-ts/pull/2407)) + +--- + +### @hey-api/openapi-ts 0.80.7 + +- Thanks @Shinigami92! - fix(client): add `.gen` to client files ([#2396](https://github.com/hey-api/openapi-ts/pull/2396)) + +--- + +## 2025-08-07 + +### @hey-api/openapi-ts 0.80.5 + +- Thanks @mrclrchtr! - fix: resolve Yarn PnP compatibility issues with client bundle generation ([#2401](https://github.com/hey-api/openapi-ts/pull/2401)) + +--- + +## 2025-08-06 + +### @hey-api/openapi-ts 0.80.3 + +- Thanks @MaxwellAt! - fix(zod): improve handling of additional properties ([#2287](https://github.com/hey-api/openapi-ts/pull/2287)) + +--- + +### @hey-api/openapi-ts 0.80.4 + +- Thanks @ahmedrowaihi! - fix(tanstack-query): add `queryKeys.tags` and `infiniteQueryKeys.tags` options ([#2391](https://github.com/hey-api/openapi-ts/pull/2391)) + +--- + +## 2025-08-03 + +### @hey-api/openapi-ts 0.80.2 + +- Thanks @j-ibarra! - fix(transformers): add `typeTransformers` option allowing passing custom transform functions ([#2383](https://github.com/hey-api/openapi-ts/pull/2383)) +- Thanks @idbenami! - fix(client-axios): allow passing `AxiosInstance` into `axios` field ([#2382](https://github.com/hey-api/openapi-ts/pull/2382)) + +--- + +## 2025-07-24 + +### @hey-api/openapi-ts 0.80.1 + +- Thanks @Daschi1! - fix(valibot): expand support for `format: int64` ([#2344](https://github.com/hey-api/openapi-ts/pull/2344)) + +--- + +## 2025-07-23 + +### @hey-api/openapi-ts 0.80.0 + +- Thanks @mrlubos! - feat(zod): add support for Zod 4 and Zod Mini ([#2341](https://github.com/hey-api/openapi-ts/pull/2341)) + +--- + +## 2025-07-22 + +### @hey-api/openapi-ts 0.79.2 + +- Thanks @Le0Developer! - fix(typescript): add support for TypeID types ([#2034](https://github.com/hey-api/openapi-ts/pull/2034)) +- Thanks @alexvuka1! - fix(parser): respect `output.case` when generating operation id ([#2041](https://github.com/hey-api/openapi-ts/pull/2041)) + +--- + +## 2025-07-21 + +### @hey-api/openapi-ts 0.79.1 + +- Thanks @mrlubos! - fix: respect NO_INTERACTIVE and NO_INTERACTION environment variables ([#2336](https://github.com/hey-api/openapi-ts/pull/2336)) +- Thanks @mrlubos! - fix(client): update Axios headers types ([#2331](https://github.com/hey-api/openapi-ts/pull/2331)) +- Thanks @mrlubos! - fix: improve handlebars types for jsr compliance ([#2334](https://github.com/hey-api/openapi-ts/pull/2334)) +- Thanks @mrlubos! - fix(tanstack-query): set query key base url from options if defined ([#2333](https://github.com/hey-api/openapi-ts/pull/2333)) + +--- + +## 2025-07-20 + +### @hey-api/openapi-ts 0.79.0 + +- Thanks @mrlubos! - fix(typescript): removed `typescript+namespace` enums mode ([#2284](https://github.com/hey-api/openapi-ts/pull/2284)) + +--- + +## 2025-07-10 + +### @hey-api/openapi-ts 0.78.3 + +- Thanks @btmnk! - fix(client): improve types to pass `@total-typescript/ts-reset` rules ([#2290](https://github.com/hey-api/openapi-ts/pull/2290)) + +--- + +## 2025-07-07 + +### @hey-api/openapi-ts 0.78.2 + +- Thanks @j-ibarra! - fix(transformers): add `transformers` option allowing passing custom transform functions ([#2281](https://github.com/hey-api/openapi-ts/pull/2281)) + +--- + +## 2025-07-05 + +### @hey-api/openapi-ts 0.78.0 + +- Thanks @mrlubos! - feat(config): add `parser` options ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) +- `input.filters` moved to `parser.filters` +- `input.pagination` moved to `parser.pagination` +- `input.patch` moved to `parser.patch` +- `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL` +- `enumsCase` moved to `enums.case` +- `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull` +- `exportInlineEnums` moved to `parser.transforms.enums` +- `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled` +- `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name` +- `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name` +- Thanks @mrlubos! - fix(config): add `operations` option to `parser.patch` ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) + +--- + +### @hey-api/openapi-ts 0.78.1 + +- Thanks @mrlubos! - fix(valibot): properly handle array minLength and maxLength ([#2275](https://github.com/hey-api/openapi-ts/pull/2275)) +- Thanks @mrlubos! - fix(typescript): handle additionalProperties in propertyNames ([#2279](https://github.com/hey-api/openapi-ts/pull/2279)) +- Thanks @mrlubos! - fix(clients): annotate serializer return types ([#2277](https://github.com/hey-api/openapi-ts/pull/2277)) +- Thanks @mrlubos! - fix(zod): add `dates.offset` option ([#2280](https://github.com/hey-api/openapi-ts/pull/2280)) + +--- + +## 2025-06-25 + +### @hey-api/openapi-ts 0.77.0 + +- Thanks @mrlubos! - refactor(plugin): add `DefinePlugin` utility types ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) +- Thanks @mrlubos! - feat(sdk): update `validator` option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) +- Thanks @mrlubos! - fix(client): add requestValidator option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) + +--- + +## 2025-06-23 + +### @hey-api/openapi-ts 0.76.0 + +- Thanks @mrlubos! - feat(valibot): generate a single schema for requests ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) +- Thanks @mrlubos! - fix(parser): prefer JSON media type ([#2221](https://github.com/hey-api/openapi-ts/pull/2221)) +- Thanks @mrlubos! - fix(valibot): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) + +--- + +## 2025-06-22 + +### @hey-api/openapi-ts 0.75.0 + +- Thanks @mrlubos! - feat(parser): replace `plugin.subscribe` with `plugin.forEach` ([#2215](https://github.com/hey-api/openapi-ts/pull/2215)) +- Thanks @mrlubos! - feat(tanstack-query): add name and case options ([#2218](https://github.com/hey-api/openapi-ts/pull/2218)) +- `queryOptionsNameBuilder` renamed to `queryOptions` +- `infiniteQueryOptionsNameBuilder` renamed to `infiniteQueryOptions` +- `mutationOptionsNameBuilder` renamed to `mutationOptions` +- `queryKeyNameBuilder` renamed to `queryKeys` +- `infiniteQueryKeyNameBuilder` renamed to `infiniteQueryKeys` +- Thanks @mrlubos! - fix: make output pass stricter tsconfig configurations" ([#2219](https://github.com/hey-api/openapi-ts/pull/2219)) +- Thanks @mrlubos! - fix(validators): handle additional properties object when no other properties are defined ([#2213](https://github.com/hey-api/openapi-ts/pull/2213)) +- Thanks @mrlubos! - fix(parser): add `meta` and `version` options to input.patch ([#2216](https://github.com/hey-api/openapi-ts/pull/2216)) +- Thanks @mrlubos! - fix(cli): correctly detect watch mode ([#2210](https://github.com/hey-api/openapi-ts/pull/2210)) + +--- + +## 2025-06-19 + +### @hey-api/openapi-ts 0.74.0 + +- Thanks @mrlubos! - feat(zod): generate a single schema for requests ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) +- Thanks @Daschi1! - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format ([#2192](https://github.com/hey-api/openapi-ts/pull/2192)) +- Thanks @mrlubos! - fix(parser): do not mark schemas as duplicate if they have different format ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) + +--- + +## 2025-06-14 + +### @hey-api/openapi-ts 0.73.0 + +- Thanks @mrlubos! - feat: bundle `@hey-api/client-*` plugins ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) +- Thanks @mrlubos! - fix: respect logs setting if initialization fails ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) +- Thanks @mrlubos! - fix: export default pagination keywords ([#2170](https://github.com/hey-api/openapi-ts/pull/2170)) + +--- + +### @hey-api/nuxt 0.2.0 + +### Changed +- Thanks @mrlubos! - feat: remove `@hey-api/client-nuxt` dependency ([#2175](https://github.com/hey-api/openapi-ts/pull/2175)) + +--- + +## 2025-06-12 + +### @hey-api/openapi-ts 0.72.2 + +- Thanks @mrlubos! - fix(zod): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes ([#2163](https://github.com/hey-api/openapi-ts/pull/2163)) +- Thanks @mrlubos! - fix(tanstack-query): add name builder options for all generated artifacts ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) +- Thanks @mrlubos! - fix(parser): filter orphans only when there are some operations ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) +- Thanks @mrlubos! - fix(zod): support tuple types ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) +- Thanks @mrlubos! - fix(parser): set correct subscription context for plugins ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) + +--- + +## 2025-06-11 + +### @hey-api/openapi-ts 0.72.1 + +- Thanks @Joshua-hypt! - fix(zod): handle array union types ([#2159](https://github.com/hey-api/openapi-ts/pull/2159)) + +--- + +## 2025-06-10 + +### @hey-api/openapi-ts 0.72.0 + +- Thanks @mrlubos! - feat(sdk): add `classStructure` option supporting dot or slash `operationId` notation when generating class-based SDKs ([#2141](https://github.com/hey-api/openapi-ts/pull/2141)) +- Thanks @mrlubos! - fix: add crash report prompt ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) +- Thanks @mrlubos! - fix(parser): handle `propertyNames` keyword ([#2153](https://github.com/hey-api/openapi-ts/pull/2153)) +- Thanks @mrlubos! - fix(validators): correctly generate default value for `BigInt` ([#2152](https://github.com/hey-api/openapi-ts/pull/2152)) +- Thanks @mrlubos! - fix(typescript): handle nested inline objects with write/read only fields ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) + +--- + +## 2025-06-06 + +### @hey-api/openapi-ts 0.71.1 + +- Thanks @mrlubos! - fix(parser): skip schema if it's an array or tuple and its items don't have any matching readable or writable scopes ([#2139](https://github.com/hey-api/openapi-ts/pull/2139)) +- Thanks @mrlubos! - fix(parser): validate operationId keyword ([#2140](https://github.com/hey-api/openapi-ts/pull/2140)) +- Thanks @mrlubos! - fix(parser): respect exportFromIndex option when using legacy clients ([#2137](https://github.com/hey-api/openapi-ts/pull/2137)) + +--- + +## 2025-06-05 + +### @hey-api/openapi-ts 0.71.0 + +- Thanks @mrlubos! - fix(sdk): rename `serviceNameBuilder` to `classNameBuilder` ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) +- Thanks @johnny-mh! - feat(parser): allow patching specs with `input.patch` ([#2117](https://github.com/hey-api/openapi-ts/pull/2117)) +- Thanks @mrlubos! - fix(typescript): better detect enum namespace ([#2132](https://github.com/hey-api/openapi-ts/pull/2132)) +- Thanks @mrlubos! - feat(sdk): add `instance` option for instantiable SDKs ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) + +--- + +## 2025-06-04 + +### @hey-api/openapi-ts 0.70.0 + +- Thanks @mrlubos! - feat(sdk): add responseStyle option ([#2123](https://github.com/hey-api/openapi-ts/pull/2123)) +- Thanks @mrlubos! - fix(typescript): ensure generated enum uses unique namespace to avoid conflicts with non-enum declarations ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) +- Thanks @mrlubos! - fix(typescript): handle duplicate inline enum names ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) + +--- + +## 2025-06-02 + +### @hey-api/openapi-ts 0.69.2 + +- Thanks @mrlubos! - feat(parser): add validate_EXPERIMENTAL option ([#2110](https://github.com/hey-api/openapi-ts/pull/2110)) +- Thanks @mrlubos! - fix(validators): do not wrap regular expression in slashes if the pattern is already wrapped ([#2114](https://github.com/hey-api/openapi-ts/pull/2114)) +- Thanks @mrlubos! - fix(tanstack-query): create a shallow copy of queryKey in createInfiniteParams function ([#2115](https://github.com/hey-api/openapi-ts/pull/2115)) + +--- + +## 2025-05-30 + +### @hey-api/openapi-ts 0.69.1 + +- Thanks @mrlubos! - fix(valibot): use isoDate instead of date for date strings ([#2109](https://github.com/hey-api/openapi-ts/pull/2109)) +- Thanks @mrlubos! - fix(typescript): generates union of arrays when items use nested oneOf ([#2108](https://github.com/hey-api/openapi-ts/pull/2108)) +- Thanks @mrlubos! - fix(schema): nameBuilder can be a string ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) +- Thanks @mrlubos! - fix(sdk): serviceNameBuilder can be a function ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) + +--- + +## 2025-05-29 + +### @hey-api/openapi-ts 0.69.0 + +- Thanks @mrlubos! - feat(sdk): use responses/errors map instead of union ([#2094](https://github.com/hey-api/openapi-ts/pull/2094)) +- Thanks @mrlubos! - feat(validators): generate schemas for request parameters ([#2100](https://github.com/hey-api/openapi-ts/pull/2100)) +- Thanks @mrlubos! - feat(validators): generate schemas for request bodies ([#2099](https://github.com/hey-api/openapi-ts/pull/2099)) +- Thanks @mrlubos! - fix(sdk): skip spreading required headers when there are conflicting Content-Type headers ([#2097](https://github.com/hey-api/openapi-ts/pull/2097)) +- Thanks @mrlubos! - fix(pagination): improved schema resolver for parameters ([#2096](https://github.com/hey-api/openapi-ts/pull/2096)) + +--- + +## 2025-05-28 + +### @hey-api/openapi-ts 0.68.0 + +- Thanks @mrlubos! - feat: upgraded input filters ([#2072](https://github.com/hey-api/openapi-ts/pull/2072)) + +--- + +### @hey-api/openapi-ts 0.68.1 + +- Thanks @mrlubos! - fix(parser): add back support for regular expressions in input filters ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) +- Thanks @mrlubos! - fix(parser): extend input filters to handle reusable parameters and responses ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) + +--- + +## 2025-05-23 + +### @hey-api/nuxt 0.1.7 + +### Changed +- Updated dependencies []: + +--- + +## 2025-05-19 + +### @hey-api/openapi-ts 0.67.5 + +- Thanks @mrlubos! - fix(tanstack-query): add SDK function comments to TanStack Query output ([#2052](https://github.com/hey-api/openapi-ts/pull/2052)) +- Thanks @mrlubos! - fix(typescript): exclude $refs in readable/writable schemas when referenced schemas don't contain any readable/writable fields ([#2058](https://github.com/hey-api/openapi-ts/pull/2058)) +- Thanks @mrlubos! - fix(typescript): add enumsConstantsIgnoreNull option to skip nulls from generated JavaScript objects ([#2059](https://github.com/hey-api/openapi-ts/pull/2059)) + +--- + +## 2025-05-14 + +### @hey-api/nuxt 0.1.6 + +### Changed +- Updated dependencies []: + +--- + +## 2025-05-08 + +### @hey-api/openapi-ts 0.67.3 + +- Thanks @0xfurai! - fix: handle references to properties ([#2020](https://github.com/hey-api/openapi-ts/pull/2020)) + +--- + +## 2025-05-07 + +### @hey-api/openapi-ts 0.67.2 + +- Thanks @kennidenni! - fix: handle relative paths in client's `baseUrl` field ([#2023](https://github.com/hey-api/openapi-ts/pull/2023)) + +--- + +## 2025-05-04 + +### @hey-api/openapi-ts 0.67.0 + +- Thanks @mrlubos! - feat: respect `moduleResolution` value in `tsconfig.json` ([#2003](https://github.com/hey-api/openapi-ts/pull/2003)) +- Thanks @Liooo! - fix: make discriminator field required when used with `oneOf` keyword ([#2006](https://github.com/hey-api/openapi-ts/pull/2006)) +- Thanks @mrlubos! - fix: avoid including underscore for appended types (e.g. data, error, response) when preserving identifier case ([#2009](https://github.com/hey-api/openapi-ts/pull/2009)) + +--- + +### @hey-api/openapi-ts 0.67.1 + +- Thanks @mrlubos! - fix: do not use named imports from typescript module ([#2010](https://github.com/hey-api/openapi-ts/pull/2010)) + +--- + +## 2025-04-28 + +### @hey-api/openapi-ts 0.66.7 + +- Thanks @mrlubos! - fix: handle schemas with all write-only or read-only fields ([#1981](https://github.com/hey-api/openapi-ts/pull/1981)) +- Thanks @mrlubos! - fix: avoid generating duplicate operation ids when sanitizing input ([#1990](https://github.com/hey-api/openapi-ts/pull/1990)) +- Thanks @mrlubos! - fix: Zod schemas use .and instead of .merge ([#1991](https://github.com/hey-api/openapi-ts/pull/1991)) +- Thanks @ngalluzzo! - fix: correctly handle numeric property names with signs ([#1919](https://github.com/hey-api/openapi-ts/pull/1919)) +- Thanks @mrlubos! - fix: Zod plugin handles nullable enums ([#1984](https://github.com/hey-api/openapi-ts/pull/1984)) +- Thanks @mrlubos! - fix: handle discriminator with multiple mappings to the same schema ([#1986](https://github.com/hey-api/openapi-ts/pull/1986)) +- Thanks @mrlubos! - fix: Zod schemas with BigInt and min/max constraints ([#1980](https://github.com/hey-api/openapi-ts/pull/1980)) +- Thanks @mrlubos! - fix: correct path to nested plugin files when using exportFromIndex ([#1987](https://github.com/hey-api/openapi-ts/pull/1987)) +- Thanks @mrlubos! - fix: handle extended `$ref` with `type` keyword in OpenAPI 3.1 ([#1978](https://github.com/hey-api/openapi-ts/pull/1978)) +- Thanks @mrlubos! - fix: handle additionalProperties empty object as unknown instead of preserving an empty interface ([#1982](https://github.com/hey-api/openapi-ts/pull/1982)) + +--- + +## 2025-04-23 + +### @hey-api/openapi-ts 0.66.6 + +- Thanks @mrlubos! - fix: handle Zod circular reference ([#1971](https://github.com/hey-api/openapi-ts/pull/1971)) + +--- + +## 2025-04-17 + +### @hey-api/openapi-ts 0.66.5 + +- Thanks @devNameAsyraf! - fix: don't use JSON serializer for `application/octet-stream` ([#1951](https://github.com/hey-api/openapi-ts/pull/1951)) +- Thanks @sredni! - fix: repeat tuple type `maxItems` times ([#1938](https://github.com/hey-api/openapi-ts/pull/1938)) + +--- + +### @hey-api/nuxt 0.1.5 + +### Changed +- Thanks @a1mersnow! - fix: avoid duplicate definition of `@hey-api/client-nuxt` plugin ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) +- Thanks @a1mersnow! - fix: skip watch mode in prepare step ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) +- Updated dependencies []: + +--- + +## 2025-04-04 + +### @hey-api/openapi-ts 0.66.3 + +- Thanks @Freddis! - fix: handle nullable dates in transformers ([#1917](https://github.com/hey-api/openapi-ts/pull/1917)) + +--- + +## 2025-04-03 + +### @hey-api/openapi-ts 0.66.2 + +- Thanks @BogdanMaier! - fix: prevent crash when optional pagination field is missing ([#1913](https://github.com/hey-api/openapi-ts/pull/1913)) + +--- + +## 2025-04-02 + +### @hey-api/openapi-ts 0.66.1 + +- Thanks @mrlubos! - fix: exclude and include expressions can be an array ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) +- Thanks @mrlubos! - fix: support excluding deprecated fields with '@deprecated' ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) + +--- + +## 2025-04-01 + +### @hey-api/openapi-ts 0.66.0 + +- Thanks @mrlubos! - feat: support read-only and write-only properties ([#1896](https://github.com/hey-api/openapi-ts/pull/1896)) + +--- + +## 2025-03-31 + +### @hey-api/openapi-ts 0.65.0 + +- Thanks @mrlubos! - feat: support custom clients ([#1889](https://github.com/hey-api/openapi-ts/pull/1889)) +- Thanks @mrlubos! - fix: allow passing fetch options to the request resolving a specification ([#1892](https://github.com/hey-api/openapi-ts/pull/1892)) +- Thanks @Matsuuu! - feat: ability to disable writing a log file via a `--no-log-file` flag or `logs.file` = `false` ([#1877](https://github.com/hey-api/openapi-ts/pull/1877)) + +--- + +### @hey-api/nuxt 0.1.4 + +### Changed +- Updated dependencies []: + +--- + +## 2025-03-26 + +### @hey-api/openapi-ts 0.64.14 + +- Thanks @john-cremit! - feat: allow customizing pagination keywords using `input.pagination.keywords` ([#1827](https://github.com/hey-api/openapi-ts/pull/1827)) + +--- + +### @hey-api/openapi-ts 0.64.15 + +- Thanks @kelnos! - feat: add support for cookies auth ([#1850](https://github.com/hey-api/openapi-ts/pull/1850)) + +--- + +### @hey-api/nuxt 0.1.3 + +### Changed +- Updated dependencies []: + +--- + +## 2025-03-19 + +### @hey-api/vite-plugin 0.2.0 + +### Changed +- Thanks @mrlubos! - fix: initial release ([#1838](https://github.com/hey-api/openapi-ts/pull/1838)) + +--- + +## 2025-03-18 + +### @hey-api/openapi-ts 0.64.13 + +- Thanks @mrlubos! - fix: bump json-schema-ref-parser package ([#1822](https://github.com/hey-api/openapi-ts/pull/1822)) +- Thanks @mrlubos! - fix: allow config to be a function ([#1826](https://github.com/hey-api/openapi-ts/pull/1826)) + +--- + +### @hey-api/nuxt 0.1.2 + +### Changed +- Thanks @mrlubos! - fix: move @hey-api/openapi-ts to peerDependencies ([#1825](https://github.com/hey-api/openapi-ts/pull/1825)) +- Updated dependencies [, ]: + +--- + +## 2025-03-13 + +### @hey-api/openapi-ts 0.64.12 + +- Thanks @shemsiu! - Allow `scheme` property to be case-insensitive ([#1816](https://github.com/hey-api/openapi-ts/pull/1816)) + +--- + +### @hey-api/nuxt 0.1.1 + +### Changed +- Updated dependencies []: + +--- + +## 2025-03-12 + +### @hey-api/openapi-ts 0.64.11 + +- Thanks @mrlubos! - fix: support Hey API platform input arguments ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) +- Thanks @mrlubos! - fix: handle raw OpenAPI specification input ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) + +--- + +### @hey-api/nuxt 0.1.0 + +### Changed +- Thanks @mrlubos! - feat: initial release ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) +- Updated dependencies [, , ]: + +--- + +## 2025-03-04 + +### @hey-api/openapi-ts 0.64.10 + +- Thanks @mrlubos! - fix: don't throw on missing performance marks ([#1779](https://github.com/hey-api/openapi-ts/pull/1779)) +- Thanks @Schroedi! - fix: handle nested dates in transformers ([#1767](https://github.com/hey-api/openapi-ts/pull/1767)) + +--- + +## 2025-03-03 + +### @hey-api/openapi-ts 0.64.9 + +- Thanks @mrlubos! - docs: announce Hey API platform ([#1774](https://github.com/hey-api/openapi-ts/pull/1774)) + +--- + +## 2025-03-01 + +### @hey-api/openapi-ts 0.64.8 + +- Thanks @mrlubos! - fix: reduce minimum Node.js 22 version to 22.10.0 ([#1764](https://github.com/hey-api/openapi-ts/pull/1764)) + +--- + +## 2025-02-27 + +### @hey-api/openapi-ts 0.64.7 + +- Thanks @Matsuuu! - fix: Wrap the GET request in watch mode with try-catch to prevent crashes on no-head watch targets ([#1755](https://github.com/hey-api/openapi-ts/pull/1755)) + +--- + +## 2025-02-26 + +### @hey-api/openapi-ts 0.64.6 + +- Thanks @Matsuuu! - fix: Wrap HEAD request in a try-catch to prevent watch mode crashes on server reloads ([#1748](https://github.com/hey-api/openapi-ts/pull/1748)) + +--- + +## 2025-02-19 + +### @hey-api/openapi-ts 0.64.5 + +- Thanks @georgesmith46! - fix: correctly generate zod regex expressions when using patterns ([#1728](https://github.com/hey-api/openapi-ts/pull/1728)) + +--- + +## 2025-02-13 + +### @hey-api/openapi-ts 0.64.4 + +- Thanks @mrlubos! - fix: use relative path to custom config file if provided when resolving relative paths ([#1710](https://github.com/hey-api/openapi-ts/pull/1710)) + +--- + +## 2025-02-10 + +### @hey-api/openapi-ts 0.64.2 + +- Thanks @mrlubos! - fix: add exportFromIndex option to all plugins ([#1697](https://github.com/hey-api/openapi-ts/pull/1697)) +- Thanks @mrlubos! - fix: allow passing arbitrary values to SDK functions via `meta` field ([#1699](https://github.com/hey-api/openapi-ts/pull/1699)) +- Thanks @hunshcn! - sanitize "+" in uri to avoid plus in function name ([#1687](https://github.com/hey-api/openapi-ts/pull/1687)) + +--- + +### @hey-api/openapi-ts 0.64.3 + +- Thanks @mrlubos! - fix: correctly type default value for Nuxt client ([#1701](https://github.com/hey-api/openapi-ts/pull/1701)) + +--- + +## 2025-02-03 + +### @hey-api/openapi-ts 0.64.1 + +- Thanks @mrlubos! - fix: watch mode handles servers not exposing HEAD method for spec ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) +- Thanks @mrlubos! - fix: add watch.timeout option ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) + +--- + +## 2025-02-02 + +### @hey-api/openapi-ts 0.64.0 + +- Thanks @mrlubos! - feat: added `client.baseUrl` option ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) +- Thanks @mrlubos! - fix: make createConfig, CreateClientConfig, and Config accept ClientOptions generic ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) + +--- + +## 2025-01-30 + +### @hey-api/openapi-ts 0.63.1 + +- Thanks @mrlubos! - fix: update keywords in package.json ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) +- Thanks @mrlubos! - fix: add Next.js client ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) +- Thanks @mrlubos! - feat: support required client in SDK using sdk.client = false ([#1646](https://github.com/hey-api/openapi-ts/pull/1646)) +- Thanks @mrlubos! - fix: add support for openIdConnect auth flow ([#1648](https://github.com/hey-api/openapi-ts/pull/1648)) + +--- + +### @hey-api/openapi-ts 0.63.2 + +- Thanks @mrlubos! - fix: lower Node version requirements ([#1651](https://github.com/hey-api/openapi-ts/pull/1651)) + +--- + +## 2025-01-27 + +### @hey-api/openapi-ts 0.63.0 + +- Thanks @mrlubos! - feat: move clients to plugins ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) +- Thanks @mrlubos! - fix: move sdk.throwOnError option to client.throwOnError ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) +- Thanks @mrlubos! - fix: sdks import client from client.gen.ts instead of defining it inside the file ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) +- Thanks @mrlubos! - fix: throw if inferred plugin not found ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) + +--- + +## 2025-01-21 + +### @hey-api/openapi-ts 0.62.3 + +- Thanks @mrlubos! - fix: bundle clients from compiled index file ([#1600](https://github.com/hey-api/openapi-ts/pull/1600)) +- Thanks @mrlubos! - fix: generate correct response for text/plain content type ([#1594](https://github.com/hey-api/openapi-ts/pull/1594)) +- Thanks @mrlubos! - fix: do not use a body serializer on text/plain sdks ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) +- Thanks @mrlubos! - fix: support all oauth2 flows in sdk auth ([#1602](https://github.com/hey-api/openapi-ts/pull/1602)) +- Thanks @mrlubos! - fix: add null to valid bodySerializer types ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) + +--- + +## 2025-01-20 + +### @hey-api/openapi-ts 0.62.2 + +- Thanks @mrlubos! - fix: add support for Nuxt client ([#1519](https://github.com/hey-api/openapi-ts/pull/1519)) + +--- + +## 2025-01-15 + +### @hey-api/openapi-ts 0.62.1 + +- Thanks @mrlubos! - fix: generate bigint type instead of BigInt ([#1574](https://github.com/hey-api/openapi-ts/pull/1574)) +- Thanks @mrlubos! - fix: add ability to skip generating index file with output.indexFile ([#1572](https://github.com/hey-api/openapi-ts/pull/1572)) + +--- + +## 2025-01-14 + +### @hey-api/openapi-ts 0.62.0 + +- Thanks @mrlubos! - feat: change the default parser ([#1568](https://github.com/hey-api/openapi-ts/pull/1568)) +- Thanks @mrlubos! - fix: spread sdk options at the end to allow overriding generated values ([#1566](https://github.com/hey-api/openapi-ts/pull/1566)) + +--- + +## 2025-01-13 + +### @hey-api/openapi-ts 0.61.3 + +- Thanks @mrlubos! - fix: use z.coerce before calling z.bigint ([#1552](https://github.com/hey-api/openapi-ts/pull/1552)) + +--- + +## 2025-01-09 + +### @hey-api/openapi-ts 0.61.2 + +- Thanks @mrlubos! - fix: send GET request only on first spec fetch ([#1543](https://github.com/hey-api/openapi-ts/pull/1543)) + +--- + +## 2025-01-08 + +### @hey-api/openapi-ts 0.61.1 + +- Thanks @mrlubos! - fix: detect pagination in composite schemas with null type ([#1530](https://github.com/hey-api/openapi-ts/pull/1530)) +- Thanks @mrlubos! - fix: handle primitive constants in Zod and types ([#1535](https://github.com/hey-api/openapi-ts/pull/1535)) + +--- + +## 2025-01-06 + +### @hey-api/openapi-ts 0.61.0 + +### ⚠️ Breaking +- **BREAKING**: please update `@hey-api/client-*` packages to the latest version + +- Thanks @chriswiggins! - Add support for HTTP Bearer Authentication Scheme ([#1520](https://github.com/hey-api/openapi-ts/pull/1520)) +- Thanks @mrlubos! - feat: add OpenAPI 2.0 support to experimental parser ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) +- Thanks @mrlubos! - feat: add watch mode ([#1511](https://github.com/hey-api/openapi-ts/pull/1511)) +- Thanks @mrlubos! - fix: add support for long integers ([#1529](https://github.com/hey-api/openapi-ts/pull/1529)) +- Thanks @mrlubos! - fix: add `sdk.throwOnError` option ([#1512](https://github.com/hey-api/openapi-ts/pull/1512)) +- Thanks @mrlubos! - fix: preserve leading separators in enum keys ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) +- **BREAKING**: please update `@hey-api/client-*` packages to the latest version + +--- + +## 2024-12-20 + +### @hey-api/openapi-ts 0.60.1 + +- Thanks @mrlubos! - fix: handle indexed access checks ([#1468](https://github.com/hey-api/openapi-ts/pull/1468)) +- Thanks @mrlubos! - fix: zod: generate patterns and improve plain schemas ([#1469](https://github.com/hey-api/openapi-ts/pull/1469)) +- Thanks @mrlubos! - fix: add links to the experimental parser callouts ([#1471](https://github.com/hey-api/openapi-ts/pull/1471)) +- Thanks @mrlubos! - fix: update types for custom plugins so defineConfig does not throw ([#1462](https://github.com/hey-api/openapi-ts/pull/1462)) +- Thanks @mrlubos! - fix: export IR types ([#1464](https://github.com/hey-api/openapi-ts/pull/1464)) +- Thanks @mrlubos! - fix: export utils ([#1467](https://github.com/hey-api/openapi-ts/pull/1467)) +- Thanks @mrlubos! - fix: allow plugins to explicitly declare whether they should be re-exported from the index file ([#1457](https://github.com/hey-api/openapi-ts/pull/1457)) + +--- + +## 2024-12-18 + +### @hey-api/openapi-ts 0.60.0 + +- Thanks @mrlubos! - fix: require sdk.transformer to use generated transformers ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) +- Thanks @mrlubos! - fix: revert license to MIT ([#1447](https://github.com/hey-api/openapi-ts/pull/1447)) +- Thanks @mrlubos! - feat: Zod plugin generates response schemas ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) + +--- + +## 2024-12-12 + +### @hey-api/openapi-ts 0.59.2 + +- Thanks @mrlubos! - fix: generate querySerializer options for Axios client ([#1420](https://github.com/hey-api/openapi-ts/pull/1420)) +- Thanks @mrlubos! - fix: infer responseType in SDKs for axios client ([#1419](https://github.com/hey-api/openapi-ts/pull/1419)) +- Thanks @mrlubos! - feat: support oauth2 and apiKey security schemes ([#1409](https://github.com/hey-api/openapi-ts/pull/1409)) +- Thanks @mrlubos! - fix: zod plugin handles recursive schemas ([#1416](https://github.com/hey-api/openapi-ts/pull/1416)) + +--- + +## 2024-12-07 + +### @hey-api/openapi-ts 0.59.1 + +- Thanks @mrlubos! - fix: prefix restricted identifier names with underscore ([#1398](https://github.com/hey-api/openapi-ts/pull/1398)) +- Thanks @mrlubos! - fix: disallow additional query parameters in experimental parser output ([#1394](https://github.com/hey-api/openapi-ts/pull/1394)) + +--- + +## 2024-12-05 + +### @hey-api/openapi-ts 0.59.0 + +- Thanks @mrlubos! - feat: add `logs.level` option ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +- Thanks @mrlubos! - feat: remove `@hey-api/schemas` from default plugins ([#1389](https://github.com/hey-api/openapi-ts/pull/1389)) +- Thanks @mrlubos! - fix: correctly resolve required properties in nested allOf composition ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) +- Thanks @mrlubos! - fix: add `--silent` or `-s` CLI option for silent log level ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +- Thanks @mrlubos! - fix: transformers handle allOf composition in experimental parser ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) +- Thanks @mrlubos! - feat: add `logs` configuration option to customize log directory ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +- Thanks @mrlubos! - fix: allow arbitrary object properties when additionalProperties is undefined ([#1390](https://github.com/hey-api/openapi-ts/pull/1390)) +- Thanks @mrlubos! - fix: support `DEBUG` environment variable ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) + +--- + +## 2024-12-02 + +### @hey-api/openapi-ts 0.58.0 + +- Thanks @mrlubos! - feat: add typescript.identifierCase option ([#1353](https://github.com/hey-api/openapi-ts/pull/1353)) +- Thanks @mrlubos! - fix: remove schemas and transformers re-exports from index.ts ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) +- Thanks @mrlubos! - feat: add output.clean option ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) +- Thanks @mrlubos! - feat: add typescript.enumsCase option ([#1362](https://github.com/hey-api/openapi-ts/pull/1362)) +- Thanks @mrlubos! - fix: add before and after to pagination keywords ([#1361](https://github.com/hey-api/openapi-ts/pull/1361)) +- Thanks @mrlubos! - fix: export Plugin API namespace ([#1368](https://github.com/hey-api/openapi-ts/pull/1368)) +- Thanks @mrlubos! - fix: TanStack Query plugin handles conflict with internal function name in experimental parser ([#1369](https://github.com/hey-api/openapi-ts/pull/1369)) + +--- + +## 2024-11-25 + +### @hey-api/openapi-ts 0.57.1 + +- Thanks @mrlubos! - fix: transformers correctly handle an array ([#1335](https://github.com/hey-api/openapi-ts/pull/1335)) +- Thanks @mrlubos! - fix: improve camelcase with abbreviated plurals ([#1332](https://github.com/hey-api/openapi-ts/pull/1332)) +- Thanks @mrlubos! - fix: experimental parser generates url inside data types ([#1333](https://github.com/hey-api/openapi-ts/pull/1333)) +- Thanks @mrlubos! - fix: experimental parser transforms anyOf date and null ([#1336](https://github.com/hey-api/openapi-ts/pull/1336)) +- Thanks @mrlubos! - fix: experimental parser handles empty string and null enum values in JavaScript mode ([#1330](https://github.com/hey-api/openapi-ts/pull/1330)) +- Thanks @mrlubos! - fix: experimental parser exports reusable request bodies ([#1340](https://github.com/hey-api/openapi-ts/pull/1340)) + +--- + +## 2024-11-22 + +### @hey-api/openapi-ts 0.57.0 + +- Thanks @mrlubos! - feat: rename Hey API plugins ([#1324](https://github.com/hey-api/openapi-ts/pull/1324)) +- Thanks @mrlubos! - feat: add typescript.exportInlineEnums option ([#1327](https://github.com/hey-api/openapi-ts/pull/1327)) +- Thanks @mrlubos! - fix: improve generated enum keys in experimental parser ([#1326](https://github.com/hey-api/openapi-ts/pull/1326)) + +--- + +## 2024-11-21 + +### @hey-api/openapi-ts 0.56.2 + +- Thanks @mrlubos! - fix: add input.exclude option ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) +- Thanks @mrlubos! - fix: make Zod plugin available in plugins options ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) + +--- + +### @hey-api/openapi-ts 0.56.3 + +- Thanks @mrlubos! - fix: Zod plugin handles value constraints and defaults ([#1319](https://github.com/hey-api/openapi-ts/pull/1319)) + +--- + +## 2024-11-19 + +### @hey-api/openapi-ts 0.56.1 + +- Thanks @mrlubos! - fix: gracefully handle invalid schema type in experimental parser ([#1309](https://github.com/hey-api/openapi-ts/pull/1309)) + +--- + +## 2024-11-18 + +### @hey-api/openapi-ts 0.56.0 + +- Thanks @jacobinu! - feat: add `fastify` plugin ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) +- Thanks @jacobinu! - fix: export a map of error and response types by status code ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) +- Thanks @jacobinu! - fix: deprecate types.tree option ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) +- Thanks @mrlubos! - fix: handle file-like content media type without explicit schema ([#1305](https://github.com/hey-api/openapi-ts/pull/1305)) + +--- + +## 2024-11-14 + +### @hey-api/openapi-ts 0.55.3 + +- Thanks @hougesen! - feat: add support for oxlint as linter ([#1283](https://github.com/hey-api/openapi-ts/pull/1283)) + +--- + +## 2024-11-11 + +### @hey-api/openapi-ts 0.55.2 + +- Thanks @mrlubos! - fix: update sponsorship links ([#1253](https://github.com/hey-api/openapi-ts/pull/1253)) +- Thanks @mrlubos! - fix: correctly generate array when items are a oneOf array with length 1 ([#1266](https://github.com/hey-api/openapi-ts/pull/1266)) +- Thanks @mrlubos! - fix: handle non-exploded array query parameters ([#1265](https://github.com/hey-api/openapi-ts/pull/1265)) +- Thanks @mrlubos! - fix: handle discriminators in experimental parser ([#1267](https://github.com/hey-api/openapi-ts/pull/1267)) + +--- + +## 2024-11-08 + +### @hey-api/openapi-ts 0.55.1 + +- Thanks @mrlubos! - fix: handle nullable enums in experimental parser ([#1248](https://github.com/hey-api/openapi-ts/pull/1248)) +- Thanks @mrlubos! - fix: add support for custom plugins ([#1251](https://github.com/hey-api/openapi-ts/pull/1251)) +- Thanks @mrlubos! - fix: render void for empty response status codes in experimental parser ([#1250](https://github.com/hey-api/openapi-ts/pull/1250)) + +--- + +## 2024-11-07 + +### @hey-api/openapi-ts 0.55.0 + +- Thanks @mrlubos! - feat: add input.include option ([#1241](https://github.com/hey-api/openapi-ts/pull/1241)) +- Thanks @mrlubos! - fix: handle pagination with basic refs ([#1239](https://github.com/hey-api/openapi-ts/pull/1239)) + +--- + +## 2024-11-06 + +### @hey-api/openapi-ts 0.54.3 + +- Thanks @mrlubos! - feat: add OpenAPI 3.0.x experimental parser ([#1230](https://github.com/hey-api/openapi-ts/pull/1230)) + +--- + +### @hey-api/openapi-ts 0.54.4 + +- Thanks @mrlubos! - fix: forbid any body, path, or query parameters if not defined in spec ([#1237](https://github.com/hey-api/openapi-ts/pull/1237)) +- Thanks @mrlubos! - fix: handle additionalProperties: boolean in experimental parser ([#1235](https://github.com/hey-api/openapi-ts/pull/1235)) +- Thanks @mrlubos! - fix: update schemas plugin to handle experimental 3.0.x parser ([#1233](https://github.com/hey-api/openapi-ts/pull/1233)) + +--- + +## 2024-11-02 + +### @hey-api/openapi-ts 0.54.2 + +- Thanks @mrlubos! - feat: add support for @tanstack/angular-query-experimental package ([#1222](https://github.com/hey-api/openapi-ts/pull/1222)) + +--- + +## 2024-10-29 + +### @hey-api/openapi-ts 0.54.1 + +- Thanks @mrlubos! - fix: ignore name option when not used with legacy clients to avoid producing broken output ([#1211](https://github.com/hey-api/openapi-ts/pull/1211)) +- Thanks @mrlubos! - fix: add support for OpenAPI 3.1.1 to experimental parser ([#1209](https://github.com/hey-api/openapi-ts/pull/1209)) + +--- + +## 2024-10-28 + +### @hey-api/openapi-ts 0.54.0 + +- Thanks @mrlubos! - feat: make plugins first-class citizens ([#1201](https://github.com/hey-api/openapi-ts/pull/1201)) + +--- + +## 2024-10-25 + +### @hey-api/openapi-ts 0.53.12 + +- Thanks @mrlubos! - fix: TanStack Query plugin using missing import for infinite query ([#1195](https://github.com/hey-api/openapi-ts/pull/1195)) +- Thanks @mrlubos! - fix: pass TanStack query signal to client call ([#1194](https://github.com/hey-api/openapi-ts/pull/1194)) + +--- + +## 2024-10-14 + +### @hey-api/openapi-ts 0.53.11 + +- Thanks @mrlubos! - fix: update website domain, add license documentation ([#1151](https://github.com/hey-api/openapi-ts/pull/1151)) + +--- + +## 2024-10-12 + +### @hey-api/openapi-ts 0.53.10 + +- Thanks @mrlubos! - fix: update license field in package.json to match the license, revert client packages license to MIT ([#1145](https://github.com/hey-api/openapi-ts/pull/1145)) + +--- + +## 2024-10-10 + +### @hey-api/openapi-ts 0.53.9 + +- Thanks @BierDav! - Add support for passing mutation specific options to `Mutation(options)` ([#1137](https://github.com/hey-api/openapi-ts/pull/1137)) + +--- + +## 2024-10-07 + +### @hey-api/openapi-ts 0.53.8 + +- Thanks @mrlubos! - fix: use correct relative path to bundled client when imported from nested module ([#1123](https://github.com/hey-api/openapi-ts/pull/1123)) + +--- + +## 2024-10-03 + +### @hey-api/openapi-ts 0.53.7 + +- Thanks @mrlubos! - fix: skip nested properties in oneOf and anyOf compositions ([#1113](https://github.com/hey-api/openapi-ts/pull/1113)) +- Thanks @mrlubos! - fix: abstract page params logic in TanStack Query plugin ([#1115](https://github.com/hey-api/openapi-ts/pull/1115)) + +--- + +## 2024-09-30 + +### @hey-api/openapi-ts 0.53.6 + +- Thanks @mrlubos! - fix: export spec-compliant OpenAPI 3.1 interface ([#1104](https://github.com/hey-api/openapi-ts/pull/1104)) +- Thanks @mrlubos! - fix: handle multiple form-data parameters in Swagger 2.0 ([#1108](https://github.com/hey-api/openapi-ts/pull/1108)) + +--- + +## 2024-09-26 + +### @hey-api/openapi-ts 0.53.5 + +- Thanks @mrlubos! - fix: make TanStack Query plugin work with class-based services ([#1096](https://github.com/hey-api/openapi-ts/pull/1096)) +- Thanks @mrlubos! - fix: avoid printing duplicate null nodes ([#1095](https://github.com/hey-api/openapi-ts/pull/1095)) +- Thanks @mrlubos! - fix: attach TanStack Query infinite page params only if they exist ([#1094](https://github.com/hey-api/openapi-ts/pull/1094)) + +--- + +## 2024-09-25 + +### @hey-api/openapi-ts 0.53.4 + +- Thanks @mrlubos! - fix: import handlebars instead of runtime ([#1087](https://github.com/hey-api/openapi-ts/pull/1087)) +- Thanks @mrlubos! - fix: support dynamic require in child_process ([#1086](https://github.com/hey-api/openapi-ts/pull/1086)) + +--- + +## 2024-09-22 + +### @hey-api/openapi-ts 0.53.3 + +- Thanks @mrlubos! - fix: properly handle dual publishing and type generation ([#1075](https://github.com/hey-api/openapi-ts/pull/1075)) + +--- + +## 2024-09-19 + +### @hey-api/openapi-ts 0.53.2 + +- Thanks @mrlubos! - fix: handle colon in operation path ([#1060](https://github.com/hey-api/openapi-ts/pull/1060)) +- Thanks @mrlubos! - fix: allow overriding generated headers from options ([#1065](https://github.com/hey-api/openapi-ts/pull/1065)) +- Thanks @mrlubos! - fix: export Operation interface ([#1068](https://github.com/hey-api/openapi-ts/pull/1068)) +- Thanks @mrlubos! - fix: handle named object property with no nested properties ([#1067](https://github.com/hey-api/openapi-ts/pull/1067)) +- Thanks @mrlubos! - fix: transform any-of nullable dates ([#1066](https://github.com/hey-api/openapi-ts/pull/1066)) + +--- + +## 2024-09-17 + +### @hey-api/openapi-ts 0.53.1 + +- Thanks @mrlubos! - fix: throw error on invalid client value ([#1050](https://github.com/hey-api/openapi-ts/pull/1050)) + +--- + +## 2024-09-04 + +### @hey-api/openapi-ts 0.53.0 + +- Thanks @mrlubos! - feat: rename legacy clients with 'legacy/' prefix ([#1008](https://github.com/hey-api/openapi-ts/pull/1008)) +- Thanks @mrlubos! - feat: change schemas name pattern, add schemas.name option ([#1009](https://github.com/hey-api/openapi-ts/pull/1009)) +- Thanks @jacobinu! - fix: make UserConfig interface instead of type ([#989](https://github.com/hey-api/openapi-ts/pull/989)) +- Thanks @mrlubos! - fix: set query key base url from supplied client if provided ([#1010](https://github.com/hey-api/openapi-ts/pull/1010)) + +--- + +## 2024-08-27 + +### @hey-api/openapi-ts 0.52.11 + +- Thanks @mrlubos! - fix: export query key functions from TanStack Query plugin ([#981](https://github.com/hey-api/openapi-ts/pull/981)) + +--- + +## 2024-08-26 + +### @hey-api/openapi-ts 0.52.10 + +- Thanks @jacobinu! - fix: handle tree-shakeable angular client case ([#973](https://github.com/hey-api/openapi-ts/pull/973)) + +--- + +## 2024-08-18 + +### @hey-api/openapi-ts 0.52.9 + +- Thanks @mrlubos! - fix: handle schemas with generics from C# ([#948](https://github.com/hey-api/openapi-ts/pull/948)) +- Thanks @mrlubos! - fix: rename infinite key in query key to \_infinite ([#949](https://github.com/hey-api/openapi-ts/pull/949)) +- Thanks @mrlubos! - chore: warn on duplicate operation ID ([#946](https://github.com/hey-api/openapi-ts/pull/946)) +- Thanks @mrlubos! - fix: correctly use parentheses around composed schemas ([#947](https://github.com/hey-api/openapi-ts/pull/947)) +- Thanks @mrlubos! - fix: correctly handle integer type in additional properties ([#944](https://github.com/hey-api/openapi-ts/pull/944)) + +--- + +## 2024-08-14 + +### @hey-api/openapi-ts 0.52.7 + +- Thanks @mrlubos! - fix: handle various issues with additionalProperties definitions ([#929](https://github.com/hey-api/openapi-ts/pull/929)) +- Thanks @mrlubos! - fix: update TanStack Query key to contain base URL ([#927](https://github.com/hey-api/openapi-ts/pull/927)) +- Thanks @mrlubos! - fix: change TanStack Query mutation helpers to functions for consistent API ([#927](https://github.com/hey-api/openapi-ts/pull/927)) + +--- + +### @hey-api/openapi-ts 0.52.8 + +- Thanks @mrlubos! - fix: cherry pick keys in mutation page param type ([#932](https://github.com/hey-api/openapi-ts/pull/932)) + +--- + +## 2024-08-13 + +### @hey-api/openapi-ts 0.52.6 + +- Thanks @mrlubos! - fix: add preview version of TanStack Query plugin ([#920](https://github.com/hey-api/openapi-ts/pull/920)) + +--- + +## 2024-08-12 + +### @hey-api/openapi-ts 0.52.5 + +- Thanks @mrlubos! - fix: throw if prerequisite checks are not met ([#910](https://github.com/hey-api/openapi-ts/pull/910)) +- Thanks @mrlubos! - fix: correctly transform string to pascalcase when referenced inside schema ([#907](https://github.com/hey-api/openapi-ts/pull/907)) +- Thanks @mrlubos! - fix: do not generate types tree by default if services are enabled as it is unused ([#908](https://github.com/hey-api/openapi-ts/pull/908)) + +--- + +## 2024-08-10 + +### @hey-api/openapi-ts 0.52.4 + +- Thanks @mrlubos! - fix: define ThrowOnError generic as the last argument ([#895](https://github.com/hey-api/openapi-ts/pull/895)) + +--- + +## 2024-08-08 + +### @hey-api/openapi-ts 0.52.3 + +- Thanks @mrlubos! - fix: generate ThrowOnError generic for class-based client methods ([#884](https://github.com/hey-api/openapi-ts/pull/884)) + +--- + +## 2024-08-07 + +### @hey-api/openapi-ts 0.52.2 + +- Thanks @hougesen! - fix: check if key is schema property before removing ([#881](https://github.com/hey-api/openapi-ts/pull/881)) + +--- + +## 2024-08-06 + +### @hey-api/openapi-ts 0.52.1 + +- Thanks @mrlubos! - fix: define multiple errors type as union instead of intersection ([#855](https://github.com/hey-api/openapi-ts/pull/855)) +- Thanks @mrlubos! - fix: remove Content-Type header with multipart/form-data content type ([#853](https://github.com/hey-api/openapi-ts/pull/853)) +- Thanks @qqilihq! - fix: Additional properties key ([#861](https://github.com/hey-api/openapi-ts/pull/861)) +- Thanks @SamuelGuillemet! - fix: add conditionnal generation for service related types ([#869](https://github.com/hey-api/openapi-ts/pull/869)) + +--- + +## 2024-08-01 + +### @hey-api/openapi-ts 0.52.0 + +- Thanks @LeeChSien! - feat: add namespace supporting for enums ([#835](https://github.com/hey-api/openapi-ts/pull/835)) +- Thanks @mrlubos! - fix: generate internal client for services when using standalone package ([#830](https://github.com/hey-api/openapi-ts/pull/830)) + +--- + +## 2024-07-28 + +### @hey-api/openapi-ts 0.51.0 + +- Thanks @mrlubos! - feat: make `client` config option required ([#828](https://github.com/hey-api/openapi-ts/pull/828)) +- Thanks @mrlubos! - fix: correctly process body parameter for OpenAPI 2.0 specs ([#823](https://github.com/hey-api/openapi-ts/pull/823)) +- Thanks @mrlubos! - fix: do not ignore api-version param in standalone clients ([#827](https://github.com/hey-api/openapi-ts/pull/827)) + +--- + +## 2024-07-26 + +### @hey-api/openapi-ts 0.50.2 + +- Thanks @mrlubos! - fix: handle fully illegal schema names ([#818](https://github.com/hey-api/openapi-ts/pull/818)) + +--- + +## 2024-07-24 + +### @hey-api/openapi-ts 0.50.1 + +- Thanks @mrlubos! - fix: generate types only for filtered services ([#807](https://github.com/hey-api/openapi-ts/pull/807)) +- Thanks @mrlubos! - fix: allow any key/value pair in object types with empty properties object ([#807](https://github.com/hey-api/openapi-ts/pull/807)) + +--- + +## 2024-07-21 + +### @hey-api/openapi-ts 0.50.0 + +- Thanks @mrlubos! - feat: allow bundling standalone clients with `client.bundle = true` ([#790](https://github.com/hey-api/openapi-ts/pull/790)) + +--- + +## 2024-07-17 + +### @hey-api/openapi-ts 0.49.0 + +- Thanks @mrlubos! - feat: allow filtering service endpoints with `services.filter` ([#787](https://github.com/hey-api/openapi-ts/pull/787)) +- Thanks @mrlubos! - fix: suffix illegal service names ([#784](https://github.com/hey-api/openapi-ts/pull/784)) +- Thanks @mrlubos! - fix: handle references to schemas with illegal names ([#786](https://github.com/hey-api/openapi-ts/pull/786)) +- Thanks @mrlubos! - fix: handle application/x-www-form-urlencoded content in request body ([#788](https://github.com/hey-api/openapi-ts/pull/788)) + +--- + +## 2024-07-15 + +### @hey-api/openapi-ts 0.48.3 + +- Thanks @mrlubos! - fix: use methodNameBuilder when asClass is false ([#781](https://github.com/hey-api/openapi-ts/pull/781)) +- Thanks @mrlubos! - fix: allow not generating types tree with types.tree = false ([#782](https://github.com/hey-api/openapi-ts/pull/782)) + +--- + +## 2024-07-04 + +### @hey-api/openapi-ts 0.48.2 + +- Thanks @mrlubos! - fix: handle formData parameters in generated types ([#746](https://github.com/hey-api/openapi-ts/pull/746)) +- Thanks @mrlubos! - fix: ignore services.asClass setting for named clients ([#742](https://github.com/hey-api/openapi-ts/pull/742)) +- Thanks @mrlubos! - fix: improve default response type detection ([#744](https://github.com/hey-api/openapi-ts/pull/744)) +- Thanks @mrlubos! - fix: handle properties in one-of composition ([#745](https://github.com/hey-api/openapi-ts/pull/745)) + +--- + +## 2024-07-01 + +### @hey-api/openapi-ts 0.48.1 + +- Thanks @mrlubos! - fix: generate service types when types are enabled, even if services are disabled ([#734](https://github.com/hey-api/openapi-ts/pull/734)) +- Thanks @mrlubos! - fix: support custom config file path ([#737](https://github.com/hey-api/openapi-ts/pull/737)) +- Thanks @mrlubos! - fix: handle async response transformers ([#736](https://github.com/hey-api/openapi-ts/pull/736)) + +--- + +## 2024-06-24 + +### @hey-api/openapi-ts 0.48.0 + +- Thanks @anchan828! - feat: pass the Operation object to methodNameBuilder ([#696](https://github.com/hey-api/openapi-ts/pull/696)) +- Thanks @mrlubos! - fix: make getHeaders accept generic ([#708](https://github.com/hey-api/openapi-ts/pull/708)) +- Thanks @mrlubos! - fix: handle void responses in transformers ([#712](https://github.com/hey-api/openapi-ts/pull/712)) + +--- + +## 2024-06-21 + +### @hey-api/openapi-ts 0.47.2 + +- Thanks @mrlubos! - feat: add initial implementation of prefixItems ([#701](https://github.com/hey-api/openapi-ts/pull/701)) + +--- + +## 2024-06-19 + +### @hey-api/openapi-ts 0.47.1 + +- Thanks @Nick-Lucas! - Fix an issue where transforms for endpoints with array returns were not generated correctly ([#690](https://github.com/hey-api/openapi-ts/pull/690)) + +--- + +## 2024-06-16 + +### @hey-api/openapi-ts 0.47.0 + +- Thanks @mrlubos! - feat: add initial support for response transformers (string -> Date) ([#685](https://github.com/hey-api/openapi-ts/pull/685)) +- Thanks @Stono! - Add support for customizing method names with `services.methodNameBuilder` ([#663](https://github.com/hey-api/openapi-ts/pull/663)) + +--- + +## 2024-05-27 + +### @hey-api/openapi-ts 0.46.3 + +- Thanks @SimenB! - Add explicit type annotations to `Interceptors` ([#594](https://github.com/hey-api/openapi-ts/pull/594)) +- Thanks @mrlubos! - fix: handle 1XX response status codes ([#635](https://github.com/hey-api/openapi-ts/pull/635)) +- Thanks @mrlubos! - fix: improve default response status code classification ([#636](https://github.com/hey-api/openapi-ts/pull/636)) + +--- + +## 2024-05-24 + +### @hey-api/openapi-ts 0.46.2 + +- do not transform property names for standalone clients ([#616](https://github.com/hey-api/openapi-ts/pull/616)) + +--- + +## 2024-05-23 + +### @hey-api/openapi-ts 0.46.1 + +- handle application/json content type in parameter definitions ([#614](https://github.com/hey-api/openapi-ts/pull/614)) + +--- + +## 2024-05-21 + +### @hey-api/openapi-ts 0.46.0 + +- feat: tree-shakeable services ([#602](https://github.com/hey-api/openapi-ts/pull/602)) + +--- + +## 2024-05-16 + +### @hey-api/openapi-ts 0.45.1 + +- use generated types in request object instead of inlined duplicated params ([#582](https://github.com/hey-api/openapi-ts/pull/582)) + +--- + +## 2024-05-15 + +### @hey-api/openapi-ts 0.45.0 + +- feat: remove client inference ([#569](https://github.com/hey-api/openapi-ts/pull/569)) +- deduplicate inlined enums ([#573](https://github.com/hey-api/openapi-ts/pull/573)) +- generate correct optional key in types when using positional arguments (useOptions: false) ([#572](https://github.com/hey-api/openapi-ts/pull/572)) + +--- + +## 2024-05-13 + +### @hey-api/openapi-ts 0.44.0 + +- feat: move format and lint config options to output object ([#546](https://github.com/hey-api/openapi-ts/pull/546)) +- comment position in JavaScript enums ([#544](https://github.com/hey-api/openapi-ts/pull/544)) +- export inlined enums from components ([#563](https://github.com/hey-api/openapi-ts/pull/563)) +- remove unused enums option from CLI ([#565](https://github.com/hey-api/openapi-ts/pull/565)) +- Support typescript in peerDependencies ([#551](https://github.com/hey-api/openapi-ts/pull/551)) + +--- + +## 2024-05-06 + +### @hey-api/openapi-ts 0.43.2 + +- deduplicate exported data and response types ([#538](https://github.com/hey-api/openapi-ts/pull/538)) + +--- + +## 2024-05-05 + +### @hey-api/openapi-ts 0.43.1 + +- use optional chaining in bin catch block ([#528](https://github.com/hey-api/openapi-ts/pull/528)) +- broken encoding ([#532](https://github.com/hey-api/openapi-ts/pull/532)) +- fix(parser): handle type array ([#533](https://github.com/hey-api/openapi-ts/pull/533)) + +--- + +## 2024-05-02 + +### @hey-api/openapi-ts 0.43.0 + +- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498)) +- negative numbers in numeric enums ([#470](https://github.com/hey-api/openapi-ts/pull/470)) +- escape keys in schemas starting with digit but containing non-digit characters ([#502](https://github.com/hey-api/openapi-ts/pull/502)) +- issue causing code to not generate (t.filter is not a function) ([#507](https://github.com/hey-api/openapi-ts/pull/507)) +- handle additional properties union ([#499](https://github.com/hey-api/openapi-ts/pull/499)) +- do not export inline enums ([#508](https://github.com/hey-api/openapi-ts/pull/508)) +- prefix parameter type exports to avoid conflicts ([#501](https://github.com/hey-api/openapi-ts/pull/501)) +- export operation data and response types ([#500](https://github.com/hey-api/openapi-ts/pull/500)) +- handle cases where packages are installed globally ([#471](https://github.com/hey-api/openapi-ts/pull/471)) +- handle cases where package.json does not exist ([#471](https://github.com/hey-api/openapi-ts/pull/471)) + +--- + +## 2024-04-22 + +### @hey-api/openapi-ts 0.42.1 + +- properly set formData and body when using options ([#461](https://github.com/hey-api/openapi-ts/pull/461)) + +--- + +## 2024-04-21 + +### @hey-api/openapi-ts 0.42.0 + +- feat: add support for biomejs as a formatter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- feat: move operationId config option to services object ([#441](https://github.com/hey-api/openapi-ts/pull/441)) +- feat: add operation error type mappings ([#442](https://github.com/hey-api/openapi-ts/pull/442)) +- feat: add support for biomejs as a linter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- feat: automatically handle dates in query string ([#443](https://github.com/hey-api/openapi-ts/pull/443)) +- do not destructure data when using use options ([#450](https://github.com/hey-api/openapi-ts/pull/450)) +- only remove core directory when export core is true ([#449](https://github.com/hey-api/openapi-ts/pull/449)) +- add jsdoc comments with use options ([#439](https://github.com/hey-api/openapi-ts/pull/439)) +- change: config option `lint: true` has changed to `lint: 'eslint'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- change: disable formatting with prettier by default ([#457](https://github.com/hey-api/openapi-ts/pull/457)) +- change: config option `format: true` has changed to `format: 'prettier'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) + +--- + +## 2024-04-19 + +### @hey-api/openapi-ts 0.41.0 + +- feat: add form type option for schemas ([#433](https://github.com/hey-api/openapi-ts/pull/433)) +- feat: replace useDateType with option in types object ([#435](https://github.com/hey-api/openapi-ts/pull/435)) +- feat: replace serviceResponse with option in services object ([#434](https://github.com/hey-api/openapi-ts/pull/434)) +- feat: replace postfixServices with configuration object ([#430](https://github.com/hey-api/openapi-ts/pull/430)) +- properly escape backticks in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) +- transform names of referenced types ([#422](https://github.com/hey-api/openapi-ts/pull/422)) +- use config interceptors passed to constructor when using named client ([#432](https://github.com/hey-api/openapi-ts/pull/432)) +- properly escape expressions in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) +- do not export common properties as schemas ([#424](https://github.com/hey-api/openapi-ts/pull/424)) + +--- + +## 2024-04-18 + +### @hey-api/openapi-ts 0.40.1 + +- revert to generating commonjs for esm and commonjs support ([#409](https://github.com/hey-api/openapi-ts/pull/409)) + +--- + +### @hey-api/openapi-ts 0.40.2 + +- unhandled SyntaxKind unknown when specification has numeric enums ([#417](https://github.com/hey-api/openapi-ts/pull/417)) + +--- + +## 2024-04-17 + +### @hey-api/openapi-ts 0.40.0 + +- feat: allow choosing naming convention for types ([#402](https://github.com/hey-api/openapi-ts/pull/402)) +- rename exportModels to types ([#402](https://github.com/hey-api/openapi-ts/pull/402)) +- rename models.gen.ts to types.gen.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) +- export enums from index.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) + +--- + +## 2024-04-16 + +### @hey-api/openapi-ts 0.39.0 + +- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363)) +- feat: add JSON-LD to content parsing ([#390](https://github.com/hey-api/openapi-ts/pull/390)) +- generate enums into their own file ([#358](https://github.com/hey-api/openapi-ts/pull/358)) +- remove file if no contents to write to it ([#373](https://github.com/hey-api/openapi-ts/pull/373)) +- eslint properly fixes output ([#375](https://github.com/hey-api/openapi-ts/pull/375)) +- invalid typescript Record generated with circular dependencies ([#374](https://github.com/hey-api/openapi-ts/pull/374)) +- prefer unknown type over any ([#392](https://github.com/hey-api/openapi-ts/pull/392)) +- only delete generated files instead of whole output directory ([#362](https://github.com/hey-api/openapi-ts/pull/362)) +- handle decoding models with `%` in description ([#360](https://github.com/hey-api/openapi-ts/pull/360)) +- throw error when typescript is missing ([#366](https://github.com/hey-api/openapi-ts/pull/366)) + +--- + +## 2024-04-11 + +### @hey-api/openapi-ts 0.38.0 + +- rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326)) +- generate constant size array types properly ([#345](https://github.com/hey-api/openapi-ts/pull/345)) +- support x-enumNames for custom enum names ([#334](https://github.com/hey-api/openapi-ts/pull/334)) +- export service types from single namespace ([#341](https://github.com/hey-api/openapi-ts/pull/341)) +- generate models with proper indentation when formatting is false ([#340](https://github.com/hey-api/openapi-ts/pull/340)) +- log errors to file ([#329](https://github.com/hey-api/openapi-ts/pull/329)) +- cleanup some styling issues when generating client without formatting ([#330](https://github.com/hey-api/openapi-ts/pull/330)) + +--- + +### @hey-api/openapi-ts 0.38.1 + +- inconsistent indentation in models file when not using `format: true` ([#349](https://github.com/hey-api/openapi-ts/pull/349)) +- output path no longer required to be within cwd ([#353](https://github.com/hey-api/openapi-ts/pull/353)) + +--- + +## 2024-04-09 + +### @hey-api/openapi-ts 0.36.1 + +- do not throw when failing to decode URI ([#296](https://github.com/hey-api/openapi-ts/pull/296)) + +--- + +### @hey-api/openapi-ts 0.36.2 + +- move service types into models file ([#292](https://github.com/hey-api/openapi-ts/pull/292)) + +--- + +### @hey-api/openapi-ts 0.37.0 + +- escape dollar sign in operation names ([#307](https://github.com/hey-api/openapi-ts/pull/307)) +- remove: `generics` as valid option for serviceResponse ([#299](https://github.com/hey-api/openapi-ts/pull/299)) + +--- + +### @hey-api/openapi-ts 0.37.1 + +- ensure strings with both single/double quotes and backticks are escaped properly ([#310](https://github.com/hey-api/openapi-ts/pull/310)) + +--- + +### @hey-api/openapi-ts 0.37.2 + +- escape schema names ([#317](https://github.com/hey-api/openapi-ts/pull/317)) +- escape backticks in strings starting with backtick ([#315](https://github.com/hey-api/openapi-ts/pull/315)) + +--- + +### @hey-api/openapi-ts 0.37.3 + +- do not ignore additionalProperties when object with properties object ([#323](https://github.com/hey-api/openapi-ts/pull/323)) + +--- + +## 2024-04-08 + +### @hey-api/openapi-ts 0.35.0 + +- fix(config): remove postfixModels option ([#266](https://github.com/hey-api/openapi-ts/pull/266)) +- fix(client): do not send default params ([#267](https://github.com/hey-api/openapi-ts/pull/267)) +- fix(api): use TypeScript Compiler API to create schemas ([#271](https://github.com/hey-api/openapi-ts/pull/271)) +- fix(client): export APIResult when using serviceResponse as 'response' ([#283](https://github.com/hey-api/openapi-ts/pull/283)) +- fix(parser): use only isRequired to determine if field is required ([#264](https://github.com/hey-api/openapi-ts/pull/264)) + +--- + +### @hey-api/openapi-ts 0.36.0 + +- feat: export schemas directly from OpenAPI specification (ie. support exporting JSON schemas draft 2020-12 ([#285](https://github.com/hey-api/openapi-ts/pull/285)) +- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288)) + +--- + +## 2024-04-04 + +### @hey-api/openapi-ts 0.34.2 + +- fix(config): support ts config files and `defineConfig` syntax +- docs(readme): update broken contributing link ([#236](https://github.com/hey-api/openapi-ts/pull/236)) + +--- + +### @hey-api/openapi-ts 0.34.3 + +- fix(docs): link to docs hosted on vercel ([#244](https://github.com/hey-api/openapi-ts/pull/244)) + +--- + +### @hey-api/openapi-ts 0.34.4 + +- fix(client): namespace service data types ([#246](https://github.com/hey-api/openapi-ts/pull/246)) + +--- + +### @hey-api/openapi-ts 0.34.5 + +- fix(client): access service data type in namespace properly ([#258](https://github.com/hey-api/openapi-ts/pull/258)) + +--- + +## 2024-04-03 + +### @hey-api/openapi-ts 0.34.0 + +- feat(client): generate all services in single `services.ts` file ([#215](https://github.com/hey-api/openapi-ts/pull/215)) +- feat(schema): add support for default values ([#197](https://github.com/hey-api/openapi-ts/pull/197)) +- feat(schema): add array of enum values for enums ([#197](https://github.com/hey-api/openapi-ts/pull/197)) +- fix(axios): use builtin form data to ensure blob form data works in node environment ([#211](https://github.com/hey-api/openapi-ts/pull/211)) +- fix(enum): append index number on duplicate name ([#220](https://github.com/hey-api/openapi-ts/pull/220)) + +--- + +### @hey-api/openapi-ts 0.34.1 + +- fix(docs): ensure README is shown on NPMJS ([#229](https://github.com/hey-api/openapi-ts/pull/229)) + +--- \ No newline at end of file diff --git a/docs/openapi-ts/community/contributing/developing.md b/docs/openapi-ts/community/contributing/developing.md index 2f7445d831..203e885793 100644 --- a/docs/openapi-ts/community/contributing/developing.md +++ b/docs/openapi-ts/community/contributing/developing.md @@ -54,3 +54,86 @@ This check is also run automatically in CI to ensure examples stay in sync with ::: tip Think of generated example code as snapshot tests - they should always reflect the current state of the code generator. ::: + +## Writing Changelogs + +We use [Changesets](https://github.com/changesets/changesets) to manage releases and generate changelogs. When contributing changes, create a changeset to document your updates. + +### Creating a Changeset + +Run the following command to create a new changeset: + +```bash +pnpm changeset +``` + +This will prompt you to: + +1. Select the packages that were changed +2. Choose the semver bump type (major, minor, or patch) +3. Write a summary of your changes + +### Changeset Format + +Changesets use the following format: + +```markdown +--- +'@hey-api/openapi-ts': patch +--- + +**scope**: description of changes +``` + +**Scopes:** + +- `cli`, `parser`, `output`, `config`, `input`, `internal`, `build`, `error` → Core section +- `plugin(name)` → Plugins section (e.g., `**plugin(zod)**:`, `**plugin(@hey-api/client-axios)**:`) +- Any other scope → Other section + +**Breaking Changes:** + +- Use `**BREAKING**:` prefix in the description to mark breaking changes +- For packages on v0.x (major version 0), minor bumps may include breaking changes. Use signal words like "removed", "renamed", or "changed signature" to indicate breaking changes. + +### Examples + +```markdown +# Bug fix + +--- + +## "@hey-api/openapi-ts": patch + +**parser**: fix explicit discriminator mapping +``` + +```markdown +# New feature + +--- + +## "@hey-api/openapi-ts": minor + +**plugin(zod)**: handle guid string format +``` + +```markdown +# Breaking change + +--- + +## "@hey-api/openapi-ts": minor + +**BREAKING**: removed deprecated `getClient()` function +``` + +```markdown +# Plugin change + +--- + +## "@hey-api/openapi-ts": patch + +**plugin(@hey-api/client-fetch)**: improve error handling +``` diff --git a/package.json b/package.json index cc18d3bee0..eb1a07066b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "type": "module", "scripts": { "build": "turbo run build", + "changelog:assemble": "tsx scripts/changelog/assemble/index.ts", + "changelog:release:notes": "tsx scripts/changelog/release/notes.ts", + "changelog:release:tag": "tsx scripts/changelog/release/tag.ts", "changeset": "changeset", "examples:check": "sh ./scripts/examples-check.sh", "examples:generate": "sh ./scripts/examples-generate.sh", diff --git a/scripts/changelog/assemble/grouper.ts b/scripts/changelog/assemble/grouper.ts new file mode 100644 index 0000000000..c49e520f4e --- /dev/null +++ b/scripts/changelog/assemble/grouper.ts @@ -0,0 +1,233 @@ +import { execSync } from 'node:child_process'; + +import { packageOrder } from '../config.js'; +import type { PackageChangelog } from './reader.js'; + +export interface ReleaseGroup { + date: string; + packages: Array<{ + content: string; + entries: Array; + hasUserFacingChanges: boolean; + name: string; + version: string; + }>; + tag: string; +} + +export interface ParsedEntry { + category: 'Breaking' | 'Added' | 'Fixed' | 'Changed'; + description: string; + prNumber: number | null; + scope: string | null; + section: 'Core' | 'Plugins' | 'Other'; +} + +interface TagInfo { + date: string; + package: string; + version: string; +} + +function getGitTags(): Array { + try { + const output = execSync('git tag --list', { encoding: 'utf-8' }); + const tags = output.split('\n').filter(Boolean); + + const result: Array = []; + for (const tag of tags) { + // Match pattern: @hey-api/package@version (e.g., @hey-api/openapi-ts@0.95.0) + const match = tag.match(/^@hey-api\/([^@]+)@(\d+\.\d+\.\d+)$/); + if (match) { + // Get tag date + const dateOutput = execSync(`git log -1 --format=%ci ${tag}`, { encoding: 'utf-8' }); + const date = dateOutput.trim().split(' ')[0]; // Get YYYY-MM-DD + + result.push({ + date, + package: `@hey-api/${match[1]}`, + version: match[2], + }); + } + } + + return result; + } catch { + return []; + } +} + +function parseEntryFromLine(line: string): ParsedEntry | null { + // Match changelog entry format: + // Old: - **scope**: description [#PR](url) [`commit`](url) by [@author](url) + // New: - **scope**: description (#PR) + + // Extract scope from **scope**: pattern + const scopeMatch = line.match(/^\s*-\s+\*\*([^:]+)\*\*:?\s*/); + const scope = scopeMatch ? scopeMatch[1] : null; + + // Get the content after the scope (or after dash for no-scope) + const contentMatch = scope + ? line.match(/^\s*-\s+\*\*[^:]+\*\*:?\s+(.+)$/) + : line.match(/^\s*-\s+(.+)$/); + + if (!contentMatch) return null; + + let content = contentMatch[1]; + + // Step 1: Extract PR number - look for patterns like [#1234](url) or (#1234) + let prNumber: number | null = null; + const prMatch1 = content.match(/\[#(\d+)\]\([^)]+\)/); + if (prMatch1) { + prNumber = parseInt(prMatch1[1], 10); + } else { + const prMatch2 = content.match(/\(#(\d+)\)/); + if (prMatch2) { + prNumber = parseInt(prMatch2[1], 10); + } + } + + // Step 2: Clean up in specific order + // A. Remove author patterns: " by [@user]" OR "[by @user](url)" OR " by [@user](url)" + content = content.replace(/\s+by\s+\[@[^\]]+\](?:\([^)]+\))?/gi, ''); + content = content.replace(/\[by\s+@[^\]]+\]\([^)]+\)/gi, ''); + + // B. Remove PR link patterns: [#PR](url) OR (#PR) + content = content.replace(/\[#\d+\]\([^)]+\)/g, ''); + content = content.replace(/\(\s*#\d+\s*\)/g, ''); + + // C. Remove commit patterns: [`commit`](url) OR `commit` + content = content.replace(/\[`[a-f0-9]+`\]\([^)]+\)/gi, ''); + content = content.replace(/`[a-f0-9]+`/gi, ''); + + // D. Remove any remaining markdown links keeping text + content = content.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1'); + + // E. Clean up: remove empty parentheses, whitespace, and leading punctuation + content = content.replace(/\(\s*\)/g, ''); // Remove empty () + content = content.replace(/\s+/g, ' ').trim(); + content = content.replace(/^[-:]\s*/, '').trim(); + + const description = content; + + // Filter out dependency-only entries (e.g., "- @hey-api/shared@0.3.0") + if (!scope && /^@hey-api\/[^@]+@\d+\.\d+\.\d+$/.test(description)) { + return null; + } + + if (!description) return null; + + // Detect section from scope + let section: 'Core' | 'Plugins' | 'Other' = 'Other'; + if (scope && /^plugin\(/.test(scope)) { + section = 'Plugins'; + } else if ( + scope && + [ + 'cli', + 'config', + 'error', + 'input', + 'internal', + 'output', + 'parser', + 'planner', + 'project', + 'symbols', + 'build', + ].includes(scope) + ) { + section = 'Core'; + } + + // Detect category from description keywords or scope + let category: 'Breaking' | 'Added' | 'Fixed' | 'Changed' = 'Changed'; + if (/BREAKING/i.test(description) || (scope && /BREAKING/i.test(scope))) { + category = 'Breaking'; + } else if (/^feat[\s:]/i.test(description) || /^(feat|add)\b/i.test(description)) { + category = 'Added'; + } else if (/^fix[\s:]/i.test(description) || /^fix\b/i.test(description)) { + category = 'Fixed'; + } + + return { category, description, prNumber, scope, section }; +} + +function extractEntries(content: string): Array { + const entries: Array = []; + const lines = content.split('\n'); + + for (const line of lines) { + const entry = parseEntryFromLine(line.trim()); + if (entry) { + entries.push(entry); + } + } + + return entries; +} + +export function groupByRelease(changelogs: Map): Array { + // Get all git tags with dates + const tags = getGitTags(); + + // Group tags by date + const dateGroups = new Map>(); + for (const tag of tags) { + if (!dateGroups.has(tag.date)) { + dateGroups.set(tag.date, []); + } + dateGroups.get(tag.date)!.push(tag); + } + + // Sort dates descending (newest first) + const sortedDates = Array.from(dateGroups.keys()).sort().reverse(); + + const releaseGroups: Array = []; + + for (const date of sortedDates) { + const tagsInGroup = dateGroups.get(date)!; + + // Sort packages by packageOrder + const sortedPackages = tagsInGroup + .sort((a, b) => { + const aIdx = packageOrder.indexOf(a.package as (typeof packageOrder)[number]); + const bIdx = packageOrder.indexOf(b.package as (typeof packageOrder)[number]); + return aIdx - bIdx; + }) + .filter((t) => packageOrder.includes(t.package as (typeof packageOrder)[number])); + + // Build package list from tags + const packages: ReleaseGroup['packages'] = []; + + for (const tagInfo of sortedPackages) { + const changelog = changelogs.get(tagInfo.package); + if (!changelog) continue; + + const versionData = changelog.versions.find((v) => v.version === tagInfo.version); + if (!versionData) continue; + + const entries = extractEntries(versionData.content); + + packages.push({ + content: versionData.content, + entries, + hasUserFacingChanges: versionData.hasUserFacingChanges, + name: tagInfo.package, + version: tagInfo.version, + }); + } + + if (packages.length > 0) { + // Generate tag from date + sequence (placeholder for release workflow) + releaseGroups.push({ + date, + packages, + // Placeholder - will be overridden by release tag + tag: `${date}.${packages.length}`, + }); + } + } + + return releaseGroups; +} diff --git a/scripts/changelog/assemble/index.ts b/scripts/changelog/assemble/index.ts new file mode 100644 index 0000000000..4e67d615c8 --- /dev/null +++ b/scripts/changelog/assemble/index.ts @@ -0,0 +1,225 @@ +import { writeFileSync } from 'node:fs'; + +import { groupByRelease, type ParsedEntry, type ReleaseGroup } from './grouper.js'; +import { readAllPackageChangelogs } from './reader.js'; + +const sectionOrder: Array<'Breaking' | 'Core' | 'Plugins' | 'Other'> = [ + 'Breaking', + 'Core', + 'Plugins', + 'Other', +]; + +const IS_OPENAPI_TS = '@hey-api/openapi-ts'; + +function transformScope(scope: string | null): string { + if (!scope) return ''; + if (scope.startsWith('plugin(') && scope.endsWith(')')) { + return scope.slice(7, -1); + } + return scope; +} + +function transformDescription(description: string): string { + return description.replace(/^fix:\s*/i, ''); +} + +function formatEntry(entry: ParsedEntry): string { + const parts: Array = []; + + const displayScope = entry.scope ? transformScope(entry.scope) : null; + const displayDescription = transformDescription(entry.description); + + if (displayScope) { + parts.push(`**${displayScope}**: ${displayDescription}`); + } else { + parts.push(displayDescription); + } + + if (entry.prNumber) { + parts.push( + `([#${entry.prNumber}](https://github.com/hey-api/openapi-ts/pull/${entry.prNumber}))`, + ); + } + + return `- ${parts.join(' ')}`; +} + +function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { + const lines: Array = []; + const useSections = pkg.name === IS_OPENAPI_TS; + + lines.push(`### @hey-api/${pkg.name.replace('@hey-api/', '')} ${pkg.version}`); + lines.push(''); + + if (!pkg.hasUserFacingChanges) { + lines.push('No user-facing changes.'); + lines.push(''); + return lines.join('\n'); + } + + if (pkg.entries.length === 0) { + lines.push('(No parsed entries)'); + lines.push(''); + return lines.join('\n'); + } + + const entriesByCategory: Map> = new Map(); + + for (const entry of pkg.entries) { + if (!entriesByCategory.has(entry.category)) { + entriesByCategory.set(entry.category, []); + } + entriesByCategory.get(entry.category)!.push(entry); + } + + const categoryOrder: Array = ['Breaking', 'Added', 'Fixed', 'Changed']; + + if (useSections) { + const sectionEntries: Map> = new Map(); + + for (const entry of pkg.entries) { + if (!sectionEntries.has(entry.section)) { + sectionEntries.set(entry.section, []); + } + sectionEntries.get(entry.section)!.push({ category: entry.category, entry }); + } + + const breakingEntries = entriesByCategory.get('Breaking') ?? []; + + if (breakingEntries.length > 0) { + lines.push('### ⚠️ Breaking'); + for (const entry of breakingEntries) { + lines.push(formatEntry(entry)); + } + lines.push(''); + } + + for (const section of sectionOrder) { + const entriesWithCategory = sectionEntries.get(section); + if (!entriesWithCategory?.length) continue; + + if (section === 'Plugins') { + const pluginEntries: Map< + string, + Array<{ category: string, entry: ParsedEntry; }> + > = new Map(); + + for (const { category, entry } of entriesWithCategory) { + const pluginName = transformScope(entry.scope); + if (!pluginEntries.has(pluginName)) { + pluginEntries.set(pluginName, []); + } + pluginEntries.get(pluginName)!.push({ category, entry }); + } + + const sortedPlugins = Array.from(pluginEntries.keys()).sort(); + + for (const pluginName of sortedPlugins) { + lines.push(`#### ${pluginName}`); + + const pluginCategoryEntries = pluginEntries.get(pluginName)!; + pluginCategoryEntries.sort((a, b) => { + const catOrder = { Added: 1, Breaking: 0, Changed: 3, Fixed: 2 }; + return ( + (catOrder[a.category as keyof typeof catOrder] ?? 3) - + (catOrder[b.category as keyof typeof catOrder] ?? 3) + ); + }); + + let lastCategory = ''; + for (const { category, entry } of pluginCategoryEntries) { + if (category !== lastCategory) { + lines.push(`###### ${category}`); + lastCategory = category; + } + lines.push(formatEntry(entry)); + } + + lines.push(''); + } + } else { + entriesWithCategory.sort((a, b) => { + const scopeA = a.entry.scope ? transformScope(a.entry.scope) : ''; + const scopeB = b.entry.scope ? transformScope(b.entry.scope) : ''; + const cmp = scopeA.localeCompare(scopeB); + if (cmp !== 0) return cmp; + const catOrder = { Added: 1, Breaking: 0, Changed: 3, Fixed: 2 }; + return ( + (catOrder[a.category as keyof typeof catOrder] ?? 3) - + (catOrder[b.category as keyof typeof catOrder] ?? 3) + ); + }); + + if (section === 'Breaking') { + lines.push('#### ⚠️ Breaking'); + } else if (section !== 'Other') { + lines.push(`#### ${section}`); + } + + for (const { entry } of entriesWithCategory) { + lines.push(formatEntry(entry)); + } + + lines.push(''); + } + } + } else { + for (const category of categoryOrder) { + const categoryEntries = entriesByCategory.get(category); + if (!categoryEntries?.length) continue; + + categoryEntries.sort((a, b) => { + const scopeA = a.scope ? transformScope(a.scope) : ''; + const scopeB = b.scope ? transformScope(b.scope) : ''; + return scopeA.localeCompare(scopeB); + }); + + if (category === 'Breaking') { + lines.push('### ⚠️ Breaking'); + } else { + lines.push(`### ${category}`); + } + + for (const entry of categoryEntries) { + lines.push(formatEntry(entry)); + } + + lines.push(''); + } + } + + return lines.join('\n').trim(); +} + +export function formatRootChangelog(releaseGroups: ReturnType): string { + const lines: Array = []; + + lines.push('# Changelog'); + lines.push(''); + + for (const group of releaseGroups) { + lines.push(`## ${group.date}`); + lines.push(''); + + for (const pkg of group.packages) { + lines.push(formatPackageBlock(pkg)); + lines.push(''); + lines.push('---'); + lines.push(''); + } + } + + return lines.join('\n').trim(); +} + +export async function assembleRootChangelog(): Promise { + const changelogs = readAllPackageChangelogs(); + const groups = groupByRelease(changelogs); + return formatRootChangelog(groups); +} + +export async function writeRootChangelog(): Promise { + const content = await assembleRootChangelog(); + writeFileSync('CHANGELOG.md', content, 'utf-8'); +} diff --git a/scripts/changelog/assemble/reader.ts b/scripts/changelog/assemble/reader.ts new file mode 100644 index 0000000000..2e20c70245 --- /dev/null +++ b/scripts/changelog/assemble/reader.ts @@ -0,0 +1,98 @@ +import { existsSync, readFileSync } from 'node:fs'; +import { join } from 'node:path'; + +import { packageOrder } from '../config.js'; + +export interface PackageChangelog { + package: string; + versions: Array<{ + content: string; + hasUserFacingChanges: boolean; + version: string; + }>; +} + +function extractVersionBlock(content: string): { + content: string; + hasUserFacingChanges: boolean; + version: string; +} | null { + // Match version header like "## 0.95.0" or "## @hey-api/openapi-ts 0.95.0" + const versionMatch = content.match(/^##\s+(?:@hey-api\/[^ ]+\s+)?(\d+\.\d+\.\d+)/m); + if (!versionMatch) return null; + + const version = versionMatch[1]; + const versionStart = content.indexOf(`##`); + + // Find next version header or end of file + const afterVersion = content.slice(versionStart + 2); + const nextVersionMatch = afterVersion.match(/^##\s+/m); + const nextVersionStart = nextVersionMatch + ? versionStart + 2 + (nextVersionMatch.index ?? 0) + : content.length; + + const blockContent = content.slice(versionStart, nextVersionStart).trim(); + + // Check for "Updated dependencies" only (no user-facing changes) + const hasUserFacingChanges = !( + blockContent.includes('### Updated Dependencies') && + !blockContent.match(/^##\s+[^#]*\n### (?!Updated Dependencies)/m) + ); + + return { content: blockContent, hasUserFacingChanges, version }; +} + +export function readPackageChangelog(packagePath: string): PackageChangelog | null { + const changelogPath = join(packagePath, 'CHANGELOG.md'); + + if (!existsSync(changelogPath)) { + return null; + } + + const content = readFileSync(changelogPath, 'utf-8'); + + // Skip the package title "# @hey-api/package-name" + const body = content.replace(/^#\s+@hey-api\/[^ ]+\n\n?/, ''); + + const versions: PackageChangelog['versions'] = []; + let remaining = body; + + while (remaining.trim()) { + const block = extractVersionBlock(remaining); + if (!block) break; + + versions.push(block); + + // Move past this block + const blockStart = remaining.indexOf(`## ${block.version}`); + const afterBlock = remaining.slice(blockStart + 2); + const nextVersionMatch = afterBlock.match(/^##\s+/m); + const nextStart = nextVersionMatch + ? blockStart + 2 + (nextVersionMatch.index ?? 0) + : remaining.length; + remaining = remaining.slice(nextStart); + } + + return { package: '', versions }; +} + +export function readAllPackageChangelogs(): Map { + const results = new Map(); + + for (const packageName of packageOrder) { + // Convert package name to path (e.g., @hey-api/openapi-ts -> packages/openapi-ts) + const packagePath = packageName.replace('@hey-api/', 'packages/'); + const changelog = readPackageChangelog(packagePath); + + if (changelog) { + changelog.package = packageName; + results.set(packageName, changelog); + } + } + + return results; +} + +export function getChangelogPath(packageName: string): string { + return packageName.replace('@hey-api/', 'packages/') + '/CHANGELOG.md'; +} diff --git a/scripts/changelog/breaking.ts b/scripts/changelog/breaking.ts new file mode 100644 index 0000000000..5e777ae8e3 --- /dev/null +++ b/scripts/changelog/breaking.ts @@ -0,0 +1,40 @@ +import { type SemverType, v0MinorBreakingSignals } from './config.js'; + +export interface ParsedChangeset { + description: string; + id: string; + isBreaking: boolean; + packages: Map; + prNumber: number | null; + rawScope: string | null; + summary: string; +} + +export function isBreakingChange(changeset: ParsedChangeset, packageVersion: string): boolean { + // Explicit BREAKING marker in content + if (changeset.isBreaking) { + return true; + } + + // Check all packages in changeset for their bump types + for (const [, semverType] of Array.from(changeset.packages.entries())) { + if (semverType === 'major') { + return true; + } + + // For v0 packages, minor bumps can be breaking + if (packageVersion.startsWith('0.')) { + if (semverType === 'minor') { + // Check for breaking signal words in description + const descLower = changeset.description.toLowerCase(); + for (const signal of v0MinorBreakingSignals) { + if (signal.test(descLower)) { + return true; + } + } + } + } + } + + return false; +} diff --git a/scripts/changelog/config.ts b/scripts/changelog/config.ts new file mode 100644 index 0000000000..66b6ecdc66 --- /dev/null +++ b/scripts/changelog/config.ts @@ -0,0 +1,43 @@ +export type SemverType = 'major' | 'minor' | 'patch'; + +export const packageOrder = [ + '@hey-api/openapi-ts', + '@hey-api/vite-plugin', + '@hey-api/nuxt', + '@hey-api/openapi-python', + '@hey-api/custom-client', + '@hey-api/json-schema-ref-parser', + '@hey-api/codegen-core', + '@hey-api/shared', + '@hey-api/types', + '@hey-api/spec-types', +] as const; + +export type PackageName = (typeof packageOrder)[number]; + +export const sectionMap: Record = { + build: 'Core', + cli: 'Core', + config: 'Core', + error: 'Core', + input: 'Core', + internal: 'Core', + output: 'Core', + parser: 'Core', +}; + +export const sectionPatterns: Array<[RegExp, string]> = [[/^plugin\(/, 'Plugins']]; + +export const sectionOrder = ['Breaking', 'Core', 'Plugins', 'Other'] as const; + +export const breakingPatterns = [/^BREAKING[:\s]/i, /\bBREAKING CHANGE\b/i]; + +export const v0MinorBreakingSignals = [/removed/i, /renamed/i, /changed.*signature/i, /breaking/i]; + +export const semverFallback: Record = { + major: 'Breaking', + minor: 'Added', + patch: 'Changed', +}; + +export const repo = 'hey-api/openapi-ts'; diff --git a/scripts/changelog/format.ts b/scripts/changelog/format.ts new file mode 100644 index 0000000000..f7f6409b58 --- /dev/null +++ b/scripts/changelog/format.ts @@ -0,0 +1,210 @@ +import type { SemverType } from './config.js'; +import { + breakingPatterns, + repo, + sectionMap, + sectionOrder, + sectionPatterns, + semverFallback, +} from './config.js'; + +export type Category = 'Breaking' | 'Added' | 'Fixed' | 'Changed'; + +export interface FormattedEntry { + category: Category; + description: string; + prNumber: number | null; + scope: string | null; + section: string; +} + +export function detectCategory( + changeset: { description: string; isBreaking: boolean }, + semverType: SemverType, +): Category { + // Explicit breaking + if (changeset.isBreaking) { + return 'Breaking'; + } + + // Check for explicit BREAKING in description + for (const pattern of breakingPatterns) { + if (pattern.test(changeset.description)) { + return 'Breaking'; + } + } + + // Fallback to semver + return semverFallback[semverType] as Category; +} + +export function detectSection(scope: string | null): string { + if (!scope) return 'Other'; + + // Check exact matches first + if (scope in sectionMap) { + return sectionMap[scope]; + } + + // Check patterns + for (const [pattern, section] of sectionPatterns) { + if (pattern.test(scope)) { + return section; + } + } + + return 'Other'; +} + +export function formatEntry( + changeset: { + description: string; + isBreaking: boolean; + packages: Map; + prNumber: number | null; + rawScope: string | null; + }, + packageName: string, +): FormattedEntry { + const semverType = changeset.packages.get(packageName) ?? 'patch'; + const category = detectCategory(changeset, semverType); + const section = detectSection(changeset.rawScope); + + return { + category, + description: changeset.description, + prNumber: changeset.prNumber, + scope: changeset.rawScope, + section, + }; +} + +export function entryToMarkdown(entry: FormattedEntry): string { + const parts: Array = []; + + if (entry.scope) { + parts.push(`**${entry.scope}**: ${entry.description}`); + } else { + parts.push(entry.description); + } + + if (entry.prNumber) { + parts.push(`([#${entry.prNumber}](https://github.com/${repo}/pull/${entry.prNumber}))`); + } + + return `- ${parts.join(' ')}`; +} + +export function groupEntriesBySection( + entries: Array, +): Map>> { + const grouped = new Map>>(); + + for (const entry of entries) { + if (!grouped.has(entry.section)) { + grouped.set(entry.section, new Map()); + } + const sectionGroup = grouped.get(entry.section)!; + + if (!sectionGroup.has(entry.category)) { + sectionGroup.set(entry.category, []); + } + sectionGroup.get(entry.category)!.push(entry); + } + + return grouped; +} + +export function formatVersionBlock( + packageName: string, + version: string, + entries: Array, +): string { + const grouped = groupEntriesBySection(entries); + const lines: Array = []; + + lines.push(`## ${packageName} ${version}`); + + // Process sections in configured order + for (const section of sectionOrder) { + const sectionEntries = grouped.get(section); + if (!sectionEntries) continue; + + // Process categories in order: Breaking, Added, Fixed, Changed + const categoryOrder: Array = ['Breaking', 'Added', 'Fixed', 'Changed']; + + for (const category of categoryOrder) { + const categoryEntries = sectionEntries.get(category); + if (!categoryEntries?.length) continue; + + // Skip empty Breaking category unless there are breaking changes + if (category === 'Breaking') { + lines.push('\n### ⚠️ Breaking'); + } else { + lines.push(`\n### ${category}`); + } + + for (const entry of categoryEntries) { + lines.push(entryToMarkdown(entry)); + } + } + } + + return lines.join('\n'); +} + +// Changesets integration +export async function getReleaseLine( + changeset: { releases?: Array<{ name: string; type: SemverType }>; summary: string }, + type: SemverType, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _options: { repo?: string }, +): Promise { + const { getInfoFromPullRequest } = await import('@changesets/get-github-info'); + + // Parse changeset summary + const summary = changeset.summary; + const prMatch = summary.match(/\(#(\d+)\)$/); + const prNumber = prMatch ? parseInt(prMatch[1], 10) : null; + + // Remove PR reference for clean output + const cleanSummary = summary.replace(/\s*\(#\d+\)$/, ''); + + // Parse scope from **scope**: format + const scopeMatch = cleanSummary.match(/^\*\*([^:]+)\*\*:?\s*(.*)$/); + const scope = scopeMatch ? scopeMatch[1] : null; + const description = scopeMatch ? scopeMatch[2] : cleanSummary; + + // Detect breaking + const isBreaking = + /^BREAKING[:\s]/i.test(cleanSummary) || /\bBREAKING CHANGE\b/i.test(cleanSummary); + + // Get semver type from changeset + const semverType = changeset.releases?.[0]?.type || type; + + const entry: FormattedEntry = { + category: detectCategory({ description, isBreaking }, semverType), + description, + prNumber, + scope, + section: detectSection(scope), + }; + + // Get PR info for links + if (prNumber) { + try { + const { links } = await getInfoFromPullRequest({ pull: prNumber, repo }); + const prLink = links?.pull ? ` ([${links.pull}])` : ''; + const entryCopy = { ...entry, prNumber: null }; + return entryToMarkdown(entryCopy) + prLink; + } catch { + return entryToMarkdown(entry); + } + } + + return entryToMarkdown(entry); +} + +export async function getDependencyReleaseLine(): Promise { + return ''; +} diff --git a/scripts/changelog/index.ts b/scripts/changelog/index.ts new file mode 100644 index 0000000000..c77c1834f8 --- /dev/null +++ b/scripts/changelog/index.ts @@ -0,0 +1,24 @@ +import type { ChangelogFunctions } from '@changesets/types'; + +import type { SemverType } from './config.js'; +import { getReleaseLine } from './format.js'; + +const changelogFunctions: ChangelogFunctions = { + getDependencyReleaseLine: async () => '', + getReleaseLine: async (changeset, type, options) => { + const semverType = (type === 'none' ? 'patch' : type) as SemverType; + return getReleaseLine( + { + releases: changeset.releases?.map((r) => ({ + name: r.name, + type: r.type === 'none' ? 'patch' : (r.type as SemverType), + })), + summary: changeset.summary, + }, + semverType, + options ?? {}, + ); + }, +}; + +export default changelogFunctions; diff --git a/scripts/changelog/parse.ts b/scripts/changelog/parse.ts new file mode 100644 index 0000000000..c660b874bc --- /dev/null +++ b/scripts/changelog/parse.ts @@ -0,0 +1,90 @@ +import { readFileSync } from 'node:fs'; + +import type { SemverType } from './config.js'; + +export interface ParsedChangeset { + description: string; + id: string; + isBreaking: boolean; + packages: Map; + prNumber: number | null; + rawScope: string | null; + summary: string; +} + +function parseFrontmatter(content: string): Map { + const packages = new Map(); + + const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/); + if (!frontmatterMatch) return packages; + + const lines = frontmatterMatch[1].split('\n'); + for (const line of lines) { + const match = line.match(/^"(@hey-api\/[^"]+)":\s*(major|minor|patch)/); + if (match) { + packages.set(match[1], match[2] as SemverType); + } + } + + return packages; +} + +function extractPrNumber(summary: string): number | null { + const match = summary.match(/\(#(\d+)\)$/); + return match ? parseInt(match[1], 10) : null; +} + +function parseSummary(summary: string): { + description: string; + isBreaking: boolean; + rawScope: string | null; +} { + // Handle **scope**: description format + const boldMatch = summary.match(/^\*\*([^:]+)\*\*:?\s*(.*)$/); + + if (boldMatch) { + const rawScope = boldMatch[1]; + const description = boldMatch[2]; + + // Check for BREAKING in the scope itself (e.g., **BREAKING**: ...) + const isBreaking = rawScope.toLowerCase().includes('breaking'); + + return { description, isBreaking, rawScope }; + } + + // No scope, just description + return { description: summary, isBreaking: false, rawScope: null }; +} + +export function parseChangesetContent(content: string, id: string): ParsedChangeset { + const packages = parseFrontmatter(content); + + // Remove frontmatter to get summary + const body = content.replace(/^---\n[\s\S]*?\n---/, '').trim(); + + // Get first line as summary (ignoring multi-line details for now) + const firstLine = body.split('\n')[0].trim(); + + const { description, isBreaking: scopeBreaking, rawScope } = parseSummary(firstLine); + const prNumber = extractPrNumber(firstLine); + + // Check for BREAKING in content itself + const hasBreakingKeyword = + /^BREAKING[:\s]/i.test(firstLine) || /\bBREAKING CHANGE\b/i.test(firstLine); + + return { + description, + id, + isBreaking: scopeBreaking || hasBreakingKeyword, + packages, + prNumber, + rawScope, + summary: firstLine, + }; +} + +export function parseChangeset(filepath: string): ParsedChangeset { + const content = readFileSync(filepath, 'utf-8'); + const id = filepath.split('/').pop()?.replace(/\.md$/, '') ?? ''; + return parseChangesetContent(content, id); +} diff --git a/scripts/changelog/release/contributors.ts b/scripts/changelog/release/contributors.ts new file mode 100644 index 0000000000..f5f3a0d565 --- /dev/null +++ b/scripts/changelog/release/contributors.ts @@ -0,0 +1,51 @@ +import { execSync } from 'node:child_process'; + +export interface Contributor { + prNumbers: Array; + username: string; +} + +const BOT_USERS = new Set([ + 'renovate[bot]', + 'dependabot[bot]', + 'github-actions[bot]', + 'copilot-swe-agent', +]); + +export async function extractContributors(prNumbers: Array): Promise> { + const contributorsMap = new Map>(); + + for (const pr of prNumbers) { + try { + // Use gh to get PR info (faster than hitting API directly) + const output = execSync(`gh pr view ${pr} --json author --jq '.author.login'`, { + encoding: 'utf-8', + }).trim(); + + if (output && !BOT_USERS.has(output)) { + const existing = contributorsMap.get(output) || []; + existing.push(pr); + contributorsMap.set(output, existing); + } + } catch { + // Skip PRs that can't be fetched + } + } + + return Array.from(contributorsMap.entries()).map(([username, prNumbers]) => ({ + prNumbers, + username, + })); +} + +export function formatContributors(contributors: Array): string { + if (contributors.length === 0) return ''; + + const names = contributors.map((c) => `@${c.username}`); + if (names.length === 1) { + return `Thanks to ${names[0]}!`; + } + + const last = names.pop(); + return `Thanks to ${names.join(', ')}, and ${last}!`; +} diff --git a/scripts/changelog/release/format.ts b/scripts/changelog/release/format.ts new file mode 100644 index 0000000000..9651e9c4a6 --- /dev/null +++ b/scripts/changelog/release/format.ts @@ -0,0 +1,112 @@ +import type { ReleaseGroup } from '../assemble/grouper.js'; +import { repo } from '../config.js'; +import type { Contributor } from './contributors.js'; + +export interface ReleaseNotes { + body: string; + tag: string; + title: string; +} + +function extractEntriesFromContent(content: string): Array { + const lines = content.split('\n'); + const entries: Array = []; + let currentEntry: Array = []; + let inCodeBlock = false; + + for (const line of lines) { + if (line.startsWith('```')) { + inCodeBlock = !inCodeBlock; + currentEntry.push(line); + continue; + } + + if (inCodeBlock) { + currentEntry.push(line); + continue; + } + + // Start of new section or version header + if (line.match(/^#{1,3}\s/)) { + if (currentEntry.length > 0) { + entries.push(currentEntry.join('\n').trim()); + currentEntry = []; + } + continue; + } + + // Bullet points are entries + if (line.match(/^-\s/) || line.match(/^\*\s/)) { + if (currentEntry.length > 0 && !currentEntry[currentEntry.length - 1].match(/^-\s/)) { + // Previous was description, save it + entries.push(currentEntry.join('\n').trim()); + currentEntry = []; + } + currentEntry.push(line); + } else if (currentEntry.length > 0) { + // Continuation of previous entry + currentEntry.push(line); + } + } + + if (currentEntry.length > 0) { + entries.push(currentEntry.join('\n').trim()); + } + + return entries; +} + +export function formatReleaseNotes( + releaseGroup: ReleaseGroup, + contributors: Array, +): ReleaseNotes { + const lines: Array = []; + + lines.push(`## ${releaseGroup.tag}`); + lines.push(''); + + // Filter out packages with no user-facing changes + const packagesWithChanges = releaseGroup.packages.filter((p) => p.hasUserFacingChanges); + + for (const pkg of packagesWithChanges) { + lines.push(`### @hey-api/${pkg.name.replace('@hey-api/', '')} ${pkg.version}`); + lines.push(''); + + // Extract entries from content + const entries = extractEntriesFromContent(pkg.content); + for (const entry of entries) { + // Skip section headers, keep only actual change entries + if (entry.includes('\n') || entry.startsWith('- ') || entry.startsWith('* ')) { + lines.push(entry); + lines.push(''); + } + } + + lines.push('---'); + lines.push(''); + } + + // Add contributors + if (contributors.length > 0) { + lines.push('## Contributors'); + lines.push(''); + // Just list contributors without PR numbers (cleaner for release notes) + const names = contributors.map((c) => `@${c.username}`); + if (names.length === 1) { + lines.push(`Thanks to ${names[0]}!`); + } else { + const last = names.pop(); + lines.push(`Thanks to ${names.join(', ')}, and ${last}!`); + } + lines.push(''); + } + + // Add link to full changelog + lines.push(`[Full changelog →](https://github.com/${repo}/blob/main/CHANGELOG.md)`); + + return { + body: lines.join('\n').trim(), + tag: releaseGroup.tag, + title: `Release ${releaseGroup.tag}`, + }; +} diff --git a/scripts/changelog/release/notes.ts b/scripts/changelog/release/notes.ts new file mode 100644 index 0000000000..e39b6f9e2d --- /dev/null +++ b/scripts/changelog/release/notes.ts @@ -0,0 +1,46 @@ +import { groupByRelease } from '../assemble/grouper.js'; +import { readAllPackageChangelogs } from '../assemble/reader.js'; +import { extractContributors } from './contributors.js'; +import { formatReleaseNotes } from './format.js'; + +async function getAllPrNumbers( + changelogs: ReturnType, +): Promise> { + const prNumbers = new Set(); + + for (const changelog of changelogs.values()) { + for (const version of changelog.versions) { + const matches = version.content.match(/#(\d+)/g); + if (matches) { + for (const match of matches) { + const num = parseInt(match.slice(1), 10); + if (!Number.isNaN(num)) { + prNumbers.add(num); + } + } + } + } + } + + return Array.from(prNumbers); +} + +export async function generateReleaseNotes(): Promise { + const changelogs = readAllPackageChangelogs(); + const groups = groupByRelease(changelogs); + + if (groups.length === 0) { + return 'No releases found.'; + } + + // Get the latest release + const latest = groups[0]; + + // Get all PR numbers from the latest release for contributor extraction + const prNumbers = await getAllPrNumbers(changelogs); + const contributors = await extractContributors(prNumbers); + + const release = formatReleaseNotes(latest, contributors); + + return release.body; +} diff --git a/scripts/changelog/release/tag.ts b/scripts/changelog/release/tag.ts new file mode 100644 index 0000000000..eba6ab1831 --- /dev/null +++ b/scripts/changelog/release/tag.ts @@ -0,0 +1,20 @@ +import { execSync } from 'node:child_process'; + +export async function generateReleaseTag(): Promise { + const today = new Date().toISOString().split('T')[0]; + + // Get all existing tags + const tagsOutput = execSync('git tag --list', { encoding: 'utf-8' }); + const tags = tagsOutput.split('\n').filter(Boolean); + + // Find tags matching today's date pattern (YYYY-MM-DD.N) + const todayTags = tags + .filter((tag) => tag.match(/^\d{4}-\d{2}-\d{2}\.\d+$/)) + .filter((tag) => tag.startsWith(today)) + .map((tag) => parseInt(tag.split('.')[1], 10)) + .filter((n) => !Number.isNaN(n)); + + const nextSequence = todayTags.length + 1; + + return `${today}.${nextSequence}`; +} From 5a8a52d40168bd33c138a7fd870e83be01a31396 Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 7 Apr 2026 05:21:02 +0200 Subject: [PATCH 2/2] chore: clean up --- .github/workflows/release.yml | 6 +- CHANGELOG.md | 4956 ++++++++++++++------- scripts/changelog/assemble/grouper.ts | 325 +- scripts/changelog/assemble/index.ts | 116 +- scripts/changelog/assemble/reader.ts | 136 +- scripts/changelog/breaking.ts | 3 +- scripts/changelog/config.ts | 60 +- scripts/changelog/format.ts | 6 +- scripts/changelog/index.ts | 4 +- scripts/changelog/parse.ts | 2 +- scripts/changelog/release/contributors.ts | 2 +- scripts/changelog/release/format.ts | 18 +- scripts/changelog/release/notes.ts | 21 +- 13 files changed, 3772 insertions(+), 1883 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce06bcaf74..e259b53193 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,12 +66,12 @@ jobs: run: pnpm changelog:release:notes > release-notes.md - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v2.6.1 with: - tag_name: ${{ steps.tag.outputs.tag }} - name: Release ${{ steps.tag.outputs.tag }} body_path: release-notes.md generate_release_notes: false + name: Release ${{ steps.tag.outputs.tag }} + tag_name: ${{ steps.tag.outputs.tag }} env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/CHANGELOG.md b/CHANGELOG.md index abc7a75f1f..bc06c7b637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2880 +1,4688 @@ # Changelog -## 2026-04-02 +# 2026-04-02 -### @hey-api/openapi-ts 0.95.0 +## @hey-api/openapi-ts 0.95.0 -#### Core -- **internal**: remove `plugin.getSymbol` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +### Core +- internal: remove `plugin.getSymbol()` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +### Removed `plugin.getSymbol()` function + +This function has been removed. You can use `plugin.querySymbol()` instead. It accepts the same arguments and returns the same result. + + +### Plugins #### @hey-api/client-angular -###### Fixed -- **@hey-api/client-angular**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) +- improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) #### @hey-api/client-axios -###### Fixed -- **@hey-api/client-axios**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) +- improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) #### @hey-api/client-fetch -###### Fixed -- **@hey-api/client-fetch**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) +- improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) #### @hey-api/client-ky -###### Fixed -- **@hey-api/client-ky**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) +- improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) #### @hey-api/client-next -###### Fixed -- **@hey-api/client-next**: improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) +- improve `beforeRequest` typing ([#3660](https://github.com/hey-api/openapi-ts/pull/3660)) #### @hey-api/sdk -###### Changed -- **@hey-api/sdk**: improve types for SSE events ([#3466](https://github.com/hey-api/openapi-ts/pull/3466)) +- improve types for SSE events ([#3466](https://github.com/hey-api/openapi-ts/pull/3466)) #### orpc -###### Fixed -- **orpc**: adjust input shape ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- adjust input shape ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) #### valibot -###### Changed -- **valibot**: remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) -- **valibot**: export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +### Validator request schemas + +Valibot plugin no longer exports composite request `Data` schemas. Instead, each layer is exported as a separate schema. If you're using validators with SDKs, you can preserve the composite schema with `shouldExtract`: + +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "sdk", + validator: "valibot", + }, + { + name: "valibot", + requests: { + shouldExtract: true, + }, + }, + ], +}; +``` + +- export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) #### zod -###### Changed -- **zod**: remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) -- **zod**: export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- remove request data schema ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +### Validator request schemas + +Zod plugin no longer exports composite request `Data` schemas. Instead, each layer is exported as a separate schema. If you're using validators with SDKs, you can preserve the composite schema with `shouldExtract`: + +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "sdk", + validator: "zod", + }, + { + name: "zod", + requests: { + shouldExtract: true, + }, + }, + ], +}; +``` + ---- +- export request body, path, query, and headers schemas ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) -### @hey-api/shared 0.3.0 +
+
+ +## @hey-api/shared 0.3.0 ### Added -- **plugins**: add request validator helpers ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- plugins: add request validator helpers ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) ### Changed -- **internal**: remove `plugin.getSymbol` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) +- internal: remove `plugin.getSymbol()` function ([#3671](https://github.com/hey-api/openapi-ts/pull/3671)) + +### Removed `plugin.getSymbol()` function + +This function has been removed. You can use `plugin.querySymbol()` instead. It accepts the same arguments and returns the same result. + +
+
---- +# 2026-03-20 -## 2026-03-20 +## @hey-api/openapi-ts 0.94.4 -### @hey-api/openapi-ts 0.94.4 +### Plugins #### orpc -###### Changed -- **orpc**: initial release ([#3264](https://github.com/hey-api/openapi-ts/pull/3264)) +- initial release ([#3264](https://github.com/hey-api/openapi-ts/pull/3264)) ---- +
+
-## 2026-03-19 +# 2026-03-19 -### @hey-api/openapi-ts 0.94.3 +## @hey-api/openapi-ts 0.94.3 -#### Core -- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) -- **output**: pass context as second argument in `module.resolve` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) -- **parser**: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) +### Core +- output: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) +- output: pass context as second argument in `module.resolve()` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) +- parser: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) + +### Plugins #### @hey-api/client-nuxt -###### Changed -- **@hey-api/client-nuxt**: preserve AbortSignal, FormData, and ReadableStream in unwrapRefs ([#3614](https://github.com/hey-api/openapi-ts/pull/3614)) +- preserve AbortSignal, FormData, and ReadableStream in unwrapRefs ([#3614](https://github.com/hey-api/openapi-ts/pull/3614)) #### @hey-api/transformers -###### Changed -- **@hey-api/transformers**: expose `plugin` and `$` in transformer function context ([#3610](https://github.com/hey-api/openapi-ts/pull/3610)) +- expose `plugin` and `$` in transformer function context ([#3610](https://github.com/hey-api/openapi-ts/pull/3610)) ---- +
+
-### @hey-api/codegen-core 0.7.4 +## @hey-api/codegen-core 0.7.4 ### Changed -- **planner**: language-aware declaration sharing check ([#3606](https://github.com/hey-api/openapi-ts/pull/3606)) +- planner: language-aware declaration sharing check ([#3606](https://github.com/hey-api/openapi-ts/pull/3606)) ---- +
+
-### @hey-api/shared 0.2.5 +## @hey-api/shared 0.2.5 ### Added -- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) +- output: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) ### Fixed -- **parser**: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) +- parser: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) ### Changed -- **output**: pass context as second argument in `module.resolve` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) +- output: pass context as second argument in `module.resolve()` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) + +
+
---- +# 2026-03-16 -## 2026-03-16 +## @hey-api/openapi-ts 0.94.2 -### @hey-api/openapi-ts 0.94.2 +### Core +- internal: export Plugins namespace ([#3586](https://github.com/hey-api/openapi-ts/pull/3586)) +- internal: expand TypeScript peer dependency range ([#3588](https://github.com/hey-api/openapi-ts/pull/3588)) +- output: pass default value to `header` function ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) -#### Core -- **internal**: export Plugins namespace ([#3586](https://github.com/hey-api/openapi-ts/pull/3586)) -- **internal**: expand TypeScript peer dependency range ([#3588](https://github.com/hey-api/openapi-ts/pull/3588)) -- **output**: pass default value to `header` function ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) +### Plugins #### nestjs -###### Changed -- **nestjs**: initial release ([#3573](https://github.com/hey-api/openapi-ts/pull/3573)) +- initial release ([#3573](https://github.com/hey-api/openapi-ts/pull/3573)) ---- +
+
-### @hey-api/codegen-core 0.7.3 +## @hey-api/codegen-core 0.7.3 ### Changed -- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) +- internal: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) ---- +
+
-### @hey-api/shared 0.2.4 +## @hey-api/shared 0.2.4 ### Changed -- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) -- **utils**: `outputHeaderToPrefix` function signature change ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) +- internal: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) +- utils: `outputHeaderToPrefix()` function signature change ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) ---- +
+
-### @hey-api/types 0.1.4 +## @hey-api/types 0.1.4 ### Changed -- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) +- internal: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) ---- +
+
-## 2026-03-12 +# 2026-03-12 -### @hey-api/openapi-ts 0.94.1 +## @hey-api/openapi-ts 0.94.1 -#### Core -- **cli**: show environment value in development ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) +### Core +- cli: show environment value in development ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) +- config(plugins): show warning when plugin infer fails ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) +- dsl: expand list of JavaScript globals ([#3508](https://github.com/hey-api/openapi-ts/pull/3508)) + +### Plugins #### @hey-api/transformers -###### Fixed -- **@hey-api/transformers**: support `anyOf` schema with null ([#3504](https://github.com/hey-api/openapi-ts/pull/3504)) +- support `anyOf` schema with null ([#3504](https://github.com/hey-api/openapi-ts/pull/3504)) #### @hey-api/typescript -###### Added -- **@hey-api/typescript**: add Resolvers API ([#3531](https://github.com/hey-api/openapi-ts/pull/3531)) -###### Changed -- **@hey-api/typescript**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) +- add Resolvers API ([#3531](https://github.com/hey-api/openapi-ts/pull/3531)) +- implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) #### valibot -###### Changed -- **valibot**: provide more resolvers ([#3547](https://github.com/hey-api/openapi-ts/pull/3547)) -- **valibot**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) +- provide more resolvers ([#3547](https://github.com/hey-api/openapi-ts/pull/3547)) +- implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) #### zod -###### Changed -- **zod**: handle `guid` string format ([#3552](https://github.com/hey-api/openapi-ts/pull/3552)) -- **zod**: implement `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) -- **zod**: provide more resolvers ([#3554](https://github.com/hey-api/openapi-ts/pull/3554)) - -- **config(plugins)**: show warning when plugin infer fails ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) -- **dsl**: expand list of JavaScript globals ([#3508](https://github.com/hey-api/openapi-ts/pull/3508)) +- handle `guid` string format ([#3552](https://github.com/hey-api/openapi-ts/pull/3552)) +- implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) +- provide more resolvers ([#3554](https://github.com/hey-api/openapi-ts/pull/3554)) ---- +
+
-### @hey-api/codegen-core 0.7.2 +## @hey-api/codegen-core 0.7.2 ### Changed -- **log**: make group optional in warn method ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) +- log: make group optional in warn method ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) ---- +
+
-### @hey-api/shared 0.2.3 +## @hey-api/shared 0.2.3 ### Added -- **parser**: add `getName` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) +- parser: add `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) ### Changed -- **cli**: export isEnvironment function ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) -- **internal**: export more IR types ([#3513](https://github.com/hey-api/openapi-ts/pull/3513)) +- cli: export isEnvironment function ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) +- internal: export more IR types ([#3513](https://github.com/hey-api/openapi-ts/pull/3513)) ---- +
+
-## 2026-03-05 +# 2026-03-05 -### @hey-api/openapi-ts 0.94.0 +## @hey-api/openapi-ts 0.94.0 ### ⚠️ Breaking -- **BREAKING** **client**: `buildUrl` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) +- BREAKING** **client: `buildUrl()` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) -#### Core -- **internal**: simplify dev mode check ([#3498](https://github.com/hey-api/openapi-ts/pull/3498)) -- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) -- **output**: avoid double sanitizing leading character ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) -- **parser**: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) + + +### Core +- BREAKING** **client: `buildUrl()` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) + + +- client: change serializer types from `any` to `unknown` ([#3471](https://github.com/hey-api/openapi-ts/pull/3471)) +- dsl(reserved): expand reserved keywords with more globals ([#3487](https://github.com/hey-api/openapi-ts/pull/3487)) +- internal: simplify dev mode check ([#3498](https://github.com/hey-api/openapi-ts/pull/3498)) +- internal: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) +- output: avoid double sanitizing leading character ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) +- output(header): support function signature in client and core files ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) +- parser: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) + +### Plugins #### @pinia/colada -###### Fixed -- **@pinia/colada**: pass error type generic to `defineQueryOptions` ([#3483](https://github.com/hey-api/openapi-ts/pull/3483)) +- pass error type generic to `defineQueryOptions` ([#3483](https://github.com/hey-api/openapi-ts/pull/3483)) #### @tanstack/preact-query -###### Changed -- **@tanstack/preact-query**: initial release ([#3499](https://github.com/hey-api/openapi-ts/pull/3499)) +- initial release ([#3499](https://github.com/hey-api/openapi-ts/pull/3499)) #### @tanstack/react-query -###### Changed -- **@tanstack/react-query**: support generating `useMutation` hooks ([#3432](https://github.com/hey-api/openapi-ts/pull/3432)) +- support generating `useMutation` hooks ([#3432](https://github.com/hey-api/openapi-ts/pull/3432)) #### typescript -###### Fixed -- **typescript**: reference enum object when creating enum types ([#3500](https://github.com/hey-api/openapi-ts/pull/3500)) +- reference enum object when creating enum types ([#3500](https://github.com/hey-api/openapi-ts/pull/3500)) #### valibot -###### Changed -- **valibot**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) +- support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) #### zod -###### Changed -- **zod**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) - -- **BREAKING** **client**: `buildUrl` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) -- **client**: change serializer types from `any` to `unknown` ([#3471](https://github.com/hey-api/openapi-ts/pull/3471)) -- **dsl(reserved)**: expand reserved keywords with more globals ([#3487](https://github.com/hey-api/openapi-ts/pull/3487)) -- **output(header)**: support function signature in client and core files ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) +- support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) ---- +
+
-### @hey-api/codegen-core 0.7.1 +## @hey-api/codegen-core 0.7.1 ### Changed -- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) +- internal: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) ---- +
+
-### @hey-api/shared 0.2.2 +## @hey-api/shared 0.2.2 ### Fixed -- **parser**: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) +- parser: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) ### Changed -- **output**: context file is optional ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) +- output: context file is optional ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) ---- +
+
-## 2026-02-27 +# 2026-02-27 -### @hey-api/openapi-ts 0.93.1 +## @hey-api/openapi-ts 0.93.1 -#### Core -- **cli**: do not set `logs.file` to `true` by default ([#3469](https://github.com/hey-api/openapi-ts/pull/3469)) +### Core +- cli: do not set `logs.file` to `true` by default ([#3469](https://github.com/hey-api/openapi-ts/pull/3469)) +- client: avoid removing empty arrays from flat arguments ([#3451](https://github.com/hey-api/openapi-ts/pull/3451)) +- client: support async `createClientConfig` ([#3445](https://github.com/hey-api/openapi-ts/pull/3445)) +- client(@hey-api/nuxt): do not unwrap blob values ([#3459](https://github.com/hey-api/openapi-ts/pull/3459)) + +### Plugins #### @hey-api/sdk -###### Fixed -- **@hey-api/sdk**: correctly set required flat parameters ([#3458](https://github.com/hey-api/openapi-ts/pull/3458)) +- correctly set required flat parameters ([#3458](https://github.com/hey-api/openapi-ts/pull/3458)) #### @hey-api/typescript -###### Changed -- **@hey-api/typescript**: simplify union types if a member is `unknown` ([#3454](https://github.com/hey-api/openapi-ts/pull/3454)) +- simplify union types if a member is `unknown` ([#3454](https://github.com/hey-api/openapi-ts/pull/3454)) #### @tanstack/query -###### Fixed -- **@tanstack/query**: skip mutation queries for SSE endpoints ([#3470](https://github.com/hey-api/openapi-ts/pull/3470)) +- skip mutation queries for SSE endpoints ([#3470](https://github.com/hey-api/openapi-ts/pull/3470)) #### valibot -###### Added -- **valibot**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) +- add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) #### zod -###### Added -- **zod**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) -###### Fixed -- **zod**: apply nullable modifier to `additionalProperties` schema ([#3452](https://github.com/hey-api/openapi-ts/pull/3452)) +- add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) +- apply nullable modifier to `additionalProperties` schema ([#3452](https://github.com/hey-api/openapi-ts/pull/3452)) -- **client**: avoid removing empty arrays from flat arguments ([#3451](https://github.com/hey-api/openapi-ts/pull/3451)) -- **client**: support async `createClientConfig` ([#3445](https://github.com/hey-api/openapi-ts/pull/3445)) -- **client(@hey-api/nuxt)**: do not unwrap blob values ([#3459](https://github.com/hey-api/openapi-ts/pull/3459)) +
+
---- +# 2026-02-23 -## 2026-02-24 +## @hey-api/openapi-ts 0.93.0 -### @hey-api/openapi-ts 0.93.0 +### Core +- client: expose `onRequest` in RequestOptions for SSE request interception ([#3392](https://github.com/hey-api/openapi-ts/pull/3392)) +- input: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) +- input: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) +- output: apply `output.header` to bundled files ([#3438](https://github.com/hey-api/openapi-ts/pull/3438)) +- parser: add `patch.input` and shorthand `patch()` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) +- parser: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) +- parser: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) +- parser: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) +- parser: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) +- parser: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) +- parser(patch): support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) +- parser(patch): support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) +- parser(transforms): add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) -#### Core -- **input**: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) -- **input**: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) -- **output**: apply `output.header` to bundled files ([#3438](https://github.com/hey-api/openapi-ts/pull/3438)) -- **parser**: add `patch.input` and shorthand `patch` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) -- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) -- **parser**: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) -- **parser**: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) -- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) -- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) +### Plugins #### valibot -###### Changed -- **valibot**: remove `enum.nodes.nullable` resolver node ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) -- **valibot**: use `.nullable` and `.nullish` methods ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) +- remove `enum.nodes.nullable` resolver node ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) + +### Removed resolver node + +Valibot plugin no longer exposes the `enum.nodes.nullable` node. It was refactored so that nullable values are handled outside of resolvers. + +- use `.nullable()` and `.nullish()` methods ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) #### zod -###### Changed -- **zod**: remove `enum.nodes.nullable` resolver node ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) -- **zod**: use `.nullable` and `.nullish` methods ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) +- remove `enum.nodes.nullable` resolver node ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) + +### Removed resolver node + +Zod plugin no longer exposes the `enum.nodes.nullable` node. It was refactored so that nullable values are handled outside of resolvers. -- **client**: expose `onRequest` in RequestOptions for SSE request interception ([#3392](https://github.com/hey-api/openapi-ts/pull/3392)) -- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) -- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) -- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) ---- +- use `.nullable()` and `.nullish()` methods ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) -### @hey-api/json-schema-ref-parser 1.3.1 +
+
+ +## @hey-api/json-schema-ref-parser 1.3.1 ### Fixed -- **input**: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) -- **parser**: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) +- input: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) +- parser: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) ### Changed -- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) +- parser: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) ---- +
+
-### @hey-api/shared 0.2.1 +## @hey-api/shared 0.2.1 ### Added -- **parser**: add `patch.input` and shorthand `patch` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) -- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) -- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) +- parser: add `patch.input` and shorthand `patch()` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) +- parser: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) +- parser(transforms): add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) ### Fixed -- **input**: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) -- **parser**: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) +- input: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) +- parser: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) ### Changed -- **internal**: export schema walker interfaces ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) -- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) -- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) -- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) +- internal: export schema walker interfaces ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) +- parser: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) +- parser(patch): support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) +- parser(patch): support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) + +
+
---- +# 2026-02-13 -## 2026-02-13 +## @hey-api/openapi-ts 0.92.4 -### @hey-api/openapi-ts 0.92.4 +### Core +- internal: use shared schema processor ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) +- output: detect `importFileExtension` from tsconfig `module` option ([#3380](https://github.com/hey-api/openapi-ts/pull/3380)) -#### Core -- **internal**: use shared schema processor ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) -- **output**: detect `importFileExtension` from tsconfig `module` option ([#3380](https://github.com/hey-api/openapi-ts/pull/3380)) +### Plugins #### @angular/common -###### Changed -- **@angular/common**: use generics for HttpRequests ([#3384](https://github.com/hey-api/openapi-ts/pull/3384)) +- use generics for HttpRequests ([#3384](https://github.com/hey-api/openapi-ts/pull/3384)) #### @hey-api/client-nuxt -###### Fixed -- **@hey-api/client-nuxt**: forward `asyncDataOptions` to `useFetch` and `useLazyFetch` ([#3382](https://github.com/hey-api/openapi-ts/pull/3382)) -###### Changed -- **@hey-api/client-nuxt**: unwrap `ComputedRef` body before initial serialization ([#3361](https://github.com/hey-api/openapi-ts/pull/3361)) +- forward `asyncDataOptions` to `useFetch` and `useLazyFetch` ([#3382](https://github.com/hey-api/openapi-ts/pull/3382)) +- unwrap `ComputedRef` body before initial serialization ([#3361](https://github.com/hey-api/openapi-ts/pull/3361)) #### @hey-api/transformers -###### Fixed -- **@hey-api/transformers**: false positive warning for discriminated `oneOf` schemas ([#3379](https://github.com/hey-api/openapi-ts/pull/3379)) -- **@hey-api/transformers**: handle `$ref` keywords in `allOf` compositions ([#3374](https://github.com/hey-api/openapi-ts/pull/3374)) +- false positive warning for discriminated `oneOf` schemas ([#3379](https://github.com/hey-api/openapi-ts/pull/3379)) +- handle `$ref` keywords in `allOf` compositions ([#3374](https://github.com/hey-api/openapi-ts/pull/3374)) #### @hey-api/typescript -###### Fixed -- **@hey-api/typescript**: deduplicate enum keys to avoid name collision ([#3376](https://github.com/hey-api/openapi-ts/pull/3376)) +- deduplicate enum keys to avoid name collision ([#3376](https://github.com/hey-api/openapi-ts/pull/3376)) ---- +
+
-### @hey-api/json-schema-ref-parser 1.3.0 +## @hey-api/json-schema-ref-parser 1.3.0 ### Changed -- **feat**: clean up dependencies ([#3386](https://github.com/hey-api/openapi-ts/pull/3386)) -- **fix**: pass seen references through crawl stack ([#3387](https://github.com/hey-api/openapi-ts/pull/3387)) +- feat: clean up dependencies ([#3386](https://github.com/hey-api/openapi-ts/pull/3386)) + + +- fix: pass seen references through crawl stack ([#3387](https://github.com/hey-api/openapi-ts/pull/3387)) ---- +
+
-### @hey-api/shared 0.2.0 +## @hey-api/shared 0.2.0 ### Changed -- **utils**: rename `isTopLevelComponentRef` to `isTopLevelComponent` ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) +- utils: rename `isTopLevelComponentRef` to `isTopLevelComponent` ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) ---- +
+
-## 2026-02-05 +# 2026-02-05 -### @hey-api/openapi-ts 0.92.2 +## @hey-api/openapi-ts 0.92.3 -(No parsed entries) +### Plugins +#### zod +- use namespace import for zod v4 ([#3325](https://github.com/hey-api/openapi-ts/pull/3325)) ---- +
+
-### @hey-api/openapi-ts 0.92.3 +## @hey-api/openapi-ts 0.92.2 -#### zod -###### Changed -- **zod**: use namespace import for zod v4 ([#3325](https://github.com/hey-api/openapi-ts/pull/3325)) +(No parsed entries) ---- -### @hey-api/codegen-core 0.7.0 +
+
+ +## @hey-api/codegen-core 0.7.0 ### ⚠️ Breaking -- **BREAKING:** **symbol**: replace `exportFrom` array with `getExportFromFilePath` function ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) +- **BREAKING:** **symbol**: replace `exportFrom` array with `getExportFromFilePath()` function ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) + +### Updated Symbol interface ---- +The `exportFrom` property has been replaced with the `getExportFromFilePath()` function. This allows you to dynamically determine export paths based on symbol properties. This is a low-level feature, so you're most likely unaffected. -### @hey-api/shared 0.1.2 +
+
+ +## @hey-api/shared 0.1.2 ### Added -- **parser**: add `getExportFromFilePath` hook ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) +- parser: add `getExportFromFilePath()` hook ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ### Changed -- **config**: `includeInEntry` accepts function in addition to primitive value ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) -- **transform(read-write)**: improve discriminated schemas split ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) +- config: `includeInEntry` accepts function in addition to primitive value ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) +- transform(read-write): improve discriminated schemas split ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ---- +
+
-## 2026-01-30 +# 2026-01-30 -### @hey-api/openapi-ts 0.91.1 +## @hey-api/openapi-ts 0.91.1 (No parsed entries) ---- +
+
-### @hey-api/codegen-core 0.6.1 +## @hey-api/codegen-core 0.6.1 ### Fixed -- **planner**: fix duplicate import when same symbol is imported as both type and value ([#3291](https://github.com/hey-api/openapi-ts/pull/3291)) +- planner: fix duplicate import when same symbol is imported as both type and value ([#3291](https://github.com/hey-api/openapi-ts/pull/3291)) ---- +
+
-### @hey-api/shared 0.1.1 +## @hey-api/shared 0.1.1 (No parsed entries) ---- +
+
-## 2026-01-29 +# 2026-01-28 -### @hey-api/openapi-ts 0.91.0 +## @hey-api/openapi-ts 0.91.0 ### ⚠️ Breaking -- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) +- BREAKING: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +### Removed CommonJS (CJS) support + +`@hey-api/openapi-ts` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling. + +CommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like: + +```js +const { defineConfig } = await import("@hey-api/openapi-ts"); +``` + +If you have previously written: + +```js +const { defineConfig } = require("@hey-api/openapi-ts"); +``` + +Migrate by updating your static imports: + +```js +import { defineConfig } from "@hey-api/openapi-ts"; +``` + +If your environment cannot use ESM, pin to a previous version. -- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ---- -### @hey-api/codegen-core 0.6.0 +### Core +- BREAKING: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +### Removed CommonJS (CJS) support + +`@hey-api/openapi-ts` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling. + +CommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like: + +```js +const { defineConfig } = await import("@hey-api/openapi-ts"); +``` + +If you have previously written: + +```js +const { defineConfig } = require("@hey-api/openapi-ts"); +``` + +Migrate by updating your static imports: + +```js +import { defineConfig } from "@hey-api/openapi-ts"; +``` + +If your environment cannot use ESM, pin to a previous version. + +
+
+ +## @hey-api/codegen-core 0.6.0 ### ⚠️ Breaking -- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) +- BREAKING: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) + +### Removed CommonJS (CJS) support + +`@hey-api/codegen-core` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling. + +CommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like: + +```js +const { Project } = await import("@hey-api/codegen-core"); +``` + +If you have previously written: ---- +```js +const { Project } = require("@hey-api/codegen-core"); +``` -### @hey-api/shared 0.1.0 +Migrate by updating your static imports: + +```js +import { Project } from "@hey-api/codegen-core"; +``` + +If your environment cannot use ESM, pin to a previous version. + +
+
+ +## @hey-api/shared 0.1.0 ### Changed -- **feat**: initial release ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) +- feat: initial release ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ---- +
+
-### @hey-api/types 0.1.3 +## @hey-api/types 0.1.3 ### Added -- **types**: add `AnyString` utility type ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) +- types: add `AnyString` utility type ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ---- +
+
-## 2026-01-25 +# 2026-01-24 -### @hey-api/openapi-ts 0.90.10 +## @hey-api/openapi-ts 0.90.10 -#### Core -- **parser**: inline deep path `$ref` references ([#3242](https://github.com/hey-api/openapi-ts/pull/3242)) +### Core +- parser: inline deep path `$ref` references ([#3242](https://github.com/hey-api/openapi-ts/pull/3242)) + +### Plugins #### @hey-api/sdk -###### Changed -- **@hey-api/sdk**: correctly map body keys in flat mode ([#3255](https://github.com/hey-api/openapi-ts/pull/3255)) +- correctly map body keys in flat mode ([#3255](https://github.com/hey-api/openapi-ts/pull/3255)) #### @tanstack/angular-query-experimental -###### Changed -- **@tanstack/angular-query-experimental**: index mutation options symbol ([#3249](https://github.com/hey-api/openapi-ts/pull/3249)) +- index mutation options symbol ([#3249](https://github.com/hey-api/openapi-ts/pull/3249)) #### @tanstack/react-query -###### Changed -- **@tanstack/react-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) +- index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) #### @tanstack/solid-query -###### Changed -- **@tanstack/solid-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) +- index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) #### @tanstack/svelte-query -###### Changed -- **@tanstack/svelte-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) +- index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) #### @tanstack/vue-query -###### Changed -- **@tanstack/vue-query**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) - ---- +- index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) -## 2026-01-23 +
+
-### @hey-api/openapi-ts 0.90.9 +# 2026-01-22 -#### Core -- **cli**: clean up interface ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) -- **config**: move `loadConfigFile` function to `@hey-api/codegen-core` ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) +## @hey-api/openapi-ts 0.90.9 -- **ts-dsl**: allow removing object properties by passing `null` ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) -- **ts-dsl**: override object properties when called multiple times with the same name ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) +### Core +- cli: clean up interface ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) +- config: move `loadConfigFile` function to `@hey-api/codegen-core` ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) +- ts-dsl: allow removing object properties by passing `null` ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) +- ts-dsl: override object properties when called multiple times with the same name ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) ---- +
+
-### @hey-api/codegen-core 0.5.5 +## @hey-api/codegen-core 0.5.5 ### Changed -- **config**: export `loadConfigFile` function (moved from `@hey-api/openapi-ts`) ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) +- config: export `loadConfigFile` function (moved from `@hey-api/openapi-ts`) ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ---- +
+
-### @hey-api/types 0.1.2 +## @hey-api/types 0.1.2 ### Added - feat: add `ToArray`, `ToReadonlyArray`, and `AnyObject` types ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ---- +
+
-## 2026-01-22 +# 2026-01-21 -### @hey-api/openapi-ts 0.90.7 +## @hey-api/openapi-ts 0.90.8 -- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) +### Core +- cli: do not show ascii logo on generate command ([#3238](https://github.com/hey-api/openapi-ts/pull/3238)) +- internal: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) ---- +
+
-### @hey-api/openapi-ts 0.90.8 +## @hey-api/openapi-ts 0.90.7 -#### Core -- **cli**: do not show ascii logo on generate command ([#3238](https://github.com/hey-api/openapi-ts/pull/3238)) -- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) +### Core +- deps: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) ---- +
+
-### @hey-api/codegen-core 0.5.3 +## @hey-api/codegen-core 0.5.4 ### Changed -- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) +- internal: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) ---- +
+
-### @hey-api/codegen-core 0.5.4 +## @hey-api/codegen-core 0.5.3 ### Changed -- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) +- deps: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) ---- +
+
-## 2026-01-21 +# 2026-01-20 -### @hey-api/openapi-ts 0.90.6 +## @hey-api/openapi-ts 0.90.6 + +### Plugins #### @hey-api/sdk -###### Changed -- **@hey-api/sdk**: do not warn on mutualTLS security schemes ([#3227](https://github.com/hey-api/openapi-ts/pull/3227)) +- do not warn on mutualTLS security schemes ([#3227](https://github.com/hey-api/openapi-ts/pull/3227)) ---- +
+
-### @hey-api/types 0.1.1 +## @hey-api/types 0.1.1 ### Changed - Publish `@hey-api/types` so workspace packages can resolve it from npm. ([#3224](https://github.com/hey-api/openapi-ts/pull/3224)) ---- +
+
+ +# 2026-01-16 -## 2026-01-16 +## @hey-api/openapi-ts 0.90.4 -### @hey-api/openapi-ts 0.90.4 +### Plugins #### @hey-api/client-fetch -###### Fixed -- **@hey-api/client-fetch**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) +- JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) #### @hey-api/client-ky -###### Fixed -- **@hey-api/client-ky**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) +- JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) #### @hey-api/client-next -###### Fixed -- **@hey-api/client-next**: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) +- JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) #### valibot -###### Added -- **valibot**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) +- add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) #### zod -###### Added -- **zod**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) +- add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) ---- +
+
-## 2026-01-11 +# 2026-01-11 -### @hey-api/openapi-ts 0.90.3 +## @hey-api/openapi-ts 0.90.3 -#### Core -- **output**: add `oxfmt` preset ([#3197](https://github.com/hey-api/openapi-ts/pull/3197)) +### Core +- output: add `oxfmt` preset ([#3197](https://github.com/hey-api/openapi-ts/pull/3197)) ---- +
+
-## 2026-01-07 +# 2026-01-07 -### @hey-api/openapi-ts 0.90.2 +## @hey-api/openapi-ts 0.90.2 -#### Core -- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) +### Core +- build: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) + +### Plugins #### @hey-api/sdk -###### Fixed -- **@hey-api/sdk**: do not use bodySerializer if format is binary ([#3190](https://github.com/hey-api/openapi-ts/pull/3190)) +- do not use bodySerializer if format is binary ([#3190](https://github.com/hey-api/openapi-ts/pull/3190)) ---- +
+
-### @hey-api/vite-plugin 0.2.1 +## @hey-api/codegen-core 0.5.2 ### Changed -- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) +- build: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) ---- +
+
-### @hey-api/codegen-core 0.5.2 +## @hey-api/vite-plugin 0.2.1 ### Changed -- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) +- build: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) + +
+
+ +# 2026-01-04 + +## @hey-api/openapi-ts 0.90.1 ---- +### Core +- output: add `source` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) -## 2026-01-04 +Source is a copy of the input specification used to generate your output. It can be used to power documentation tools or to persist a stable snapshot alongside your generated files. -### @hey-api/openapi-ts 0.90.1 +Learn how to use the source on the [Output](https://heyapi.dev/openapi-ts/configuration/output#source) page. -#### Core -- **output**: add `source` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) +### Plugins #### @hey-api/sdk -###### Added -- **@hey-api/sdk**: add `examples` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) +- add `examples` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) ---- +The SDK plugin can generate ready-to-use code examples for each operation, showing how to call the SDK methods with proper parameters and setup. -### @hey-api/codegen-core 0.5.1 +Learn how to generate examples on the [SDK plugin](https://heyapi.dev/openapi-ts/plugins/sdk#code-examples) page. + +
+
+ +## @hey-api/codegen-core 0.5.1 ### Changed -- **project**: expose `.plan` method ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) +- project: expose `.plan()` method ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) ---- +
+
-## 2026-01-03 +# 2026-01-02 -### @hey-api/openapi-ts 0.90.0 +## @hey-api/openapi-ts 0.90.0 ### ⚠️ Breaking -- **valibot**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) -- **sdk**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) -- **zod**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) -- **@angular/common**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +- valibot: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +The [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page. + +- sdk: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +### Structure API + +The [SDK plugin](https://heyapi.dev/openapi-ts/plugins/sdk) now implements the Structure API, enabling more complex structures and fixing several known issues. + +Some Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API. + +Please [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax. + +- zod: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +The [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page. + +- @angular/common: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +### Structure API + +The [Angular plugin](https://heyapi.dev/openapi-ts/plugins/angular) now implements the Structure API, enabling more complex structures and fixing several known issues. + +Some Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API. + +Please [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax. + + + +### Core +- renderer: correctly render default import ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +### Plugins #### @angular/common -###### Breaking -- **@angular/common**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +- **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +### Structure API + +The [Angular plugin](https://heyapi.dev/openapi-ts/plugins/angular) now implements the Structure API, enabling more complex structures and fixing several known issues. + +Some Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API. + +Please [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax. + + #### @hey-api/client-angular -###### Changed -- **@hey-api/client-angular**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) +- use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) #### @hey-api/client-axios -###### Changed -- **@hey-api/client-axios**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) +- use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) #### @hey-api/client-fetch -###### Changed -- **@hey-api/client-fetch**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) +- use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) #### @hey-api/client-ky -###### Changed -- **@hey-api/client-ky**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) +- use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) #### @hey-api/client-next -###### Changed -- **@hey-api/client-next**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) +- use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) #### @hey-api/client-nuxt -###### Changed -- **@hey-api/client-nuxt**: use serialized body in SSE requests ([#3123](https://github.com/hey-api/openapi-ts/pull/3123)) -- **@hey-api/client-nuxt**: preserve null in `WithRefs` type for nullable fields ([#3131](https://github.com/hey-api/openapi-ts/pull/3131)) +- use serialized body in SSE requests ([#3123](https://github.com/hey-api/openapi-ts/pull/3123)) +- preserve null in `WithRefs` type for nullable fields ([#3131](https://github.com/hey-api/openapi-ts/pull/3131)) #### sdk -###### Breaking -- **sdk**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +- **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + +### Structure API + +The [SDK plugin](https://heyapi.dev/openapi-ts/plugins/sdk) now implements the Structure API, enabling more complex structures and fixing several known issues. + +Some Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API. + +Please [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax. + #### valibot -###### Breaking -- **valibot**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) +- **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +The [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page. + #### zod -###### Breaking -- **zod**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) -###### Changed -- **zod**: expand support for bigint types ([#3145](https://github.com/hey-api/openapi-ts/pull/3145)) +- **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) -- **renderer**: correctly render default import ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) +The [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page. ---- +- expand support for bigint types ([#3145](https://github.com/hey-api/openapi-ts/pull/3145)) -### @hey-api/codegen-core 0.5.0 +
+
+ +## @hey-api/codegen-core 0.5.0 ### Changed -- **core**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) -- **fix**: simplify symbol merging logic ([#3169](https://github.com/hey-api/openapi-ts/pull/3169)) -- **types**: document default values for `importKind` and `kind` ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) +- core: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) + + +- fix: simplify symbol merging logic ([#3169](https://github.com/hey-api/openapi-ts/pull/3169)) +- types: document default values for `importKind` and `kind` ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) + +
+
---- +# 2025-12-19 -## 2025-12-20 +## @hey-api/openapi-ts 0.89.2 -### @hey-api/openapi-ts 0.89.2 +### Plugins #### @hey-api/client-axios -###### Changed -- **@hey-api/client-axios**: revert use `query` option when no `paramsSerializer` is provided ([#3125](https://github.com/hey-api/openapi-ts/pull/3125)) +- revert use `query` option when no `paramsSerializer` is provided ([#3125](https://github.com/hey-api/openapi-ts/pull/3125)) #### @hey-api/typescript -###### Changed -- **@hey-api/typescript**: improve type narrowing in discriminated types ([#3120](https://github.com/hey-api/openapi-ts/pull/3120)) +- improve type narrowing in discriminated types ([#3120](https://github.com/hey-api/openapi-ts/pull/3120)) ---- +
+
-## 2025-12-19 +# 2025-12-18 -### @hey-api/openapi-ts 0.89.1 +## @hey-api/openapi-ts 0.89.1 -#### Core -- **output**: sanitize reserved names with underscore suffix instead of prefix ([#3102](https://github.com/hey-api/openapi-ts/pull/3102)) -- **output**: default to `.js` extension when module resolution is set to `node16` ([#3115](https://github.com/hey-api/openapi-ts/pull/3115)) -- **parser**: expose OpenAPI extension keywords ([#3119](https://github.com/hey-api/openapi-ts/pull/3119)) -- **parser**: improve discriminator support in nested `allOf` fields ([#3117](https://github.com/hey-api/openapi-ts/pull/3117)) +### Core +- output: sanitize reserved names with underscore suffix instead of prefix ([#3102](https://github.com/hey-api/openapi-ts/pull/3102)) +- output: default to `.js` extension when module resolution is set to `node16` ([#3115](https://github.com/hey-api/openapi-ts/pull/3115)) +- parser: expose OpenAPI extension keywords ([#3119](https://github.com/hey-api/openapi-ts/pull/3119)) +- parser: improve discriminator support in nested `allOf` fields ([#3117](https://github.com/hey-api/openapi-ts/pull/3117)) + +### Plugins #### @hey-api/client-axios -###### Changed -- **@hey-api/client-axios**: use `query` option when no `paramsSerializer` is provided ([#3062](https://github.com/hey-api/openapi-ts/pull/3062)) +- use `query` option when no `paramsSerializer` is provided ([#3062](https://github.com/hey-api/openapi-ts/pull/3062)) #### @hey-api/sdk -###### Changed -- **@hey-api/sdk**: lazily initialize sub-resources to improve performance ([#3099](https://github.com/hey-api/openapi-ts/pull/3099)) +- lazily initialize sub-resources to improve performance ([#3099](https://github.com/hey-api/openapi-ts/pull/3099)) + +
+
+ +# 2025-12-11 + +## @hey-api/openapi-ts 0.89.0 + +### Core +- output: add `preferExportAll` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) + +### Prefer named exports + +This release changes the default for `index.ts` to prefer named exports. Named exports may lead to better IDE and bundler performance compared to asterisk (`*`) as your tooling doesn't have to inspect the underlying module to discover exports. + +While this change is merely cosmetic, you can set `output.preferExportAll` to `true` if you prefer to use the asterisk. ---- +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + path: "src/client", + preferExportAll: true, + }, +}; +``` -## 2025-12-11 +- output: add `nameConflictResolver` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) -### @hey-api/openapi-ts 0.89.0 +## Name Conflicts -#### Core -- **output**: add `preferExportAll` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) -- **output**: add `nameConflictResolver` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) -- **parser**: removed `symbol:setValue:*` events ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) +As your project grows, the chances of name conflicts increase. We use a simple conflict resolver that appends numeric suffixes to duplicate identifiers. If you prefer a different strategy, you can provide your own `nameConflictResolver` function. ---- +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + nameConflictResolver({ attempt, baseName }) { + return attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`; + }, + path: "src/client", + }, +}; +``` -### @hey-api/codegen-core 0.4.0 +Example output: + +```ts +export type ChatCompletion = string; + +export type ChatCompletion_N2 = number; +``` +- parser: removed `symbol:setValue:*` events ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) + +### Removed `symbol:setValue:*` events + +These events have been removed in favor of `node:set:*` events. + +
+
+ +## @hey-api/codegen-core 0.4.0 ### Changed -- **symbols**: remove `placeholder` property ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) +- symbols: remove `placeholder` property ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) ---- +
+
-## 2025-12-10 +# 2025-12-10 -### @hey-api/openapi-ts 0.88.2 +## @hey-api/openapi-ts 0.88.2 -No user-facing changes. +### Core +- clients: handle CR and CRLF line endings in SSE ([#3055](https://github.com/hey-api/openapi-ts/pull/3055)) +
+
---- +# 2025-12-07 -## 2025-12-08 +## @hey-api/openapi-ts 0.88.1 -### @hey-api/openapi-ts 0.88.1 +### Core +- @hey-api/sdk: correctly map flat parameters ([#3047](https://github.com/hey-api/openapi-ts/pull/3047)) -- **@hey-api/sdk**: correctly map flat parameters ([#3047](https://github.com/hey-api/openapi-ts/pull/3047)) +
+
---- +# 2025-11-19 -## 2025-11-20 +## @hey-api/openapi-ts 0.88.0 -### @hey-api/openapi-ts 0.88.0 +### Core +- output: use TypeScript DSL ([#2986](https://github.com/hey-api/openapi-ts/pull/2986)) -#### Core -- **output**: use TypeScript DSL ([#2986](https://github.com/hey-api/openapi-ts/pull/2986)) +### Removed `compiler` and `tsc` exports ---- +This release removes the `compiler` utility functions. Instead, it introduces a new TypeScript DSL exposed under the `$` symbol. All plugins now use this interface, so you may notice slight changes in the generated output. -## 2025-11-14 +
+
-### @hey-api/openapi-ts 0.87.5 +# 2025-11-14 -- **client-ofetch**: fix FormData boundary mismatch ([#2940](https://github.com/hey-api/openapi-ts/pull/2940)) +## @hey-api/openapi-ts 0.87.5 ---- +### Core +- client-ofetch: fix FormData boundary mismatch ([#2940](https://github.com/hey-api/openapi-ts/pull/2940)) -## 2025-11-13 +
+
-### @hey-api/openapi-ts 0.87.3 +# 2025-11-13 -- **@tanstack/query**: add type annotations to `queryOptions` ([#2964](https://github.com/hey-api/openapi-ts/pull/2964)) -- **@tanstack/query**: prettier mutation options ([#2972](https://github.com/hey-api/openapi-ts/pull/2972)) -- **client-fetch**: intercept AbortError ([#2970](https://github.com/hey-api/openapi-ts/pull/2970)) -- **valibot**: allow generating custom pipes with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) -- **zod**: allow generating custom chains with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) +## @hey-api/openapi-ts 0.87.4 ---- +### Core +- valibot: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) +- zod: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) -### @hey-api/openapi-ts 0.87.4 +
+
-- **valibot**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) -- **zod**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) +# 2025-11-12 ---- +## @hey-api/openapi-ts 0.87.3 -## 2025-11-11 +### Core +- @tanstack/query: add type annotations to `queryOptions()` ([#2964](https://github.com/hey-api/openapi-ts/pull/2964)) +- @tanstack/query: prettier mutation options ([#2972](https://github.com/hey-api/openapi-ts/pull/2972)) +- client-fetch: intercept AbortError ([#2970](https://github.com/hey-api/openapi-ts/pull/2970)) +- valibot: allow generating custom pipes with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) +- zod: allow generating custom chains with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) -### @hey-api/openapi-ts 0.87.2 +
+
-#### Core -- **output**: run lint before format ([#2937](https://github.com/hey-api/openapi-ts/pull/2937)) -- **parser**: merge `default` keyword with `$ref` in OpenAPI 3.1 ([#2946](https://github.com/hey-api/openapi-ts/pull/2946)) +# 2025-11-11 -- **@pinia/colada**: correctly access instantiated SDKs ([#2942](https://github.com/hey-api/openapi-ts/pull/2942)) -- **@tanstack/query**: prettier query options ([#2947](https://github.com/hey-api/openapi-ts/pull/2947)) -- **clients**: add support for Ky client ([#2958](https://github.com/hey-api/openapi-ts/pull/2958)) -- **valibot**: use `.strictObject` instead of `.objectWithRest` when additional properties are not allowed ([#2945](https://github.com/hey-api/openapi-ts/pull/2945)) +## @hey-api/openapi-ts 0.87.2 ---- +### Core +- @pinia/colada: correctly access instantiated SDKs ([#2942](https://github.com/hey-api/openapi-ts/pull/2942)) +- @tanstack/query: prettier query options ([#2947](https://github.com/hey-api/openapi-ts/pull/2947)) +- clients: add support for Ky client ([#2958](https://github.com/hey-api/openapi-ts/pull/2958)) +- output: run lint before format ([#2937](https://github.com/hey-api/openapi-ts/pull/2937)) +- parser: merge `default` keyword with `$ref` in OpenAPI 3.1 ([#2946](https://github.com/hey-api/openapi-ts/pull/2946)) +- valibot: use `.strictObject()` instead of `.objectWithRest()` when additional properties are not allowed ([#2945](https://github.com/hey-api/openapi-ts/pull/2945)) -## 2025-11-07 +
+
-### @hey-api/openapi-ts 0.87.1 +# 2025-11-06 -- fix(typescript): remove legacy options ([#2929](https://github.com/hey-api/openapi-ts/pull/2929)) +## @hey-api/openapi-ts 0.87.1 + +### Core - fix(tanstack-query): correctly access instantiated SDKs ([#2939](https://github.com/hey-api/openapi-ts/pull/2939)) +- fix(typescript): remove legacy options ([#2929](https://github.com/hey-api/openapi-ts/pull/2929)) ---- +
+
-## 2025-11-04 +# 2025-11-04 -### @hey-api/openapi-ts 0.86.12 +## @hey-api/openapi-ts 0.87.0 -- fix(transformers): do not reference undefined transformers ([#2924](https://github.com/hey-api/openapi-ts/pull/2924)) -- fix(sdk): add `paramsStructure` option ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) -- fix(sdk): handle conflicts between method names and subclasses in class-based SDKs ([#2920](https://github.com/hey-api/openapi-ts/pull/2920)) -- bundled context types ([#2923](https://github.com/hey-api/openapi-ts/pull/2923)) +### Core +- feat: remove legacy clients and plugins ([#2925](https://github.com/hey-api/openapi-ts/pull/2925)) ---- +### Removed legacy clients -### @hey-api/openapi-ts 0.87.0 +This release removes support for legacy clients and plugins. Please migrate to the new clients if you haven't done so yet. If you're unable to do so due to a missing feature, let us know on [GitHub](https://github.com/hey-api/openapi-ts/issues). -- feat: remove legacy clients and plugins ([#2925](https://github.com/hey-api/openapi-ts/pull/2925)) +
+
---- +# 2025-11-03 -### @hey-api/codegen-core 0.3.3 +## @hey-api/openapi-ts 0.86.12 -### Fixed -- remove most of readonly properties to allow mutating in place ([#2919](https://github.com/hey-api/openapi-ts/pull/2919)) -- update types ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) +### Core +- fix: bundled context types ([#2923](https://github.com/hey-api/openapi-ts/pull/2923)) +- fix(sdk): add `paramsStructure` option ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) +- fix(sdk): handle conflicts between method names and subclasses in class-based SDKs ([#2920](https://github.com/hey-api/openapi-ts/pull/2920)) +- fix(transformers): do not reference undefined transformers ([#2924](https://github.com/hey-api/openapi-ts/pull/2924)) ---- +
+
-## 2025-10-31 +## @hey-api/codegen-core 0.3.3 -### @hey-api/openapi-ts 0.86.10 +### Changed +- fix: remove most of readonly properties to allow mutating in place ([#2919](https://github.com/hey-api/openapi-ts/pull/2919)) +- fix: update types ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) -- fix(parser): handle OpenAPI 2.0 body as JSON by default if not explicitly defined ([#2893](https://github.com/hey-api/openapi-ts/pull/2893)) +
+
---- +# 2025-10-31 -### @hey-api/openapi-ts 0.86.11 +## @hey-api/openapi-ts 0.86.11 +### Core - fix(types): use unique generic names in `PluginInstance` to avoid typing issues ([#2897](https://github.com/hey-api/openapi-ts/pull/2897)) ---- +
+
+ +# 2025-10-30 + +## @hey-api/openapi-ts 0.86.10 + +### Core +- fix(parser): handle OpenAPI 2.0 body as JSON by default if not explicitly defined ([#2893](https://github.com/hey-api/openapi-ts/pull/2893)) + +
+
-### @hey-api/openapi-ts 0.86.9 +## @hey-api/openapi-ts 0.86.9 +### Core +- fix: gracefully handle errors in debug reports ([#2884](https://github.com/hey-api/openapi-ts/pull/2884)) - fix(valibot): handle `time` string format ([#2889](https://github.com/hey-api/openapi-ts/pull/2889)) -- gracefully handle errors in debug reports ([#2884](https://github.com/hey-api/openapi-ts/pull/2884)) - refactor: replace plugin references with queries ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) ---- +
+
-### @hey-api/codegen-core 0.3.2 +## @hey-api/codegen-core 0.3.2 ### Added -- feat: add `.query` method to symbol registry ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) +- feat: add `.query()` method to symbol registry ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) ---- +
+
-## 2025-10-28 +# 2025-10-28 -### @hey-api/openapi-ts 0.86.8 +## @hey-api/openapi-ts 0.86.8 +### Core - fix(valibot): improve handling of additionalProperties type ([#2870](https://github.com/hey-api/openapi-ts/pull/2870)) ---- +
+
-## 2025-10-27 +# 2025-10-27 -### @hey-api/openapi-ts 0.86.5 +## @hey-api/openapi-ts 0.86.7 -- fix(parser): write-only schema incorrectly used in response schemas ([#2850](https://github.com/hey-api/openapi-ts/pull/2850)) -- fix(cli): move cli script to typescript ([#2852](https://github.com/hey-api/openapi-ts/pull/2852)) +### Core +- fix(types): export Operation type ([#2862](https://github.com/hey-api/openapi-ts/pull/2862)) ---- +
+
-### @hey-api/openapi-ts 0.86.6 +## @hey-api/openapi-ts 0.86.6 +### Core - fix(transformers): revert function order to fix infinite cycle regression ([#2855](https://github.com/hey-api/openapi-ts/pull/2855)) ---- +
+
-### @hey-api/openapi-ts 0.86.7 +# 2025-10-26 -- fix(types): export Operation type ([#2862](https://github.com/hey-api/openapi-ts/pull/2862)) +## @hey-api/openapi-ts 0.86.5 ---- +### Core +- fix(cli): move cli script to typescript ([#2852](https://github.com/hey-api/openapi-ts/pull/2852)) +- fix(parser): write-only schema incorrectly used in response schemas ([#2850](https://github.com/hey-api/openapi-ts/pull/2850)) -## 2025-10-25 +
+
-### @hey-api/openapi-ts 0.86.4 +# 2025-10-25 -- feat(parser): pass tags to symbol meta ([#2845](https://github.com/hey-api/openapi-ts/pull/2845)) +## @hey-api/openapi-ts 0.86.4 + +### Core - feat(clients): granular query parameter serialization strategy ([#2837](https://github.com/hey-api/openapi-ts/pull/2837)) +- feat(parser): pass tags to symbol meta ([#2845](https://github.com/hey-api/openapi-ts/pull/2845)) ---- +
+
-## 2025-10-24 +# 2025-10-23 -### @hey-api/openapi-ts 0.86.3 +## @hey-api/openapi-ts 0.86.3 +### Core - feat(parser): add `events` hooks ([#2829](https://github.com/hey-api/openapi-ts/pull/2829)) - fix(parser): writeOnly schema properties missing from request types in nested schemas ([#2793](https://github.com/hey-api/openapi-ts/pull/2793)) ---- +
+
-## 2025-10-23 +## @hey-api/openapi-ts 0.86.2 -### @hey-api/openapi-ts 0.86.2 - -- fix(validators): do not reference variables before they are declared ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) +### Core - fix(renderer): allow duplicate names when one symbol is a type ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) +- fix(validators): do not reference variables before they are declared ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) ---- +
+
-### @hey-api/codegen-core 0.3.1 +## @hey-api/codegen-core 0.3.1 ### Added -- feat: add `isRegistered` method to file and symbol registry ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) +- feat: add `isRegistered()` method to file and symbol registry ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) ---- +
+
-## 2025-10-20 +# 2025-10-20 -### @hey-api/openapi-ts 0.86.1 +## @hey-api/openapi-ts 0.86.1 +### Core - fix(client-axios): revert return error when axios request fails ([#2804](https://github.com/hey-api/openapi-ts/pull/2804)) ---- +
+
-## 2025-10-19 +# 2025-10-19 -### @hey-api/openapi-ts 0.86.0 +## @hey-api/openapi-ts 0.86.0 +### Core - feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) -- do not print error details if logs are set to silent ([#2776](https://github.com/hey-api/openapi-ts/pull/2776)) + + +- fix: do not print error details if logs are set to silent ([#2776](https://github.com/hey-api/openapi-ts/pull/2776)) - fix(client-axios): return error when axios request fails ([#2763](https://github.com/hey-api/openapi-ts/pull/2763)) ---- +
+
-### @hey-api/codegen-core 0.3.0 +## @hey-api/codegen-core 0.3.0 -### Added +### Changed - feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) ---- +
+
-## 2025-10-13 +# 2025-10-13 -### @hey-api/openapi-ts 0.85.2 +## @hey-api/openapi-ts 0.85.2 -- dynamically load c12 to work with cjs modules ([#2755](https://github.com/hey-api/openapi-ts/pull/2755)) +### Core +- fix: dynamically load c12 to work with cjs modules ([#2755](https://github.com/hey-api/openapi-ts/pull/2755)) - fix(cli): detect watch mode with input array ([#2751](https://github.com/hey-api/openapi-ts/pull/2751)) ---- +
+
-## 2025-10-08 +# 2025-10-08 -### @hey-api/openapi-ts 0.85.1 +## @hey-api/openapi-ts 0.85.1 +### Core - fix(zod): allOf in array items being generated as union instead of intersection ([#2736](https://github.com/hey-api/openapi-ts/pull/2736)) ---- +
+
-## 2025-10-06 +# 2025-10-06 -### @hey-api/openapi-ts 0.85.0 +## @hey-api/openapi-ts 0.85.0 +### Core - feat: support multiple configurations ([#2602](https://github.com/hey-api/openapi-ts/pull/2602)) - feat(config): add `output.importFileExtension` option ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) - feat(pinia-colada): query options use `defineQueryOptions` ([#2610](https://github.com/hey-api/openapi-ts/pull/2610)) + +### Updated Pinia Colada query options + +Pinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the [following approaches](https://heyapi.dev/openapi-ts/migrating#updated-pinia-colada-query-options). + +#### No params + +```ts +useQuery(getPetsQuery); +``` + +#### Constant + +```ts +useQuery(getPetByIdQuery, () => ({ + path: { + petId: 1, + }, +})); +``` + +#### Reactive + +```ts +const petId = ref(1); + +useQuery(getPetByIdQuery, () => ({ + path: { + petId: petId.value, + }, +})); +``` + +#### Properties + +```ts +const petId = ref(1); + +useQuery(() => ({ + ...getPetByIdQuery({ + path: { petId: petId.value as number }, + }), + enabled: () => petId.value !== null, +})); +``` - refactor(config): replace 'off' with null to disable options ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) ---- +### Updated `output` options + +We made the `output` configuration more consistent by using `null` to represent disabled options. [This change](https://heyapi.dev/openapi-ts/migrating#updated-output-options) does not affect boolean options. + +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + format: null, + lint: null, + path: "src/client", + tsConfigPath: null, + }, +}; +``` + +
+
-## 2025-09-30 +# 2025-09-30 -### @hey-api/openapi-ts 0.84.4 +## @hey-api/openapi-ts 0.84.4 +### Core - fix(client-ofetch): add missing credentials property support ([#2710](https://github.com/hey-api/openapi-ts/pull/2710)) - fix(config): do not override interactive config from CLI if defined in config file ([#2708](https://github.com/hey-api/openapi-ts/pull/2708)) - fix(zod): correct schemas for numeric and boolean enums ([#2704](https://github.com/hey-api/openapi-ts/pull/2704)) ---- +
+
-## 2025-09-25 +# 2025-09-25 -### @hey-api/openapi-ts 0.84.3 +## @hey-api/openapi-ts 0.84.3 +### Core - fix(validators): escaping slashes in regular expressions ([#2692](https://github.com/hey-api/openapi-ts/pull/2692)) ---- +
+
-## 2025-09-24 +# 2025-09-23 -### @hey-api/openapi-ts 0.84.2 +## @hey-api/openapi-ts 0.84.2 +### Core - fix(parser): add `propertiesRequiredByDefault` transform option ([#2678](https://github.com/hey-api/openapi-ts/pull/2678)) - fix(typescript): do not mark enums as types ([#2680](https://github.com/hey-api/openapi-ts/pull/2680)) ---- +
+
-## 2025-09-23 +# 2025-09-22 -### @hey-api/openapi-ts 0.84.1 +## @hey-api/openapi-ts 0.84.1 +### Core - feat: add `ofetch` client available as `@hey-api/client-ofetch` ([#2642](https://github.com/hey-api/openapi-ts/pull/2642)) - fix(renderer): replace default import placeholder ([#2674](https://github.com/hey-api/openapi-ts/pull/2674)) ---- +
+
-## 2025-09-22 - -### @hey-api/openapi-ts 0.84.0 +## @hey-api/openapi-ts 0.84.0 +### Core - feat: Symbol API -- fix(plugin): every plugin extends Plugin.Hooks interface ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) -- fix(renderer): group and sort imported modules + +### Symbol API + +This release improves the Symbol API, which adds the capability to place symbols in arbitrary files. We preserved the previous output structure for all plugins except Angular. + +You can preserve the previous Angular output by writing your own [placement function](https://heyapi.dev/openapi-ts/configuration/parser#hooks-symbols). + +### Removed `output` plugin option + +Due to the Symbol API release, this option has been removed from the Plugin API. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + + +- fix(axios): remove duplicate `baseURL` when using relative values ([#2624](https://github.com/hey-api/openapi-ts/pull/2624)) +- fix(config): add `output.fileName` option ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) + +## File Name + +You can customize the naming and casing pattern for files using the `fileName` option. + +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + fileName: "{{name}}", + path: "src/client", + }, +}; +``` + +By default, we append every file name with a `.gen` suffix to highlight it's automatically generated. You can customize or disable this suffix using the `fileName.suffix` option. + +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + fileName: { + suffix: ".gen", + }, + path: "src/client", + }, +}; +``` + - fix(parser): expand schema deduplication by including validation constraints in type ID ([#2650](https://github.com/hey-api/openapi-ts/pull/2650)) - fix(parser): bump support for OpenAPI 3.1.2 ([#2667](https://github.com/hey-api/openapi-ts/pull/2667)) -- fix(config): add `output.fileName` option ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) +- fix(plugin): every plugin extends Plugin.Hooks interface ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) +- fix(renderer): group and sort imported modules ---- +### TypeScript renderer -### @hey-api/codegen-core 0.2.0 +We ship a dedicated TypeScript renderer for `.ts` files. This release improves the renderer's ability to group and sort imported modules, resulting in a more polished output. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) -### Added -- feat: Symbol API ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) +
+
---- +## @hey-api/codegen-core 0.2.0 -## 2025-09-11 +### Changed +- feat: Symbol API ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) -### @hey-api/openapi-ts 0.83.1 +
+
-No user-facing changes. +# 2025-09-10 +## @hey-api/openapi-ts 0.83.1 ---- +### Core +- feat(typescript): add `topType` option allowing to choose `any` over `unknown` ([#2629](https://github.com/hey-api/openapi-ts/pull/2629)) +- fix(client): expose all interceptor methods ([#2627](https://github.com/hey-api/openapi-ts/pull/2627)) +- fix(config): correctly load user-defined hooks ([#2623](https://github.com/hey-api/openapi-ts/pull/2623)) +- fix(typescript): handle string and binary string in composite keywords ([#2630](https://github.com/hey-api/openapi-ts/pull/2630)) -## 2025-09-10 +
+
-### @hey-api/openapi-ts 0.83.0 +## @hey-api/openapi-ts 0.83.0 +### Core - feat: Symbol API + +### Symbol API + +This release adds the Symbol API, which significantly reduces the risk of naming collisions. While the generated output should only include formatting changes, this feature introduces breaking changes to the Plugin API that affect custom plugins. + +We will update the [custom plugin guide](https://heyapi.dev/openapi-ts/plugins/custom) once the Plugin API becomes more stable. ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ([`10aea89`](https://github.com/hey-api/openapi-ts/commit/10aea8910771ff72ef9b08d4eacdd6b028833c4c)) by [@mrlubos](https://github.com/mrlubos) + - feat(pinia-colada): remove `groupByTag` option ---- +### Removed `groupByTag` Pinia Colada option -### @hey-api/codegen-core 0.1.0 +This option has been removed to provide a more consistent API across plugins. We plan to bring it back in a future release. ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ([`10aea89`](https://github.com/hey-api/openapi-ts/commit/10aea8910771ff72ef9b08d4eacdd6b028833c4c)) by [@mrlubos](https://github.com/mrlubos) -### Added +
+
+ +## @hey-api/codegen-core 0.1.0 + +### Changed - feat: expand Symbol API ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ---- +
+
-## 2025-09-07 +# 2025-09-07 -### @hey-api/openapi-ts 0.82.5 +## @hey-api/openapi-ts 0.82.5 -- fix(client): `mergeHeaders` functions use `.forEach` instead of `.entries` ([#2585](https://github.com/hey-api/openapi-ts/pull/2585)) -- fix(client): move `getValidRequestBody` function to `client-core` ([#2605](https://github.com/hey-api/openapi-ts/pull/2605)) +### Core +- fix(client): `mergeHeaders` functions use `.forEach()` instead of `.entries()` ([#2585](https://github.com/hey-api/openapi-ts/pull/2585)) +- fix(client): move `getValidRequestBody()` function to `client-core` ([#2605](https://github.com/hey-api/openapi-ts/pull/2605)) ---- +
+
-## 2025-09-05 +# 2025-09-05 -### @hey-api/openapi-ts 0.82.4 +## @hey-api/openapi-ts 0.82.4 +### Core - feat(pinia-colada): implicit `$fetch` for `client-nuxt` (hide `composable`) ([#2598](https://github.com/hey-api/openapi-ts/pull/2598)) - fix(client): improve handling of plain text, falsy, and unserialized request bodies ([#2564](https://github.com/hey-api/openapi-ts/pull/2564)) -- fix(pinia-colada): optional `options` in mutation factory ([#2593](https://github.com/hey-api/openapi-ts/pull/2593)) - fix(parser): improve $ref handling ([#2588](https://github.com/hey-api/openapi-ts/pull/2588)) +- fix(pinia-colada): optional `options` in mutation factory ([#2593](https://github.com/hey-api/openapi-ts/pull/2593)) ---- +
+
-## 2025-09-01 +# 2025-09-01 -### @hey-api/nuxt 0.2.1 +## @hey-api/nuxt 0.2.1 -### Fixed -- update peer dependencies to be more permissible ([#2574](https://github.com/hey-api/openapi-ts/pull/2574)) +### Changed +- fix: update peer dependencies to be more permissible ([#2574](https://github.com/hey-api/openapi-ts/pull/2574)) ---- +
+
-## 2025-08-30 +# 2025-08-30 -### @hey-api/openapi-ts 0.82.1 +## @hey-api/openapi-ts 0.82.1 -- Thanks @ixnas! - feat(typescript): add `typescript-const` to `enums.mode` for generating TypeScript enums as constants ([#2541](https://github.com/hey-api/openapi-ts/pull/2541)) -- Thanks @carson2222! - fix(parser): prune `required` array after removing properties ([#2556](https://github.com/hey-api/openapi-ts/pull/2556)) -- Thanks @jgoz! - fix(output): avoid appending `.gen` to file names multiple times when `output.clean` is `false` ([#2559](https://github.com/hey-api/openapi-ts/pull/2559)) +### Core +- Thanks [@ixnas](https://github.com/ixnas)! - feat(typescript): add `typescript-const` to `enums.mode` for generating TypeScript enums as constants ([#2541](https://github.com/hey-api/openapi-ts/pull/2541)) +- Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): prune `required` array after removing properties ([#2556](https://github.com/hey-api/openapi-ts/pull/2556)) +- Thanks [@jgoz](https://github.com/jgoz)! - fix(output): avoid appending `.gen` to file names multiple times when `output.clean` is `false` ([#2559](https://github.com/hey-api/openapi-ts/pull/2559)) ---- +
+
-## 2025-08-29 +# 2025-08-28 -### @hey-api/openapi-ts 0.82.0 +## @hey-api/openapi-ts 0.82.0 -- Thanks @SebastiaanWouters! - feat(parser): add Hooks API ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) -- Thanks @mrlubos! - fix(client): pass fetch option to sse client ([#2542](https://github.com/hey-api/openapi-ts/pull/2542)) -- Thanks @SebastiaanWouters! - feat(plugin): add `@pinia/colada` plugin ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) -- Thanks @alexedme! - feat(client): added angular, axios, fetch, next & nuxt client type export for external typing purposes. ([#2535](https://github.com/hey-api/openapi-ts/pull/2535)) -- Thanks @carson2222! - fix(parser): improve handling multiple references to shared external variable ([#2544](https://github.com/hey-api/openapi-ts/pull/2544)) -- Thanks @volesen! - fix(client): improve empty response body handling ([#2519](https://github.com/hey-api/openapi-ts/pull/2519)) -- Thanks @josh-hemphill! - feat(plugin): add `@pinia/colada` plugin ([#1680](https://github.com/hey-api/openapi-ts/pull/1680)) -- Thanks @carson2222! - fix(parser): improve `readWrite` transformer splitting logic ([#2530](https://github.com/hey-api/openapi-ts/pull/2530)) -- Thanks @carson2222! - fix(parser): handle `patternProperties` in OpenAPI 3.1 ([#2523](https://github.com/hey-api/openapi-ts/pull/2523)) +### Core +- Thanks [@SebastiaanWouters](https://github.com/SebastiaanWouters)! - feat(parser): add Hooks API ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) ---- +### Added Hooks API -## 2025-08-24 +This release adds the [Hooks API](https://heyapi.dev/openapi-ts/configuration/parser#hooks), giving you granular control over which operations generate queries and mutations. As a result, we tightened the previous behavior and POST operations no longer generate queries by default. To preserve the old behavior, add a custom matcher. -### @hey-api/openapi-ts 0.81.1 +```js +export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + parser: { + hooks: { + operations: { + isQuery: (op) => (op.method === "post" ? true : undefined), + }, + }, + }, +}; +``` -- Thanks @mrlubos! - feat(typescript): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) -- Thanks @malcolm-kee! - fix(parser): correctly handle schema extending discriminated schema ([#2515](https://github.com/hey-api/openapi-ts/pull/2515)) -- Thanks @mrlubos! - fix(client): move sse functions into their own namespace ([#2513](https://github.com/hey-api/openapi-ts/pull/2513)) -- Thanks @mrlubos! - feat(validator): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) -- Thanks @mrlubos! - feat(parser): handle webhooks in OpenAPI 3.1 ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): pass fetch option to sse client ([#2542](https://github.com/hey-api/openapi-ts/pull/2542)) +- Thanks [@SebastiaanWouters](https://github.com/SebastiaanWouters)! - feat(plugin): add `@pinia/colada` plugin ([#2505](https://github.com/hey-api/openapi-ts/pull/2505)) +- Thanks [@alexedme](https://github.com/alexedme)! - feat(client): added angular, axios, fetch, next & nuxt client type export for external typing purposes. ([#2535](https://github.com/hey-api/openapi-ts/pull/2535)) +- Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): improve handling multiple references to shared external variable ([#2544](https://github.com/hey-api/openapi-ts/pull/2544)) +- Thanks [@volesen](https://github.com/volesen)! - fix(client): improve empty response body handling ([#2519](https://github.com/hey-api/openapi-ts/pull/2519)) +- Thanks [@josh-hemphill](https://github.com/josh-hemphill)! - feat(plugin): add `@pinia/colada` plugin ([#1680](https://github.com/hey-api/openapi-ts/pull/1680)) +- Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): improve `readWrite` transformer splitting logic ([#2530](https://github.com/hey-api/openapi-ts/pull/2530)) +- Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): handle `patternProperties` in OpenAPI 3.1 ([#2523](https://github.com/hey-api/openapi-ts/pull/2523)) -## 2025-08-23 +
+
-### @hey-api/openapi-ts 0.81.0 +# 2025-08-24 -- Thanks @mrlubos! - feat(client): add support for server-sent events (SSE) ([#2510](https://github.com/hey-api/openapi-ts/pull/2510)) +## @hey-api/openapi-ts 0.81.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(typescript): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) +- Thanks [@malcolm-kee](https://github.com/malcolm-kee)! - fix(parser): correctly handle schema extending discriminated schema ([#2515](https://github.com/hey-api/openapi-ts/pull/2515)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): move sse functions into their own namespace ([#2513](https://github.com/hey-api/openapi-ts/pull/2513)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validator): add webhooks configuration options ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): handle webhooks in OpenAPI 3.1 ([#2516](https://github.com/hey-api/openapi-ts/pull/2516)) -## 2025-08-21 +
+
-### @hey-api/openapi-ts 0.80.16 +# 2025-08-22 -- Thanks @mrlubos! - fix(client): Nuxt client receives raw body in request validators ([#2490](https://github.com/hey-api/openapi-ts/pull/2490)) -- Thanks @dracomithril! - fix(parser): deduplicate security schemas based on name ([#2479](https://github.com/hey-api/openapi-ts/pull/2479)) -- Thanks @mrlubos! - feat(parser): input supports Hey API Registry shorthand ([#2489](https://github.com/hey-api/openapi-ts/pull/2489)) -- Thanks @bombillazo! - feat(parser): input supports ReadMe API Registry with `readme:` prefix ([#2485](https://github.com/hey-api/openapi-ts/pull/2485)) -- Thanks @mrlubos! - feat(parser): input supports Scalar API Registry with `scalar:` prefix ([#2491](https://github.com/hey-api/openapi-ts/pull/2491)) +## @hey-api/openapi-ts 0.81.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(client): add support for server-sent events (SSE) ([#2510](https://github.com/hey-api/openapi-ts/pull/2510)) -### @hey-api/openapi-ts 0.80.17 +
+
-- Thanks @max-scopp! - fix(client): Angular client correctly applies default GET method ([#2500](https://github.com/hey-api/openapi-ts/pull/2500)) +# 2025-08-21 ---- +## @hey-api/openapi-ts 0.80.18 -### @hey-api/openapi-ts 0.80.18 +### Core +- Thanks [@malcolm-kee](https://github.com/malcolm-kee)! - fix(parser): OpenAPI 3.1 parser handles multiple `type` values ([#2502](https://github.com/hey-api/openapi-ts/pull/2502)) -- Thanks @malcolm-kee! - fix(parser): OpenAPI 3.1 parser handles multiple `type` values ([#2502](https://github.com/hey-api/openapi-ts/pull/2502)) +
+
---- +## @hey-api/openapi-ts 0.80.17 -## 2025-08-20 +### Core +- Thanks [@max-scopp](https://github.com/max-scopp)! - fix(client): Angular client correctly applies default GET method ([#2500](https://github.com/hey-api/openapi-ts/pull/2500)) -### @hey-api/openapi-ts 0.80.15 +
+
-- Thanks @dracomithril! - fix(client): call `auth` function for every unique security `name` ([#2480](https://github.com/hey-api/openapi-ts/pull/2480)) -- Thanks @mrlubos! - fix(parser): cache parent to children nodes ([#2481](https://github.com/hey-api/openapi-ts/pull/2481)) +# 2025-08-20 ---- +## @hey-api/openapi-ts 0.80.16 -## 2025-08-19 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): Nuxt client receives raw body in request validators ([#2490](https://github.com/hey-api/openapi-ts/pull/2490)) +- Thanks [@dracomithril](https://github.com/dracomithril)! - fix(parser): deduplicate security schemas based on name ([#2479](https://github.com/hey-api/openapi-ts/pull/2479)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): input supports Hey API Registry shorthand ([#2489](https://github.com/hey-api/openapi-ts/pull/2489)) +- Thanks [@bombillazo](https://github.com/bombillazo)! - feat(parser): input supports ReadMe API Registry with `readme:` prefix ([#2485](https://github.com/hey-api/openapi-ts/pull/2485)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): input supports Scalar API Registry with `scalar:` prefix ([#2491](https://github.com/hey-api/openapi-ts/pull/2491)) -### @hey-api/openapi-ts 0.80.14 +
+
-- Thanks @mrlubos! - fix(parser): cache visited graph nodes to boost performance ([#2475](https://github.com/hey-api/openapi-ts/pull/2475)) +# 2025-08-19 ---- +## @hey-api/openapi-ts 0.80.15 -## 2025-08-18 +### Core +- Thanks [@dracomithril](https://github.com/dracomithril)! - fix(client): call `auth()` function for every unique security `name` ([#2480](https://github.com/hey-api/openapi-ts/pull/2480)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): cache parent to children nodes ([#2481](https://github.com/hey-api/openapi-ts/pull/2481)) -### @hey-api/openapi-ts 0.80.12 +
+
-- Thanks @bjornhenriksson! - fix(zod): add `dates.local` option to allow unqualified (timezone-less) datetimes ([#2467](https://github.com/hey-api/openapi-ts/pull/2467)) +# 2025-08-18 ---- +## @hey-api/openapi-ts 0.80.14 -### @hey-api/openapi-ts 0.80.13 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): cache visited graph nodes to boost performance ([#2475](https://github.com/hey-api/openapi-ts/pull/2475)) -- Thanks @josstn! - fix(parser): handle non-ascii characters in discriminator ([#2471](https://github.com/hey-api/openapi-ts/pull/2471)) +
+
---- +## @hey-api/openapi-ts 0.80.13 -## 2025-08-16 +### Core +- Thanks [@josstn](https://github.com/josstn)! - fix(parser): handle non-ascii characters in discriminator ([#2471](https://github.com/hey-api/openapi-ts/pull/2471)) -### @hey-api/openapi-ts 0.80.11 +
+
-- Thanks @mrlubos! - feat(client): add `@hey-api/client-angular` client ([#2452](https://github.com/hey-api/openapi-ts/pull/2452)) -- Thanks @max-scopp! - feat(plugin): add `@angular/common` plugin ([#2423](https://github.com/hey-api/openapi-ts/pull/2423)) +## @hey-api/openapi-ts 0.80.12 ---- +### Core +- Thanks [@bjornhenriksson](https://github.com/bjornhenriksson)! - fix(zod): add `dates.local` option to allow unqualified (timezone-less) datetimes ([#2467](https://github.com/hey-api/openapi-ts/pull/2467)) -## 2025-08-14 +
+
-### @hey-api/openapi-ts 0.80.10 +# 2025-08-15 -- Thanks @mrlubos! - fix(client): handle dates in formdata serializer ([#2438](https://github.com/hey-api/openapi-ts/pull/2438)) +## @hey-api/openapi-ts 0.80.11 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(client): add `@hey-api/client-angular` client ([#2452](https://github.com/hey-api/openapi-ts/pull/2452)) +- Thanks [@max-scopp](https://github.com/max-scopp)! - feat(plugin): add `@angular/common` plugin ([#2423](https://github.com/hey-api/openapi-ts/pull/2423)) -## 2025-08-13 +
+
-### @hey-api/openapi-ts 0.80.9 +# 2025-08-13 -- Thanks @flow96! - fix(sdk): handle infinite loop in nested operation IDs and tags with duplicate values ([#2426](https://github.com/hey-api/openapi-ts/pull/2426)) +## @hey-api/openapi-ts 0.80.10 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): handle dates in formdata serializer ([#2438](https://github.com/hey-api/openapi-ts/pull/2438)) -## 2025-08-11 +
+
-### @hey-api/openapi-ts 0.80.8 +# 2025-08-12 -- Thanks @mrlubos! - fix(client): add auto-generated header to client files ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) -- Thanks @mrlubos! - fix(client): correctly rename client files with nodenext bundler ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) -- Thanks @mrlubos! - fix(tanstack-query): set correct name for pagination parameters in infinite query options ([#2416](https://github.com/hey-api/openapi-ts/pull/2416)) +## @hey-api/openapi-ts 0.80.9 ---- +### Core +- Thanks [@flow96](https://github.com/flow96)! - fix(sdk): handle infinite loop in nested operation IDs and tags with duplicate values ([#2426](https://github.com/hey-api/openapi-ts/pull/2426)) -## 2025-08-09 +
+
-### @hey-api/openapi-ts 0.80.6 +# 2025-08-10 -- Thanks @ahmedrowaihi! - feat(tanstack-query): support generating `meta` fields ([#2399](https://github.com/hey-api/openapi-ts/pull/2399)) -- Thanks @dovca! - feat(clients): pass raw `body` to interceptors, provide serialized body in `serializedBody` ([#2406](https://github.com/hey-api/openapi-ts/pull/2406)) -- Thanks @flow96! - fix(sdk): prevent infinite loop when a schema tag matches operation ID ([#2407](https://github.com/hey-api/openapi-ts/pull/2407)) +## @hey-api/openapi-ts 0.80.8 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): add auto-generated header to client files ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): correctly rename client files with nodenext bundler ([#2418](https://github.com/hey-api/openapi-ts/pull/2418)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): set correct name for pagination parameters in infinite query options ([#2416](https://github.com/hey-api/openapi-ts/pull/2416)) -### @hey-api/openapi-ts 0.80.7 +
+
-- Thanks @Shinigami92! - fix(client): add `.gen` to client files ([#2396](https://github.com/hey-api/openapi-ts/pull/2396)) +# 2025-08-09 ---- +## @hey-api/openapi-ts 0.80.7 -## 2025-08-07 +### Core +- Thanks [@Shinigami92](https://github.com/Shinigami92)! - fix(client): add `.gen` to client files ([#2396](https://github.com/hey-api/openapi-ts/pull/2396)) -### @hey-api/openapi-ts 0.80.5 +
+
-- Thanks @mrclrchtr! - fix: resolve Yarn PnP compatibility issues with client bundle generation ([#2401](https://github.com/hey-api/openapi-ts/pull/2401)) +# 2025-08-08 ---- +## @hey-api/openapi-ts 0.80.6 -## 2025-08-06 +### Core +- Thanks [@ahmedrowaihi](https://github.com/ahmedrowaihi)! - feat(tanstack-query): support generating `meta` fields ([#2399](https://github.com/hey-api/openapi-ts/pull/2399)) +- Thanks [@dovca](https://github.com/dovca)! - feat(clients): pass raw `body` to interceptors, provide serialized body in `serializedBody` ([#2406](https://github.com/hey-api/openapi-ts/pull/2406)) +- Thanks [@flow96](https://github.com/flow96)! - fix(sdk): prevent infinite loop when a schema tag matches operation ID ([#2407](https://github.com/hey-api/openapi-ts/pull/2407)) -### @hey-api/openapi-ts 0.80.3 +
+
-- Thanks @MaxwellAt! - fix(zod): improve handling of additional properties ([#2287](https://github.com/hey-api/openapi-ts/pull/2287)) +# 2025-08-06 ---- +## @hey-api/openapi-ts 0.80.5 -### @hey-api/openapi-ts 0.80.4 +### Core +- Thanks [@mrclrchtr](https://github.com/mrclrchtr)! - fix: resolve Yarn PnP compatibility issues with client bundle generation ([#2401](https://github.com/hey-api/openapi-ts/pull/2401)) -- Thanks @ahmedrowaihi! - fix(tanstack-query): add `queryKeys.tags` and `infiniteQueryKeys.tags` options ([#2391](https://github.com/hey-api/openapi-ts/pull/2391)) +
+
---- +## @hey-api/openapi-ts 0.80.4 -## 2025-08-03 +### Core +- Thanks [@ahmedrowaihi](https://github.com/ahmedrowaihi)! - fix(tanstack-query): add `queryKeys.tags` and `infiniteQueryKeys.tags` options ([#2391](https://github.com/hey-api/openapi-ts/pull/2391)) -### @hey-api/openapi-ts 0.80.2 +
+
-- Thanks @j-ibarra! - fix(transformers): add `typeTransformers` option allowing passing custom transform functions ([#2383](https://github.com/hey-api/openapi-ts/pull/2383)) -- Thanks @idbenami! - fix(client-axios): allow passing `AxiosInstance` into `axios` field ([#2382](https://github.com/hey-api/openapi-ts/pull/2382)) +## @hey-api/openapi-ts 0.80.3 ---- +### Core +- Thanks [@MaxwellAt](https://github.com/MaxwellAt)! - fix(zod): improve handling of additional properties ([#2287](https://github.com/hey-api/openapi-ts/pull/2287)) -## 2025-07-24 +
+
-### @hey-api/openapi-ts 0.80.1 +# 2025-08-03 -- Thanks @Daschi1! - fix(valibot): expand support for `format: int64` ([#2344](https://github.com/hey-api/openapi-ts/pull/2344)) +## @hey-api/openapi-ts 0.80.2 ---- +### Core +- Thanks [@j-ibarra](https://github.com/j-ibarra)! - fix(transformers): add `typeTransformers` option allowing passing custom transform functions ([#2383](https://github.com/hey-api/openapi-ts/pull/2383)) +- Thanks [@idbenami](https://github.com/idbenami)! - fix(client-axios): allow passing `AxiosInstance` into `axios` field ([#2382](https://github.com/hey-api/openapi-ts/pull/2382)) -## 2025-07-23 +
+
-### @hey-api/openapi-ts 0.80.0 +# 2025-07-24 -- Thanks @mrlubos! - feat(zod): add support for Zod 4 and Zod Mini ([#2341](https://github.com/hey-api/openapi-ts/pull/2341)) +## @hey-api/openapi-ts 0.80.1 ---- +### Core +- Thanks [@Daschi1](https://github.com/Daschi1)! - fix(valibot): expand support for `format: int64` ([#2344](https://github.com/hey-api/openapi-ts/pull/2344)) -## 2025-07-22 +
+
-### @hey-api/openapi-ts 0.79.2 +# 2025-07-23 -- Thanks @Le0Developer! - fix(typescript): add support for TypeID types ([#2034](https://github.com/hey-api/openapi-ts/pull/2034)) -- Thanks @alexvuka1! - fix(parser): respect `output.case` when generating operation id ([#2041](https://github.com/hey-api/openapi-ts/pull/2041)) +## @hey-api/openapi-ts 0.80.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(zod): add support for Zod 4 and Zod Mini ([#2341](https://github.com/hey-api/openapi-ts/pull/2341)) -## 2025-07-21 + ### Added Zod 4 and Zod Mini -### @hey-api/openapi-ts 0.79.1 + This release adds support for Zod 4 and Zod Mini. By default, the `zod` plugin will generate output for Zod 4. If you want to preserve the previous output for Zod 3 or use Zod Mini, set `compatibilityVersion` to `3` or `mini`. -- Thanks @mrlubos! - fix: respect NO_INTERACTIVE and NO_INTERACTION environment variables ([#2336](https://github.com/hey-api/openapi-ts/pull/2336)) -- Thanks @mrlubos! - fix(client): update Axios headers types ([#2331](https://github.com/hey-api/openapi-ts/pull/2331)) -- Thanks @mrlubos! - fix: improve handlebars types for jsr compliance ([#2334](https://github.com/hey-api/openapi-ts/pull/2334)) -- Thanks @mrlubos! - fix(tanstack-query): set query key base url from options if defined ([#2333](https://github.com/hey-api/openapi-ts/pull/2333)) + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "zod", + compatibilityVersion: 3, + }, + ], + }; + ``` ---- + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "zod", + compatibilityVersion: "mini", + }, + ], + }; + ``` -## 2025-07-20 +
+
-### @hey-api/openapi-ts 0.79.0 +# 2025-07-21 -- Thanks @mrlubos! - fix(typescript): removed `typescript+namespace` enums mode ([#2284](https://github.com/hey-api/openapi-ts/pull/2284)) +## @hey-api/openapi-ts 0.79.2 ---- +### Core +- Thanks [@Le0Developer](https://github.com/Le0Developer)! - fix(typescript): add support for TypeID types ([#2034](https://github.com/hey-api/openapi-ts/pull/2034)) +- Thanks [@alexvuka1](https://github.com/alexvuka1)! - fix(parser): respect `output.case` when generating operation id ([#2041](https://github.com/hey-api/openapi-ts/pull/2041)) -## 2025-07-10 +
+
-### @hey-api/openapi-ts 0.78.3 +# 2025-07-20 -- Thanks @btmnk! - fix(client): improve types to pass `@total-typescript/ts-reset` rules ([#2290](https://github.com/hey-api/openapi-ts/pull/2290)) +## @hey-api/openapi-ts 0.79.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: respect NO_INTERACTIVE and NO_INTERACTION environment variables ([#2336](https://github.com/hey-api/openapi-ts/pull/2336)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): update Axios headers types ([#2331](https://github.com/hey-api/openapi-ts/pull/2331)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve handlebars types for jsr compliance ([#2334](https://github.com/hey-api/openapi-ts/pull/2334)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): set query key base url from options if defined ([#2333](https://github.com/hey-api/openapi-ts/pull/2333)) -## 2025-07-07 +
+
-### @hey-api/openapi-ts 0.78.2 +## @hey-api/openapi-ts 0.79.0 -- Thanks @j-ibarra! - fix(transformers): add `transformers` option allowing passing custom transform functions ([#2281](https://github.com/hey-api/openapi-ts/pull/2281)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): removed `typescript+namespace` enums mode ([#2284](https://github.com/hey-api/openapi-ts/pull/2284)) ---- + ### Removed `typescript+namespace` enums mode -## 2025-07-05 + Due to a simpler TypeScript plugin implementation, the `typescript+namespace` enums mode is no longer necessary. This mode was used in the past to group inline enums under the same namespace. With the latest changes, this behavior is no longer supported. You can either choose to ignore inline enums (default), or use the `enums` transform (added in v0.78.0) to convert them into reusable components which will get exported as usual. -### @hey-api/openapi-ts 0.78.0 +
+
-- Thanks @mrlubos! - feat(config): add `parser` options ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) -- `input.filters` moved to `parser.filters` -- `input.pagination` moved to `parser.pagination` -- `input.patch` moved to `parser.patch` -- `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL` -- `enumsCase` moved to `enums.case` -- `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull` -- `exportInlineEnums` moved to `parser.transforms.enums` -- `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled` -- `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name` -- `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name` -- Thanks @mrlubos! - fix(config): add `operations` option to `parser.patch` ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) +# 2025-07-09 ---- +## @hey-api/openapi-ts 0.78.3 -### @hey-api/openapi-ts 0.78.1 +### Core +- Thanks [@btmnk](https://github.com/btmnk)! - fix(client): improve types to pass `@total-typescript/ts-reset` rules ([#2290](https://github.com/hey-api/openapi-ts/pull/2290)) -- Thanks @mrlubos! - fix(valibot): properly handle array minLength and maxLength ([#2275](https://github.com/hey-api/openapi-ts/pull/2275)) -- Thanks @mrlubos! - fix(typescript): handle additionalProperties in propertyNames ([#2279](https://github.com/hey-api/openapi-ts/pull/2279)) -- Thanks @mrlubos! - fix(clients): annotate serializer return types ([#2277](https://github.com/hey-api/openapi-ts/pull/2277)) -- Thanks @mrlubos! - fix(zod): add `dates.offset` option ([#2280](https://github.com/hey-api/openapi-ts/pull/2280)) +
+
---- +# 2025-07-07 -## 2025-06-25 +## @hey-api/openapi-ts 0.78.2 -### @hey-api/openapi-ts 0.77.0 +### Core +- Thanks [@j-ibarra](https://github.com/j-ibarra)! - fix(transformers): add `transformers` option allowing passing custom transform functions ([#2281](https://github.com/hey-api/openapi-ts/pull/2281)) -- Thanks @mrlubos! - refactor(plugin): add `DefinePlugin` utility types ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) -- Thanks @mrlubos! - feat(sdk): update `validator` option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) -- Thanks @mrlubos! - fix(client): add requestValidator option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) +
+
---- +# 2025-07-05 -## 2025-06-23 +## @hey-api/openapi-ts 0.78.1 -### @hey-api/openapi-ts 0.76.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): properly handle array minLength and maxLength ([#2275](https://github.com/hey-api/openapi-ts/pull/2275)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle additionalProperties in propertyNames ([#2279](https://github.com/hey-api/openapi-ts/pull/2279)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(clients): annotate serializer return types ([#2277](https://github.com/hey-api/openapi-ts/pull/2277)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): add `dates.offset` option ([#2280](https://github.com/hey-api/openapi-ts/pull/2280)) -- Thanks @mrlubos! - feat(valibot): generate a single schema for requests ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) -- Thanks @mrlubos! - fix(parser): prefer JSON media type ([#2221](https://github.com/hey-api/openapi-ts/pull/2221)) -- Thanks @mrlubos! - fix(valibot): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) +
+
---- +# 2025-07-04 -## 2025-06-22 +## @hey-api/openapi-ts 0.78.0 -### @hey-api/openapi-ts 0.75.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(config): add `parser` options ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) -- Thanks @mrlubos! - feat(parser): replace `plugin.subscribe` with `plugin.forEach` ([#2215](https://github.com/hey-api/openapi-ts/pull/2215)) -- Thanks @mrlubos! - feat(tanstack-query): add name and case options ([#2218](https://github.com/hey-api/openapi-ts/pull/2218)) -- `queryOptionsNameBuilder` renamed to `queryOptions` -- `infiniteQueryOptionsNameBuilder` renamed to `infiniteQueryOptions` -- `mutationOptionsNameBuilder` renamed to `mutationOptions` -- `queryKeyNameBuilder` renamed to `queryKeys` -- `infiniteQueryKeyNameBuilder` renamed to `infiniteQueryKeys` -- Thanks @mrlubos! - fix: make output pass stricter tsconfig configurations" ([#2219](https://github.com/hey-api/openapi-ts/pull/2219)) -- Thanks @mrlubos! - fix(validators): handle additional properties object when no other properties are defined ([#2213](https://github.com/hey-api/openapi-ts/pull/2213)) -- Thanks @mrlubos! - fix(parser): add `meta` and `version` options to input.patch ([#2216](https://github.com/hey-api/openapi-ts/pull/2216)) -- Thanks @mrlubos! - fix(cli): correctly detect watch mode ([#2210](https://github.com/hey-api/openapi-ts/pull/2210)) + ### Added `parser` options ---- + Previously, `@hey-api/typescript` would generate correct types, but the validator plugins would have to re-implement the same logic or generate schemas that didn't match the generated types. -## 2025-06-19 + Since neither option was ideal, this release adds a dedicated place for `parser` options. Parser is responsible for preparing the input so plugins can generate more accurate output with less effort. -### @hey-api/openapi-ts 0.74.0 + You can learn more about configuring parser on the [Parser](https://heyapi.dev/openapi-ts/configuration/parser) page. -- Thanks @mrlubos! - feat(zod): generate a single schema for requests ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) -- Thanks @Daschi1! - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format ([#2192](https://github.com/hey-api/openapi-ts/pull/2192)) -- Thanks @mrlubos! - fix(parser): do not mark schemas as duplicate if they have different format ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) + ### Moved `input` options ---- + The following options were moved to the new `parser` group. -## 2025-06-14 + - `input.filters` moved to `parser.filters` + - `input.pagination` moved to `parser.pagination` + - `input.patch` moved to `parser.patch` + - `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL` -### @hey-api/openapi-ts 0.73.0 + ### Updated `typescript` options -- Thanks @mrlubos! - feat: bundle `@hey-api/client-*` plugins ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) -- Thanks @mrlubos! - fix: respect logs setting if initialization fails ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) -- Thanks @mrlubos! - fix: export default pagination keywords ([#2170](https://github.com/hey-api/openapi-ts/pull/2170)) + The following options were renamed. ---- + - `enumsCase` moved to `enums.case` + - `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull` -### @hey-api/nuxt 0.2.0 + ### Moved `typescript` options -### Changed -- Thanks @mrlubos! - feat: remove `@hey-api/client-nuxt` dependency ([#2175](https://github.com/hey-api/openapi-ts/pull/2175)) + The following options were moved to the new `parser` group. ---- + - `exportInlineEnums` moved to `parser.transforms.enums` + - `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled` + - `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name` + - `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name` -## 2025-06-12 + ### Updated `readWrite.responses` name -### @hey-api/openapi-ts 0.72.2 + Additionally, the naming pattern for response schemas has changed from `{name}Readable` to `{name}`. This is to prevent your code from breaking by default when using a schema that gets updated with a write-only field. -- Thanks @mrlubos! - fix(zod): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes ([#2163](https://github.com/hey-api/openapi-ts/pull/2163)) -- Thanks @mrlubos! - fix(tanstack-query): add name builder options for all generated artifacts ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) -- Thanks @mrlubos! - fix(parser): filter orphans only when there are some operations ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) -- Thanks @mrlubos! - fix(zod): support tuple types ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) -- Thanks @mrlubos! - fix(parser): set correct subscription context for plugins ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(config): add `operations` option to `parser.patch` ([#2246](https://github.com/hey-api/openapi-ts/pull/2246)) -## 2025-06-11 +
+
-### @hey-api/openapi-ts 0.72.1 +# 2025-06-24 -- Thanks @Joshua-hypt! - fix(zod): handle array union types ([#2159](https://github.com/hey-api/openapi-ts/pull/2159)) +## @hey-api/openapi-ts 0.77.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - refactor(plugin): add `DefinePlugin` utility types ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) -## 2025-06-10 + ### Updated Plugin API -### @hey-api/openapi-ts 0.72.0 + Please refer to the [custom plugin](https://heyapi.dev/openapi-ts/plugins/custom) tutorial for the latest guide. -- Thanks @mrlubos! - feat(sdk): add `classStructure` option supporting dot or slash `operationId` notation when generating class-based SDKs ([#2141](https://github.com/hey-api/openapi-ts/pull/2141)) -- Thanks @mrlubos! - fix: add crash report prompt ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) -- Thanks @mrlubos! - fix(parser): handle `propertyNames` keyword ([#2153](https://github.com/hey-api/openapi-ts/pull/2153)) -- Thanks @mrlubos! - fix(validators): correctly generate default value for `BigInt` ([#2152](https://github.com/hey-api/openapi-ts/pull/2152)) -- Thanks @mrlubos! - fix(typescript): handle nested inline objects with write/read only fields ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): update `validator` option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) ---- + ### Updated `sdk.validator` option -## 2025-06-06 + Clients can now validate both request and response data. As a result, passing a boolean or string to `validator` will control both of these options. To preserve the previous behavior, set `validator.request` to `false` and `validator.response` to your previous configuration. -### @hey-api/openapi-ts 0.71.1 + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "@hey-api/sdk", + validator: { + request: false, + response: true, + }, + }, + ], + }; + ``` -- Thanks @mrlubos! - fix(parser): skip schema if it's an array or tuple and its items don't have any matching readable or writable scopes ([#2139](https://github.com/hey-api/openapi-ts/pull/2139)) -- Thanks @mrlubos! - fix(parser): validate operationId keyword ([#2140](https://github.com/hey-api/openapi-ts/pull/2140)) -- Thanks @mrlubos! - fix(parser): respect exportFromIndex option when using legacy clients ([#2137](https://github.com/hey-api/openapi-ts/pull/2137)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): add requestValidator option ([#2227](https://github.com/hey-api/openapi-ts/pull/2227)) -## 2025-06-05 +
+
-### @hey-api/openapi-ts 0.71.0 +# 2025-06-22 -- Thanks @mrlubos! - fix(sdk): rename `serviceNameBuilder` to `classNameBuilder` ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) -- Thanks @johnny-mh! - feat(parser): allow patching specs with `input.patch` ([#2117](https://github.com/hey-api/openapi-ts/pull/2117)) -- Thanks @mrlubos! - fix(typescript): better detect enum namespace ([#2132](https://github.com/hey-api/openapi-ts/pull/2132)) -- Thanks @mrlubos! - feat(sdk): add `instance` option for instantiable SDKs ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) +## @hey-api/openapi-ts 0.76.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(valibot): generate a single schema for requests ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) -## 2025-06-04 + ### Single Valibot schema per request -### @hey-api/openapi-ts 0.70.0 + 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. -- Thanks @mrlubos! - feat(sdk): add responseStyle option ([#2123](https://github.com/hey-api/openapi-ts/pull/2123)) -- Thanks @mrlubos! - fix(typescript): ensure generated enum uses unique namespace to avoid conflicts with non-enum declarations ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) -- Thanks @mrlubos! - fix(typescript): handle duplicate inline enum names ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) + ```ts + const vData = v.object({ + body: v.optional( + v.object({ + foo: v.optional(v.string()), + bar: v.optional(v.union([v.number(), v.null()])), + }) + ), + headers: v.optional(v.never()), + path: v.object({ + baz: v.string(), + }), + query: v.optional(v.never()), + }); + ``` ---- + 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`. -## 2025-06-02 -### @hey-api/openapi-ts 0.69.2 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): prefer JSON media type ([#2221](https://github.com/hey-api/openapi-ts/pull/2221)) +- 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 ([#2226](https://github.com/hey-api/openapi-ts/pull/2226)) -- Thanks @mrlubos! - feat(parser): add validate_EXPERIMENTAL option ([#2110](https://github.com/hey-api/openapi-ts/pull/2110)) -- Thanks @mrlubos! - fix(validators): do not wrap regular expression in slashes if the pattern is already wrapped ([#2114](https://github.com/hey-api/openapi-ts/pull/2114)) -- Thanks @mrlubos! - fix(tanstack-query): create a shallow copy of queryKey in createInfiniteParams function ([#2115](https://github.com/hey-api/openapi-ts/pull/2115)) +
+
---- +# 2025-06-21 -## 2025-05-30 +## @hey-api/openapi-ts 0.75.0 -### @hey-api/openapi-ts 0.69.1 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): replace `plugin.subscribe()` with `plugin.forEach()` ([#2215](https://github.com/hey-api/openapi-ts/pull/2215)) -- Thanks @mrlubos! - fix(valibot): use isoDate instead of date for date strings ([#2109](https://github.com/hey-api/openapi-ts/pull/2109)) -- Thanks @mrlubos! - fix(typescript): generates union of arrays when items use nested oneOf ([#2108](https://github.com/hey-api/openapi-ts/pull/2108)) -- Thanks @mrlubos! - fix(schema): nameBuilder can be a string ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) -- Thanks @mrlubos! - fix(sdk): serviceNameBuilder can be a function ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) + ### Added `plugin.forEach()` method ---- + This method replaces the `.subscribe()` method. Additionally, `.forEach()` is executed immediately, which means we don't need the `before` and `after` events – simply move your code before and after the `.forEach()` block. -## 2025-05-29 + ```ts + plugin.forEach("operation", "schema", (event) => { + // do something with event + }); + ``` -### @hey-api/openapi-ts 0.69.0 +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(tanstack-query): add name and case options ([#2218](https://github.com/hey-api/openapi-ts/pull/2218)) -- Thanks @mrlubos! - feat(sdk): use responses/errors map instead of union ([#2094](https://github.com/hey-api/openapi-ts/pull/2094)) -- Thanks @mrlubos! - feat(validators): generate schemas for request parameters ([#2100](https://github.com/hey-api/openapi-ts/pull/2100)) -- Thanks @mrlubos! - feat(validators): generate schemas for request bodies ([#2099](https://github.com/hey-api/openapi-ts/pull/2099)) -- Thanks @mrlubos! - fix(sdk): skip spreading required headers when there are conflicting Content-Type headers ([#2097](https://github.com/hey-api/openapi-ts/pull/2097)) -- Thanks @mrlubos! - fix(pagination): improved schema resolver for parameters ([#2096](https://github.com/hey-api/openapi-ts/pull/2096)) + ### Updated TanStack Query options ---- + The TanStack Query plugin options have been expanded to support more naming and casing patterns. As a result, the following options have been renamed. -## 2025-05-28 + - `queryOptionsNameBuilder` renamed to `queryOptions` + - `infiniteQueryOptionsNameBuilder` renamed to `infiniteQueryOptions` + - `mutationOptionsNameBuilder` renamed to `mutationOptions` + - `queryKeyNameBuilder` renamed to `queryKeys` + - `infiniteQueryKeyNameBuilder` renamed to `infiniteQueryKeys` -### @hey-api/openapi-ts 0.68.0 -- Thanks @mrlubos! - feat: upgraded input filters ([#2072](https://github.com/hey-api/openapi-ts/pull/2072)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make output pass stricter tsconfig configurations" ([#2219](https://github.com/hey-api/openapi-ts/pull/2219)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): handle additional properties object when no other properties are defined ([#2213](https://github.com/hey-api/openapi-ts/pull/2213)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): add `meta` and `version` options to input.patch ([#2216](https://github.com/hey-api/openapi-ts/pull/2216)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(cli): correctly detect watch mode ([#2210](https://github.com/hey-api/openapi-ts/pull/2210)) ---- +
+
-### @hey-api/openapi-ts 0.68.1 +# 2025-06-19 -- Thanks @mrlubos! - fix(parser): add back support for regular expressions in input filters ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) -- Thanks @mrlubos! - fix(parser): extend input filters to handle reusable parameters and responses ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) +## @hey-api/openapi-ts 0.74.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(zod): generate a single schema for requests ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) -## 2025-05-23 + ### Single Zod schema per request -### @hey-api/nuxt 0.1.7 + 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. -### Changed -- Updated dependencies []: + ```ts + const zData = z.object({ + body: z + .object({ + foo: z.string().optional(), + bar: z.union([z.number(), z.null()]).optional(), + }) + .optional(), + headers: z.never().optional(), + path: z.object({ + baz: z.string(), + }), + query: z.never().optional(), + }); + ``` + + 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`. + + +- Thanks [@Daschi1](https://github.com/Daschi1)! - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format ([#2192](https://github.com/hey-api/openapi-ts/pull/2192)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): do not mark schemas as duplicate if they have different format ([#2201](https://github.com/hey-api/openapi-ts/pull/2201)) + +
+
+ +# 2025-06-14 ---- +## @hey-api/openapi-ts 0.73.0 -## 2025-05-19 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: bundle `@hey-api/client-*` plugins ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) -### @hey-api/openapi-ts 0.67.5 + ### Bundle `@hey-api/client-*` plugins -- Thanks @mrlubos! - fix(tanstack-query): add SDK function comments to TanStack Query output ([#2052](https://github.com/hey-api/openapi-ts/pull/2052)) -- Thanks @mrlubos! - fix(typescript): exclude $refs in readable/writable schemas when referenced schemas don't contain any readable/writable fields ([#2058](https://github.com/hey-api/openapi-ts/pull/2058)) -- Thanks @mrlubos! - fix(typescript): add enumsConstantsIgnoreNull option to skip nulls from generated JavaScript objects ([#2059](https://github.com/hey-api/openapi-ts/pull/2059)) + In previous releases, you had to install a separate client package to generate a fully working output, e.g. `npm add @hey-api/client-fetch`. This created a few challenges: getting started was slower, upgrading was sometimes painful, and bundling too. Beginning with v0.73.0, all Hey API clients are bundled by default and don't require installing any additional dependencies. You can remove any installed client packages and re-run `@hey-api/openapi-ts`. ---- + ```sh + npm uninstall @hey-api/client-fetch + ``` -## 2025-05-14 -### @hey-api/nuxt 0.1.6 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: respect logs setting if initialization fails ([#2172](https://github.com/hey-api/openapi-ts/pull/2172)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export default pagination keywords ([#2170](https://github.com/hey-api/openapi-ts/pull/2170)) + +
+
+ +## @hey-api/nuxt 0.2.0 ### Changed -- Updated dependencies []: +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: remove `@hey-api/client-nuxt` dependency ([#2175](https://github.com/hey-api/openapi-ts/pull/2175)) ---- +
+
-## 2025-05-08 +# 2025-06-12 -### @hey-api/openapi-ts 0.67.3 +## @hey-api/openapi-ts 0.72.2 -- Thanks @0xfurai! - fix: handle references to properties ([#2020](https://github.com/hey-api/openapi-ts/pull/2020)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes ([#2163](https://github.com/hey-api/openapi-ts/pull/2163)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): add name builder options for all generated artifacts ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): filter orphans only when there are some operations ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): support tuple types ([#2166](https://github.com/hey-api/openapi-ts/pull/2166)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): set correct subscription context for plugins ([#2167](https://github.com/hey-api/openapi-ts/pull/2167)) ---- +
+
-## 2025-05-07 +# 2025-06-11 -### @hey-api/openapi-ts 0.67.2 +## @hey-api/openapi-ts 0.72.1 -- Thanks @kennidenni! - fix: handle relative paths in client's `baseUrl` field ([#2023](https://github.com/hey-api/openapi-ts/pull/2023)) +### Core +- Thanks [@Joshua-hypt](https://github.com/Joshua-hypt)! - fix(zod): handle array union types ([#2159](https://github.com/hey-api/openapi-ts/pull/2159)) ---- +
+
-## 2025-05-04 +# 2025-06-10 -### @hey-api/openapi-ts 0.67.0 +## @hey-api/openapi-ts 0.72.0 -- Thanks @mrlubos! - feat: respect `moduleResolution` value in `tsconfig.json` ([#2003](https://github.com/hey-api/openapi-ts/pull/2003)) -- Thanks @Liooo! - fix: make discriminator field required when used with `oneOf` keyword ([#2006](https://github.com/hey-api/openapi-ts/pull/2006)) -- Thanks @mrlubos! - fix: avoid including underscore for appended types (e.g. data, error, response) when preserving identifier case ([#2009](https://github.com/hey-api/openapi-ts/pull/2009)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add `classStructure` option supporting dot or slash `operationId` notation when generating class-based SDKs ([#2141](https://github.com/hey-api/openapi-ts/pull/2141)) ---- + ### Added `sdk.classStructure` option -### @hey-api/openapi-ts 0.67.1 + When generating class-based SDKs, we now try to infer the ideal structure using `operationId` keywords. If you'd like to preserve the previous behavior, set `classStructure` to `off`. -- Thanks @mrlubos! - fix: do not use named imports from typescript module ([#2010](https://github.com/hey-api/openapi-ts/pull/2010)) + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + classStructure: "off", + name: "@hey-api/sdk", + }, + ], + }; + ``` ---- -## 2025-04-28 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add crash report prompt ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): handle `propertyNames` keyword ([#2153](https://github.com/hey-api/openapi-ts/pull/2153)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): correctly generate default value for `BigInt` ([#2152](https://github.com/hey-api/openapi-ts/pull/2152)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle nested inline objects with write/read only fields ([#2151](https://github.com/hey-api/openapi-ts/pull/2151)) -### @hey-api/openapi-ts 0.66.7 +
+
-- Thanks @mrlubos! - fix: handle schemas with all write-only or read-only fields ([#1981](https://github.com/hey-api/openapi-ts/pull/1981)) -- Thanks @mrlubos! - fix: avoid generating duplicate operation ids when sanitizing input ([#1990](https://github.com/hey-api/openapi-ts/pull/1990)) -- Thanks @mrlubos! - fix: Zod schemas use .and instead of .merge ([#1991](https://github.com/hey-api/openapi-ts/pull/1991)) -- Thanks @ngalluzzo! - fix: correctly handle numeric property names with signs ([#1919](https://github.com/hey-api/openapi-ts/pull/1919)) -- Thanks @mrlubos! - fix: Zod plugin handles nullable enums ([#1984](https://github.com/hey-api/openapi-ts/pull/1984)) -- Thanks @mrlubos! - fix: handle discriminator with multiple mappings to the same schema ([#1986](https://github.com/hey-api/openapi-ts/pull/1986)) -- Thanks @mrlubos! - fix: Zod schemas with BigInt and min/max constraints ([#1980](https://github.com/hey-api/openapi-ts/pull/1980)) -- Thanks @mrlubos! - fix: correct path to nested plugin files when using exportFromIndex ([#1987](https://github.com/hey-api/openapi-ts/pull/1987)) -- Thanks @mrlubos! - fix: handle extended `$ref` with `type` keyword in OpenAPI 3.1 ([#1978](https://github.com/hey-api/openapi-ts/pull/1978)) -- Thanks @mrlubos! - fix: handle additionalProperties empty object as unknown instead of preserving an empty interface ([#1982](https://github.com/hey-api/openapi-ts/pull/1982)) +# 2025-06-06 ---- +## @hey-api/openapi-ts 0.71.1 -## 2025-04-23 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): skip schema if it's an array or tuple and its items don't have any matching readable or writable scopes ([#2139](https://github.com/hey-api/openapi-ts/pull/2139)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): validate operationId keyword ([#2140](https://github.com/hey-api/openapi-ts/pull/2140)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): respect exportFromIndex option when using legacy clients ([#2137](https://github.com/hey-api/openapi-ts/pull/2137)) -### @hey-api/openapi-ts 0.66.6 +
+
-- Thanks @mrlubos! - fix: handle Zod circular reference ([#1971](https://github.com/hey-api/openapi-ts/pull/1971)) +# 2025-06-05 ---- +## @hey-api/openapi-ts 0.71.0 -## 2025-04-17 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): rename `serviceNameBuilder` to `classNameBuilder` ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) -### @hey-api/openapi-ts 0.66.5 -- Thanks @devNameAsyraf! - fix: don't use JSON serializer for `application/octet-stream` ([#1951](https://github.com/hey-api/openapi-ts/pull/1951)) -- Thanks @sredni! - fix: repeat tuple type `maxItems` times ([#1938](https://github.com/hey-api/openapi-ts/pull/1938)) +- Thanks [@johnny-mh](https://github.com/johnny-mh)! - feat(parser): allow patching specs with `input.patch` ([#2117](https://github.com/hey-api/openapi-ts/pull/2117)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): better detect enum namespace ([#2132](https://github.com/hey-api/openapi-ts/pull/2132)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add `instance` option for instantiable SDKs ([#2130](https://github.com/hey-api/openapi-ts/pull/2130)) ---- +
+
-### @hey-api/nuxt 0.1.5 +# 2025-06-04 -### Changed -- Thanks @a1mersnow! - fix: avoid duplicate definition of `@hey-api/client-nuxt` plugin ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) -- Thanks @a1mersnow! - fix: skip watch mode in prepare step ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) -- Updated dependencies []: +## @hey-api/openapi-ts 0.70.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add responseStyle option ([#2123](https://github.com/hey-api/openapi-ts/pull/2123)) -## 2025-04-04 + **BREAKING**: Update your client to the latest version. -### @hey-api/openapi-ts 0.66.3 -- Thanks @Freddis! - fix: handle nullable dates in transformers ([#1917](https://github.com/hey-api/openapi-ts/pull/1917)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): ensure generated enum uses unique namespace to avoid conflicts with non-enum declarations ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle duplicate inline enum names ([#2116](https://github.com/hey-api/openapi-ts/pull/2116)) ---- +
+
-## 2025-04-03 +# 2025-06-02 -### @hey-api/openapi-ts 0.66.2 +## @hey-api/openapi-ts 0.69.2 -- Thanks @BogdanMaier! - fix: prevent crash when optional pagination field is missing ([#1913](https://github.com/hey-api/openapi-ts/pull/1913)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): add validate_EXPERIMENTAL option ([#2110](https://github.com/hey-api/openapi-ts/pull/2110)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): do not wrap regular expression in slashes if the pattern is already wrapped ([#2114](https://github.com/hey-api/openapi-ts/pull/2114)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): create a shallow copy of queryKey in createInfiniteParams function ([#2115](https://github.com/hey-api/openapi-ts/pull/2115)) ---- +
+
-## 2025-04-02 +# 2025-05-31 -### @hey-api/openapi-ts 0.66.1 +## @hey-api/openapi-ts 0.69.1 -- Thanks @mrlubos! - fix: exclude and include expressions can be an array ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) -- Thanks @mrlubos! - fix: support excluding deprecated fields with '@deprecated' ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): use isoDate instead of date for date strings ([#2109](https://github.com/hey-api/openapi-ts/pull/2109)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): generates union of arrays when items use nested oneOf ([#2108](https://github.com/hey-api/openapi-ts/pull/2108)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(schema): nameBuilder can be a string ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): serviceNameBuilder can be a function ([#2106](https://github.com/hey-api/openapi-ts/pull/2106)) ---- +
+
-## 2025-04-01 +# 2025-05-30 -### @hey-api/openapi-ts 0.66.0 +## @hey-api/openapi-ts 0.69.0 -- Thanks @mrlubos! - feat: support read-only and write-only properties ([#1896](https://github.com/hey-api/openapi-ts/pull/1896)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): use responses/errors map instead of union ([#2094](https://github.com/hey-api/openapi-ts/pull/2094)) ---- + **BREAKING**: Update your client to the latest version. -## 2025-03-31 -### @hey-api/openapi-ts 0.65.0 +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validators): generate schemas for request parameters ([#2100](https://github.com/hey-api/openapi-ts/pull/2100)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validators): generate schemas for request bodies ([#2099](https://github.com/hey-api/openapi-ts/pull/2099)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): skip spreading required headers when there are conflicting Content-Type headers ([#2097](https://github.com/hey-api/openapi-ts/pull/2097)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(pagination): improved schema resolver for parameters ([#2096](https://github.com/hey-api/openapi-ts/pull/2096)) -- Thanks @mrlubos! - feat: support custom clients ([#1889](https://github.com/hey-api/openapi-ts/pull/1889)) -- Thanks @mrlubos! - fix: allow passing fetch options to the request resolving a specification ([#1892](https://github.com/hey-api/openapi-ts/pull/1892)) -- Thanks @Matsuuu! - feat: ability to disable writing a log file via a `--no-log-file` flag or `logs.file` = `false` ([#1877](https://github.com/hey-api/openapi-ts/pull/1877)) +
+
---- +# 2025-05-28 -### @hey-api/nuxt 0.1.4 +## @hey-api/openapi-ts 0.68.1 -### Changed -- Updated dependencies []: +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): add back support for regular expressions in input filters ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): extend input filters to handle reusable parameters and responses ([#2086](https://github.com/hey-api/openapi-ts/pull/2086)) ---- +
+
-## 2025-03-26 +## @hey-api/openapi-ts 0.68.0 -### @hey-api/openapi-ts 0.64.14 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: upgraded input filters ([#2072](https://github.com/hey-api/openapi-ts/pull/2072)) -- Thanks @john-cremit! - feat: allow customizing pagination keywords using `input.pagination.keywords` ([#1827](https://github.com/hey-api/openapi-ts/pull/1827)) + ### Upgraded input filters ---- + Input filters now avoid generating invalid output without requiring you to specify every missing schema as in the previous releases. As part of this release, we changed the way filters are configured and removed the support for regular expressions. Let us know if regular expressions are still useful for you and want to bring them back! -### @hey-api/openapi-ts 0.64.15 + ```js + export default { + input: { + // match only the schema named `foo` and `GET` operation for the `/api/v1/foo` path + filters: { + operations: { + include: ['GET /api/v1/foo'], // [!code ++] + }, + schemas: { + include: ['foo'], // [!code ++] + }, + }, + include: '^(#/components/schemas/foo|#/paths/api/v1/foo/get) + ``` -- Thanks @kelnos! - feat: add support for cookies auth ([#1850](https://github.com/hey-api/openapi-ts/pull/1850)) +
+
---- +# 2025-05-23 -### @hey-api/nuxt 0.1.3 +## @hey-api/nuxt 0.1.7 ### Changed - Updated dependencies []: + - @hey-api/client-nuxt@0.4.2 ---- +
+
-## 2025-03-19 +# 2025-05-19 -### @hey-api/vite-plugin 0.2.0 +## @hey-api/openapi-ts 0.67.5 -### Changed -- Thanks @mrlubos! - fix: initial release ([#1838](https://github.com/hey-api/openapi-ts/pull/1838)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): add SDK function comments to TanStack Query output ([#2052](https://github.com/hey-api/openapi-ts/pull/2052)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): exclude $refs in readable/writable schemas when referenced schemas don't contain any readable/writable fields ([#2058](https://github.com/hey-api/openapi-ts/pull/2058)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): add enumsConstantsIgnoreNull option to skip nulls from generated JavaScript objects ([#2059](https://github.com/hey-api/openapi-ts/pull/2059)) ---- +
+
-## 2025-03-18 +# 2025-05-14 -### @hey-api/openapi-ts 0.64.13 +## @hey-api/nuxt 0.1.6 -- Thanks @mrlubos! - fix: bump json-schema-ref-parser package ([#1822](https://github.com/hey-api/openapi-ts/pull/1822)) -- Thanks @mrlubos! - fix: allow config to be a function ([#1826](https://github.com/hey-api/openapi-ts/pull/1826)) +### Changed +- Updated dependencies []: + - @hey-api/client-nuxt@0.4.1 ---- +
+
-### @hey-api/nuxt 0.1.2 +# 2025-05-07 -### Changed -- Thanks @mrlubos! - fix: move @hey-api/openapi-ts to peerDependencies ([#1825](https://github.com/hey-api/openapi-ts/pull/1825)) -- Updated dependencies [, ]: +## @hey-api/openapi-ts 0.67.3 ---- +### Core +- Thanks [@0xfurai](https://github.com/0xfurai)! - fix: handle references to properties ([#2020](https://github.com/hey-api/openapi-ts/pull/2020)) -## 2025-03-13 +
+
-### @hey-api/openapi-ts 0.64.12 +## @hey-api/openapi-ts 0.67.2 -- Thanks @shemsiu! - Allow `scheme` property to be case-insensitive ([#1816](https://github.com/hey-api/openapi-ts/pull/1816)) +### Core +- Thanks [@kennidenni](https://github.com/kennidenni)! - fix: handle relative paths in client's `baseUrl` field ([#2023](https://github.com/hey-api/openapi-ts/pull/2023)) ---- +
+
-### @hey-api/nuxt 0.1.1 +# 2025-05-04 -### Changed -- Updated dependencies []: +## @hey-api/openapi-ts 0.67.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use named imports from typescript module ([#2010](https://github.com/hey-api/openapi-ts/pull/2010)) -## 2025-03-12 +
+
-### @hey-api/openapi-ts 0.64.11 +## @hey-api/openapi-ts 0.67.0 -- Thanks @mrlubos! - fix: support Hey API platform input arguments ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) -- Thanks @mrlubos! - fix: handle raw OpenAPI specification input ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: respect `moduleResolution` value in `tsconfig.json` ([#2003](https://github.com/hey-api/openapi-ts/pull/2003)) ---- + ### Respecting `moduleResolution` value in `tsconfig.json` -### @hey-api/nuxt 0.1.0 + This release introduces functionality related to your `tsconfig.json` file. The initial feature properly respects the value of your `moduleResolution` field. If you're using `nodenext`, the relative module paths in your output will be appended with `.js`. To preserve the previous behavior where we never appended `.js` to relative module paths, set `output.tsConfigPath` to `off`. -### Changed -- Thanks @mrlubos! - feat: initial release ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) -- Updated dependencies [, , ]: + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: { + path: "src/client", + tsConfigPath: "off", + }, + }; + ``` ---- -## 2025-03-04 +- Thanks [@Liooo](https://github.com/Liooo)! - fix: make discriminator field required when used with `oneOf` keyword ([#2006](https://github.com/hey-api/openapi-ts/pull/2006)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid including underscore for appended types (e.g. data, error, response) when preserving identifier case ([#2009](https://github.com/hey-api/openapi-ts/pull/2009)) -### @hey-api/openapi-ts 0.64.10 +
+
-- Thanks @mrlubos! - fix: don't throw on missing performance marks ([#1779](https://github.com/hey-api/openapi-ts/pull/1779)) -- Thanks @Schroedi! - fix: handle nested dates in transformers ([#1767](https://github.com/hey-api/openapi-ts/pull/1767)) +# 2025-04-28 ---- +## @hey-api/openapi-ts 0.66.7 -## 2025-03-03 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with all write-only or read-only fields ([#1981](https://github.com/hey-api/openapi-ts/pull/1981)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid generating duplicate operation ids when sanitizing input ([#1990](https://github.com/hey-api/openapi-ts/pull/1990)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas use .and() instead of .merge() ([#1991](https://github.com/hey-api/openapi-ts/pull/1991)) +- Thanks [@ngalluzzo](https://github.com/ngalluzzo)! - fix: correctly handle numeric property names with signs ([#1919](https://github.com/hey-api/openapi-ts/pull/1919)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles nullable enums ([#1984](https://github.com/hey-api/openapi-ts/pull/1984)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminator with multiple mappings to the same schema ([#1986](https://github.com/hey-api/openapi-ts/pull/1986)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas with BigInt and min/max constraints ([#1980](https://github.com/hey-api/openapi-ts/pull/1980)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correct path to nested plugin files when using exportFromIndex ([#1987](https://github.com/hey-api/openapi-ts/pull/1987)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle extended `$ref` with `type` keyword in OpenAPI 3.1 ([#1978](https://github.com/hey-api/openapi-ts/pull/1978)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties empty object as unknown instead of preserving an empty interface ([#1982](https://github.com/hey-api/openapi-ts/pull/1982)) -### @hey-api/openapi-ts 0.64.9 +
+
-- Thanks @mrlubos! - docs: announce Hey API platform ([#1774](https://github.com/hey-api/openapi-ts/pull/1774)) +# 2025-04-23 ---- +## @hey-api/openapi-ts 0.66.6 -## 2025-03-01 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle Zod circular reference ([#1971](https://github.com/hey-api/openapi-ts/pull/1971)) -### @hey-api/openapi-ts 0.64.8 +
+
-- Thanks @mrlubos! - fix: reduce minimum Node.js 22 version to 22.10.0 ([#1764](https://github.com/hey-api/openapi-ts/pull/1764)) +# 2025-04-17 ---- +## @hey-api/openapi-ts 0.66.5 -## 2025-02-27 +### Core +- Thanks [@devNameAsyraf](https://github.com/devNameAsyraf)! - fix: don't use JSON serializer for `application/octet-stream` ([#1951](https://github.com/hey-api/openapi-ts/pull/1951)) +- Thanks [@sredni](https://github.com/sredni)! - fix: repeat tuple type `maxItems` times ([#1938](https://github.com/hey-api/openapi-ts/pull/1938)) -### @hey-api/openapi-ts 0.64.7 +
+
-- Thanks @Matsuuu! - fix: Wrap the GET request in watch mode with try-catch to prevent crashes on no-head watch targets ([#1755](https://github.com/hey-api/openapi-ts/pull/1755)) +## @hey-api/nuxt 0.1.5 ---- +### Changed +- Thanks [@a1mersnow](https://github.com/a1mersnow)! - fix: avoid duplicate definition of `@hey-api/client-nuxt` plugin ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) +- Thanks [@a1mersnow](https://github.com/a1mersnow)! - fix: skip watch mode in prepare step ([#1939](https://github.com/hey-api/openapi-ts/pull/1939)) +- Updated dependencies []: + - @hey-api/client-nuxt@0.4.0 -## 2025-02-26 +
+
-### @hey-api/openapi-ts 0.64.6 +# 2025-04-04 -- Thanks @Matsuuu! - fix: Wrap HEAD request in a try-catch to prevent watch mode crashes on server reloads ([#1748](https://github.com/hey-api/openapi-ts/pull/1748)) +## @hey-api/openapi-ts 0.66.3 ---- +### Core +- Thanks [@Freddis](https://github.com/Freddis)! - fix: handle nullable dates in transformers ([#1917](https://github.com/hey-api/openapi-ts/pull/1917)) -## 2025-02-19 +
+
-### @hey-api/openapi-ts 0.64.5 +# 2025-04-03 -- Thanks @georgesmith46! - fix: correctly generate zod regex expressions when using patterns ([#1728](https://github.com/hey-api/openapi-ts/pull/1728)) +## @hey-api/openapi-ts 0.66.2 ---- +### Core +- Thanks [@BogdanMaier](https://github.com/BogdanMaier)! - fix: prevent crash when optional pagination field is missing ([#1913](https://github.com/hey-api/openapi-ts/pull/1913)) -## 2025-02-13 +
+
-### @hey-api/openapi-ts 0.64.4 +# 2025-04-02 -- Thanks @mrlubos! - fix: use relative path to custom config file if provided when resolving relative paths ([#1710](https://github.com/hey-api/openapi-ts/pull/1710)) +## @hey-api/openapi-ts 0.66.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: exclude and include expressions can be an array ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support excluding deprecated fields with '@deprecated' ([#1906](https://github.com/hey-api/openapi-ts/pull/1906)) -## 2025-02-10 +
+
-### @hey-api/openapi-ts 0.64.2 +# 2025-04-01 -- Thanks @mrlubos! - fix: add exportFromIndex option to all plugins ([#1697](https://github.com/hey-api/openapi-ts/pull/1697)) -- Thanks @mrlubos! - fix: allow passing arbitrary values to SDK functions via `meta` field ([#1699](https://github.com/hey-api/openapi-ts/pull/1699)) -- Thanks @hunshcn! - sanitize "+" in uri to avoid plus in function name ([#1687](https://github.com/hey-api/openapi-ts/pull/1687)) +## @hey-api/openapi-ts 0.66.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support read-only and write-only properties ([#1896](https://github.com/hey-api/openapi-ts/pull/1896)) -### @hey-api/openapi-ts 0.64.3 + ### Read-only and write-only fields -- Thanks @mrlubos! - fix: correctly type default value for Nuxt client ([#1701](https://github.com/hey-api/openapi-ts/pull/1701)) + Starting with v0.66.0, `@hey-api/typescript` will generate separate types for payloads and responses if it detects any read-only or write-only fields. To preserve the previous behavior and generate a single type regardless, set `readOnlyWriteOnlyBehavior` to `off`. ---- + ```js + export default { + input: "hey-api/backend", // sign up at app.heyapi.dev + output: "src/client", + plugins: [ + // ...other plugins + { + name: "@hey-api/typescript", + readOnlyWriteOnlyBehavior: "off", // [!code ++] + }, + ], + }; + ``` -## 2025-02-03 +
+
-### @hey-api/openapi-ts 0.64.1 +# 2025-03-31 -- Thanks @mrlubos! - fix: watch mode handles servers not exposing HEAD method for spec ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) -- Thanks @mrlubos! - fix: add watch.timeout option ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) +## @hey-api/openapi-ts 0.65.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support custom clients ([#1889](https://github.com/hey-api/openapi-ts/pull/1889)) -## 2025-02-02 -### @hey-api/openapi-ts 0.64.0 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing fetch options to the request resolving a specification ([#1892](https://github.com/hey-api/openapi-ts/pull/1892)) +- Thanks [@Matsuuu](https://github.com/Matsuuu)! - feat: ability to disable writing a log file via a `--no-log-file` flag or `logs.file` = `false` ([#1877](https://github.com/hey-api/openapi-ts/pull/1877)) -- Thanks @mrlubos! - feat: added `client.baseUrl` option ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) -- Thanks @mrlubos! - fix: make createConfig, CreateClientConfig, and Config accept ClientOptions generic ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) +
+
---- +## @hey-api/nuxt 0.1.4 -## 2025-01-30 +### Changed +- Updated dependencies []: + - @hey-api/client-nuxt@0.4.0 -### @hey-api/openapi-ts 0.63.1 +
+
-- Thanks @mrlubos! - fix: update keywords in package.json ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) -- Thanks @mrlubos! - fix: add Next.js client ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) -- Thanks @mrlubos! - feat: support required client in SDK using sdk.client = false ([#1646](https://github.com/hey-api/openapi-ts/pull/1646)) -- Thanks @mrlubos! - fix: add support for openIdConnect auth flow ([#1648](https://github.com/hey-api/openapi-ts/pull/1648)) +# 2025-03-26 ---- +## @hey-api/openapi-ts 0.64.15 -### @hey-api/openapi-ts 0.63.2 +### Core +- Thanks [@kelnos](https://github.com/kelnos)! - feat: add support for cookies auth ([#1850](https://github.com/hey-api/openapi-ts/pull/1850)) -- Thanks @mrlubos! - fix: lower Node version requirements ([#1651](https://github.com/hey-api/openapi-ts/pull/1651)) +
+
---- +## @hey-api/openapi-ts 0.64.14 -## 2025-01-27 +### Core +- Thanks [@john-cremit](https://github.com/john-cremit)! - feat: allow customizing pagination keywords using `input.pagination.keywords` ([#1827](https://github.com/hey-api/openapi-ts/pull/1827)) -### @hey-api/openapi-ts 0.63.0 +
+
-- Thanks @mrlubos! - feat: move clients to plugins ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -- Thanks @mrlubos! - fix: move sdk.throwOnError option to client.throwOnError ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -- Thanks @mrlubos! - fix: sdks import client from client.gen.ts instead of defining it inside the file ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -- Thanks @mrlubos! - fix: throw if inferred plugin not found ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) +## @hey-api/nuxt 0.1.3 ---- +### Changed +- Updated dependencies []: + - @hey-api/client-nuxt@0.3.1 -## 2025-01-21 +
+
-### @hey-api/openapi-ts 0.62.3 +# 2025-03-19 -- Thanks @mrlubos! - fix: bundle clients from compiled index file ([#1600](https://github.com/hey-api/openapi-ts/pull/1600)) -- Thanks @mrlubos! - fix: generate correct response for text/plain content type ([#1594](https://github.com/hey-api/openapi-ts/pull/1594)) -- Thanks @mrlubos! - fix: do not use a body serializer on text/plain sdks ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) -- Thanks @mrlubos! - fix: support all oauth2 flows in sdk auth ([#1602](https://github.com/hey-api/openapi-ts/pull/1602)) -- Thanks @mrlubos! - fix: add null to valid bodySerializer types ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) +## @hey-api/vite-plugin 0.2.0 ---- +### Changed +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: initial release ([#1838](https://github.com/hey-api/openapi-ts/pull/1838)) -## 2025-01-20 +
+
-### @hey-api/openapi-ts 0.62.2 +# 2025-03-18 -- Thanks @mrlubos! - fix: add support for Nuxt client ([#1519](https://github.com/hey-api/openapi-ts/pull/1519)) +## @hey-api/openapi-ts 0.64.13 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bump json-schema-ref-parser package ([#1822](https://github.com/hey-api/openapi-ts/pull/1822)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow config to be a function ([#1826](https://github.com/hey-api/openapi-ts/pull/1826)) -## 2025-01-15 +
+
-### @hey-api/openapi-ts 0.62.1 +## @hey-api/nuxt 0.1.2 -- Thanks @mrlubos! - fix: generate bigint type instead of BigInt ([#1574](https://github.com/hey-api/openapi-ts/pull/1574)) -- Thanks @mrlubos! - fix: add ability to skip generating index file with output.indexFile ([#1572](https://github.com/hey-api/openapi-ts/pull/1572)) +### Changed +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move @hey-api/openapi-ts to peerDependencies ([#1825](https://github.com/hey-api/openapi-ts/pull/1825)) +- Updated dependencies [,]: + - @hey-api/openapi-ts@0.64.13 ---- +
+
-## 2025-01-14 +# 2025-03-13 -### @hey-api/openapi-ts 0.62.0 +## @hey-api/openapi-ts 0.64.12 -- Thanks @mrlubos! - feat: change the default parser ([#1568](https://github.com/hey-api/openapi-ts/pull/1568)) -- Thanks @mrlubos! - fix: spread sdk options at the end to allow overriding generated values ([#1566](https://github.com/hey-api/openapi-ts/pull/1566)) +### Core +- Thanks [@shemsiu](https://github.com/shemsiu)! - Allow `scheme` property to be case-insensitive ([#1816](https://github.com/hey-api/openapi-ts/pull/1816)) ---- +
+
-## 2025-01-13 +## @hey-api/nuxt 0.1.1 -### @hey-api/openapi-ts 0.61.3 +### Changed +- Updated dependencies []: + - @hey-api/openapi-ts@0.64.12 -- Thanks @mrlubos! - fix: use z.coerce before calling z.bigint ([#1552](https://github.com/hey-api/openapi-ts/pull/1552)) +
+
---- +# 2025-03-12 -## 2025-01-09 +## @hey-api/openapi-ts 0.64.11 -### @hey-api/openapi-ts 0.61.2 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support Hey API platform input arguments ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle raw OpenAPI specification input ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) -- Thanks @mrlubos! - fix: send GET request only on first spec fetch ([#1543](https://github.com/hey-api/openapi-ts/pull/1543)) +
+
---- +## @hey-api/nuxt 0.1.0 -## 2025-01-08 +### Changed +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: initial release ([#1800](https://github.com/hey-api/openapi-ts/pull/1800)) -### @hey-api/openapi-ts 0.61.1 -- Thanks @mrlubos! - fix: detect pagination in composite schemas with null type ([#1530](https://github.com/hey-api/openapi-ts/pull/1530)) -- Thanks @mrlubos! - fix: handle primitive constants in Zod and types ([#1535](https://github.com/hey-api/openapi-ts/pull/1535)) +- Updated dependencies [,,]: + - @hey-api/openapi-ts@0.64.11 + - @hey-api/client-nuxt@0.3.0 ---- +
+
-## 2025-01-06 +# 2025-03-04 -### @hey-api/openapi-ts 0.61.0 +## @hey-api/openapi-ts 0.64.10 -### ⚠️ Breaking -- **BREAKING**: please update `@hey-api/client-*` packages to the latest version +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: don't throw on missing performance marks ([#1779](https://github.com/hey-api/openapi-ts/pull/1779)) +- Thanks [@Schroedi](https://github.com/Schroedi)! - fix: handle nested dates in transformers ([#1767](https://github.com/hey-api/openapi-ts/pull/1767)) -- Thanks @chriswiggins! - Add support for HTTP Bearer Authentication Scheme ([#1520](https://github.com/hey-api/openapi-ts/pull/1520)) -- Thanks @mrlubos! - feat: add OpenAPI 2.0 support to experimental parser ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) -- Thanks @mrlubos! - feat: add watch mode ([#1511](https://github.com/hey-api/openapi-ts/pull/1511)) -- Thanks @mrlubos! - fix: add support for long integers ([#1529](https://github.com/hey-api/openapi-ts/pull/1529)) -- Thanks @mrlubos! - fix: add `sdk.throwOnError` option ([#1512](https://github.com/hey-api/openapi-ts/pull/1512)) -- Thanks @mrlubos! - fix: preserve leading separators in enum keys ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) -- **BREAKING**: please update `@hey-api/client-*` packages to the latest version +
+
---- +# 2025-03-03 -## 2024-12-20 +## @hey-api/openapi-ts 0.64.9 -### @hey-api/openapi-ts 0.60.1 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - docs: announce Hey API platform ([#1774](https://github.com/hey-api/openapi-ts/pull/1774)) -- Thanks @mrlubos! - fix: handle indexed access checks ([#1468](https://github.com/hey-api/openapi-ts/pull/1468)) -- Thanks @mrlubos! - fix: zod: generate patterns and improve plain schemas ([#1469](https://github.com/hey-api/openapi-ts/pull/1469)) -- Thanks @mrlubos! - fix: add links to the experimental parser callouts ([#1471](https://github.com/hey-api/openapi-ts/pull/1471)) -- Thanks @mrlubos! - fix: update types for custom plugins so defineConfig does not throw ([#1462](https://github.com/hey-api/openapi-ts/pull/1462)) -- Thanks @mrlubos! - fix: export IR types ([#1464](https://github.com/hey-api/openapi-ts/pull/1464)) -- Thanks @mrlubos! - fix: export utils ([#1467](https://github.com/hey-api/openapi-ts/pull/1467)) -- Thanks @mrlubos! - fix: allow plugins to explicitly declare whether they should be re-exported from the index file ([#1457](https://github.com/hey-api/openapi-ts/pull/1457)) +
+
---- +# 2025-03-01 -## 2024-12-18 +## @hey-api/openapi-ts 0.64.8 -### @hey-api/openapi-ts 0.60.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: reduce minimum Node.js 22 version to 22.10.0 ([#1764](https://github.com/hey-api/openapi-ts/pull/1764)) -- Thanks @mrlubos! - fix: require sdk.transformer to use generated transformers ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) -- Thanks @mrlubos! - fix: revert license to MIT ([#1447](https://github.com/hey-api/openapi-ts/pull/1447)) -- Thanks @mrlubos! - feat: Zod plugin generates response schemas ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) +
+
---- +# 2025-02-27 -## 2024-12-12 +## @hey-api/openapi-ts 0.64.7 -### @hey-api/openapi-ts 0.59.2 +### Core +- Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap the GET request in watch mode with try-catch to prevent crashes on no-head watch targets ([#1755](https://github.com/hey-api/openapi-ts/pull/1755)) -- Thanks @mrlubos! - fix: generate querySerializer options for Axios client ([#1420](https://github.com/hey-api/openapi-ts/pull/1420)) -- Thanks @mrlubos! - fix: infer responseType in SDKs for axios client ([#1419](https://github.com/hey-api/openapi-ts/pull/1419)) -- Thanks @mrlubos! - feat: support oauth2 and apiKey security schemes ([#1409](https://github.com/hey-api/openapi-ts/pull/1409)) -- Thanks @mrlubos! - fix: zod plugin handles recursive schemas ([#1416](https://github.com/hey-api/openapi-ts/pull/1416)) +
+
---- +# 2025-02-26 -## 2024-12-07 +## @hey-api/openapi-ts 0.64.6 -### @hey-api/openapi-ts 0.59.1 +### Core +- Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap HEAD request in a try-catch to prevent watch mode crashes on server reloads ([#1748](https://github.com/hey-api/openapi-ts/pull/1748)) -- Thanks @mrlubos! - fix: prefix restricted identifier names with underscore ([#1398](https://github.com/hey-api/openapi-ts/pull/1398)) -- Thanks @mrlubos! - fix: disallow additional query parameters in experimental parser output ([#1394](https://github.com/hey-api/openapi-ts/pull/1394)) +
+
---- +# 2025-02-19 -## 2024-12-05 +## @hey-api/openapi-ts 0.64.5 -### @hey-api/openapi-ts 0.59.0 +### Core +- Thanks [@georgesmith46](https://github.com/georgesmith46)! - fix: correctly generate zod regex expressions when using patterns ([#1728](https://github.com/hey-api/openapi-ts/pull/1728)) -- Thanks @mrlubos! - feat: add `logs.level` option ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) -- Thanks @mrlubos! - feat: remove `@hey-api/schemas` from default plugins ([#1389](https://github.com/hey-api/openapi-ts/pull/1389)) -- Thanks @mrlubos! - fix: correctly resolve required properties in nested allOf composition ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) -- Thanks @mrlubos! - fix: add `--silent` or `-s` CLI option for silent log level ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) -- Thanks @mrlubos! - fix: transformers handle allOf composition in experimental parser ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) -- Thanks @mrlubos! - feat: add `logs` configuration option to customize log directory ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) -- Thanks @mrlubos! - fix: allow arbitrary object properties when additionalProperties is undefined ([#1390](https://github.com/hey-api/openapi-ts/pull/1390)) -- Thanks @mrlubos! - fix: support `DEBUG` environment variable ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +
+
---- +# 2025-02-13 -## 2024-12-02 +## @hey-api/openapi-ts 0.64.4 -### @hey-api/openapi-ts 0.58.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use relative path to custom config file if provided when resolving relative paths ([#1710](https://github.com/hey-api/openapi-ts/pull/1710)) -- Thanks @mrlubos! - feat: add typescript.identifierCase option ([#1353](https://github.com/hey-api/openapi-ts/pull/1353)) -- Thanks @mrlubos! - fix: remove schemas and transformers re-exports from index.ts ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) -- Thanks @mrlubos! - feat: add output.clean option ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) -- Thanks @mrlubos! - feat: add typescript.enumsCase option ([#1362](https://github.com/hey-api/openapi-ts/pull/1362)) -- Thanks @mrlubos! - fix: add before and after to pagination keywords ([#1361](https://github.com/hey-api/openapi-ts/pull/1361)) -- Thanks @mrlubos! - fix: export Plugin API namespace ([#1368](https://github.com/hey-api/openapi-ts/pull/1368)) -- Thanks @mrlubos! - fix: TanStack Query plugin handles conflict with internal function name in experimental parser ([#1369](https://github.com/hey-api/openapi-ts/pull/1369)) +
+
---- +# 2025-02-10 -## 2024-11-25 +## @hey-api/openapi-ts 0.64.3 -### @hey-api/openapi-ts 0.57.1 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly type default value for Nuxt client ([#1701](https://github.com/hey-api/openapi-ts/pull/1701)) -- Thanks @mrlubos! - fix: transformers correctly handle an array ([#1335](https://github.com/hey-api/openapi-ts/pull/1335)) -- Thanks @mrlubos! - fix: improve camelcase with abbreviated plurals ([#1332](https://github.com/hey-api/openapi-ts/pull/1332)) -- Thanks @mrlubos! - fix: experimental parser generates url inside data types ([#1333](https://github.com/hey-api/openapi-ts/pull/1333)) -- Thanks @mrlubos! - fix: experimental parser transforms anyOf date and null ([#1336](https://github.com/hey-api/openapi-ts/pull/1336)) -- Thanks @mrlubos! - fix: experimental parser handles empty string and null enum values in JavaScript mode ([#1330](https://github.com/hey-api/openapi-ts/pull/1330)) -- Thanks @mrlubos! - fix: experimental parser exports reusable request bodies ([#1340](https://github.com/hey-api/openapi-ts/pull/1340)) +
+
---- +## @hey-api/openapi-ts 0.64.2 -## 2024-11-22 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add exportFromIndex option to all plugins ([#1697](https://github.com/hey-api/openapi-ts/pull/1697)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing arbitrary values to SDK functions via `meta` field ([#1699](https://github.com/hey-api/openapi-ts/pull/1699)) +- Thanks [@hunshcn](https://github.com/hunshcn)! - sanitize "+" in uri to avoid plus in function name ([#1687](https://github.com/hey-api/openapi-ts/pull/1687)) -### @hey-api/openapi-ts 0.57.0 +
+
-- Thanks @mrlubos! - feat: rename Hey API plugins ([#1324](https://github.com/hey-api/openapi-ts/pull/1324)) -- Thanks @mrlubos! - feat: add typescript.exportInlineEnums option ([#1327](https://github.com/hey-api/openapi-ts/pull/1327)) -- Thanks @mrlubos! - fix: improve generated enum keys in experimental parser ([#1326](https://github.com/hey-api/openapi-ts/pull/1326)) +# 2025-02-03 ---- +## @hey-api/openapi-ts 0.64.1 -## 2024-11-21 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: watch mode handles servers not exposing HEAD method for spec ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add watch.timeout option ([#1668](https://github.com/hey-api/openapi-ts/pull/1668)) -### @hey-api/openapi-ts 0.56.2 +
+
-- Thanks @mrlubos! - fix: add input.exclude option ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) -- Thanks @mrlubos! - fix: make Zod plugin available in plugins options ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) +# 2025-02-02 ---- +## @hey-api/openapi-ts 0.64.0 -### @hey-api/openapi-ts 0.56.3 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: added `client.baseUrl` option ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) -- Thanks @mrlubos! - fix: Zod plugin handles value constraints and defaults ([#1319](https://github.com/hey-api/openapi-ts/pull/1319)) + ### Added `client.baseUrl` option ---- + You can use this option to configure the default base URL for the generated client. By default, we will attempt to resolve the first defined server or infer the base URL from the input path. If you'd like to preserve the previous behavior, set `baseUrl` to `false`. -## 2024-11-19 + ```js + export default { + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + { + baseUrl: false, // [!code ++] + name: "@hey-api/client-fetch", + }, + ], + }; + ``` -### @hey-api/openapi-ts 0.56.1 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make createConfig, CreateClientConfig, and Config accept ClientOptions generic ([#1661](https://github.com/hey-api/openapi-ts/pull/1661)) -- Thanks @mrlubos! - fix: gracefully handle invalid schema type in experimental parser ([#1309](https://github.com/hey-api/openapi-ts/pull/1309)) + ### Added `ClientOptions` interface ---- + The `Config` interface now accepts an optional generic extending `ClientOptions` instead of `boolean` type `ThrowOnError`. -## 2024-11-18 + ```ts + type Foo = Config; // [!code --] + type Foo = Config<{ throwOnError: false }>; // [!code ++] + ``` -### @hey-api/openapi-ts 0.56.0 +
+
-- Thanks @jacobinu! - feat: add `fastify` plugin ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) -- Thanks @jacobinu! - fix: export a map of error and response types by status code ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) -- Thanks @jacobinu! - fix: deprecate types.tree option ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) -- Thanks @mrlubos! - fix: handle file-like content media type without explicit schema ([#1305](https://github.com/hey-api/openapi-ts/pull/1305)) +# 2025-01-30 ---- +## @hey-api/openapi-ts 0.63.2 -## 2024-11-14 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: lower Node version requirements ([#1651](https://github.com/hey-api/openapi-ts/pull/1651)) -### @hey-api/openapi-ts 0.55.3 +
+
-- Thanks @hougesen! - feat: add support for oxlint as linter ([#1283](https://github.com/hey-api/openapi-ts/pull/1283)) +## @hey-api/openapi-ts 0.63.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update keywords in package.json ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add Next.js client ([#1637](https://github.com/hey-api/openapi-ts/pull/1637)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support required client in SDK using sdk.client = false ([#1646](https://github.com/hey-api/openapi-ts/pull/1646)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for openIdConnect auth flow ([#1648](https://github.com/hey-api/openapi-ts/pull/1648)) -## 2024-11-11 +
+
-### @hey-api/openapi-ts 0.55.2 +# 2025-01-27 -- Thanks @mrlubos! - fix: update sponsorship links ([#1253](https://github.com/hey-api/openapi-ts/pull/1253)) -- Thanks @mrlubos! - fix: correctly generate array when items are a oneOf array with length 1 ([#1266](https://github.com/hey-api/openapi-ts/pull/1266)) -- Thanks @mrlubos! - fix: handle non-exploded array query parameters ([#1265](https://github.com/hey-api/openapi-ts/pull/1265)) -- Thanks @mrlubos! - fix: handle discriminators in experimental parser ([#1267](https://github.com/hey-api/openapi-ts/pull/1267)) +## @hey-api/openapi-ts 0.63.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: move clients to plugins ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -## 2024-11-08 + ### Client plugins -### @hey-api/openapi-ts 0.55.1 + Clients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`. -- Thanks @mrlubos! - fix: handle nullable enums in experimental parser ([#1248](https://github.com/hey-api/openapi-ts/pull/1248)) -- Thanks @mrlubos! - fix: add support for custom plugins ([#1251](https://github.com/hey-api/openapi-ts/pull/1251)) -- Thanks @mrlubos! - fix: render void for empty response status codes in experimental parser ([#1250](https://github.com/hey-api/openapi-ts/pull/1250)) + ```js + export default { + client: "@hey-api/client-fetch", // [!code --] + input: "path/to/openapi.json", + output: "src/client", + plugins: ["@hey-api/client-fetch"], // [!code ++] + }; + ``` ---- -## 2024-11-07 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move sdk.throwOnError option to client.throwOnError ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -### @hey-api/openapi-ts 0.55.0 + ### Moved `sdk.throwOnError` option -- Thanks @mrlubos! - feat: add input.include option ([#1241](https://github.com/hey-api/openapi-ts/pull/1241)) -- Thanks @mrlubos! - fix: handle pagination with basic refs ([#1239](https://github.com/hey-api/openapi-ts/pull/1239)) + This SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect. ---- + ```js + export default { + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + { + name: "@hey-api/client-fetch", + throwOnError: true, // [!code ++] + }, + { + name: "@hey-api/sdk", + throwOnError: true, // [!code --] + }, + ], + }; + ``` -## 2024-11-06 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: sdks import client from client.gen.ts instead of defining it inside the file ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -### @hey-api/openapi-ts 0.54.3 + ### Added `client.gen.ts` file -- Thanks @mrlubos! - feat: add OpenAPI 3.0.x experimental parser ([#1230](https://github.com/hey-api/openapi-ts/pull/1230)) + The internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module. ---- + ```js + import { client } from "client/sdk.gen"; // [!code --] + import { client } from "client/client.gen"; // [!code ++] + ``` -### @hey-api/openapi-ts 0.54.4 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if inferred plugin not found ([#1626](https://github.com/hey-api/openapi-ts/pull/1626)) -- Thanks @mrlubos! - fix: forbid any body, path, or query parameters if not defined in spec ([#1237](https://github.com/hey-api/openapi-ts/pull/1237)) -- Thanks @mrlubos! - fix: handle additionalProperties: boolean in experimental parser ([#1235](https://github.com/hey-api/openapi-ts/pull/1235)) -- Thanks @mrlubos! - fix: update schemas plugin to handle experimental 3.0.x parser ([#1233](https://github.com/hey-api/openapi-ts/pull/1233)) +
+
---- +# 2025-01-21 -## 2024-11-02 +## @hey-api/openapi-ts 0.62.3 -### @hey-api/openapi-ts 0.54.2 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bundle clients from compiled index file ([#1600](https://github.com/hey-api/openapi-ts/pull/1600)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate correct response for text/plain content type ([#1594](https://github.com/hey-api/openapi-ts/pull/1594)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use a body serializer on text/plain sdks ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support all oauth2 flows in sdk auth ([#1602](https://github.com/hey-api/openapi-ts/pull/1602)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add null to valid bodySerializer types ([#1596](https://github.com/hey-api/openapi-ts/pull/1596)) -- Thanks @mrlubos! - feat: add support for @tanstack/angular-query-experimental package ([#1222](https://github.com/hey-api/openapi-ts/pull/1222)) +
+
---- +# 2025-01-20 -## 2024-10-29 +## @hey-api/openapi-ts 0.62.2 -### @hey-api/openapi-ts 0.54.1 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for Nuxt client ([#1519](https://github.com/hey-api/openapi-ts/pull/1519)) -- Thanks @mrlubos! - fix: ignore name option when not used with legacy clients to avoid producing broken output ([#1211](https://github.com/hey-api/openapi-ts/pull/1211)) -- Thanks @mrlubos! - fix: add support for OpenAPI 3.1.1 to experimental parser ([#1209](https://github.com/hey-api/openapi-ts/pull/1209)) +
+
---- +# 2025-01-15 -## 2024-10-28 +## @hey-api/openapi-ts 0.62.1 -### @hey-api/openapi-ts 0.54.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate bigint type instead of BigInt ([#1574](https://github.com/hey-api/openapi-ts/pull/1574)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add ability to skip generating index file with output.indexFile ([#1572](https://github.com/hey-api/openapi-ts/pull/1572)) -- Thanks @mrlubos! - feat: make plugins first-class citizens ([#1201](https://github.com/hey-api/openapi-ts/pull/1201)) +
+
---- +# 2025-01-14 -## 2024-10-25 +## @hey-api/openapi-ts 0.62.0 -### @hey-api/openapi-ts 0.53.12 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change the default parser ([#1568](https://github.com/hey-api/openapi-ts/pull/1568)) -- Thanks @mrlubos! - fix: TanStack Query plugin using missing import for infinite query ([#1195](https://github.com/hey-api/openapi-ts/pull/1195)) -- Thanks @mrlubos! - fix: pass TanStack query signal to client call ([#1194](https://github.com/hey-api/openapi-ts/pull/1194)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: spread sdk options at the end to allow overriding generated values ([#1566](https://github.com/hey-api/openapi-ts/pull/1566)) -## 2024-10-14 +
+
-### @hey-api/openapi-ts 0.53.11 +# 2025-01-13 -- Thanks @mrlubos! - fix: update website domain, add license documentation ([#1151](https://github.com/hey-api/openapi-ts/pull/1151)) +## @hey-api/openapi-ts 0.61.3 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use z.coerce before calling z.bigint ([#1552](https://github.com/hey-api/openapi-ts/pull/1552)) -## 2024-10-12 +
+
-### @hey-api/openapi-ts 0.53.10 +# 2025-01-09 -- Thanks @mrlubos! - fix: update license field in package.json to match the license, revert client packages license to MIT ([#1145](https://github.com/hey-api/openapi-ts/pull/1145)) +## @hey-api/openapi-ts 0.61.2 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: send GET request only on first spec fetch ([#1543](https://github.com/hey-api/openapi-ts/pull/1543)) -## 2024-10-10 +
+
-### @hey-api/openapi-ts 0.53.9 +# 2025-01-08 -- Thanks @BierDav! - Add support for passing mutation specific options to `Mutation(options)` ([#1137](https://github.com/hey-api/openapi-ts/pull/1137)) +## @hey-api/openapi-ts 0.61.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: detect pagination in composite schemas with null type ([#1530](https://github.com/hey-api/openapi-ts/pull/1530)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle primitive constants in Zod and types ([#1535](https://github.com/hey-api/openapi-ts/pull/1535)) -## 2024-10-07 +
+
-### @hey-api/openapi-ts 0.53.8 +# 2025-01-06 -- Thanks @mrlubos! - fix: use correct relative path to bundled client when imported from nested module ([#1123](https://github.com/hey-api/openapi-ts/pull/1123)) +## @hey-api/openapi-ts 0.61.0 ---- +### ⚠️ Breaking +- BREAKING: please update `@hey-api/client-*` packages to the latest version -## 2024-10-03 + feat: add support for basic http auth -### @hey-api/openapi-ts 0.53.7 -- Thanks @mrlubos! - fix: skip nested properties in oneOf and anyOf compositions ([#1113](https://github.com/hey-api/openapi-ts/pull/1113)) -- Thanks @mrlubos! - fix: abstract page params logic in TanStack Query plugin ([#1115](https://github.com/hey-api/openapi-ts/pull/1115)) ---- +### Core +- Thanks [@chriswiggins](https://github.com/chriswiggins)! - Add support for HTTP Bearer Authentication Scheme ([#1520](https://github.com/hey-api/openapi-ts/pull/1520)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 2.0 support to experimental parser ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add watch mode ([#1511](https://github.com/hey-api/openapi-ts/pull/1511)) -## 2024-09-30 + ## Watch Mode -### @hey-api/openapi-ts 0.53.6 + ::: warning + Watch mode currently supports only remote files via URL. + ::: -- Thanks @mrlubos! - fix: export spec-compliant OpenAPI 3.1 interface ([#1104](https://github.com/hey-api/openapi-ts/pull/1104)) -- Thanks @mrlubos! - fix: handle multiple form-data parameters in Swagger 2.0 ([#1108](https://github.com/hey-api/openapi-ts/pull/1108)) + If your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable `watch` mode in your configuration or pass the `--watch` flag to the CLI. ---- + ### Config -## 2024-09-26 + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + watch: true, + }; + ``` -### @hey-api/openapi-ts 0.53.5 + ### CLI -- Thanks @mrlubos! - fix: make TanStack Query plugin work with class-based services ([#1096](https://github.com/hey-api/openapi-ts/pull/1096)) -- Thanks @mrlubos! - fix: avoid printing duplicate null nodes ([#1095](https://github.com/hey-api/openapi-ts/pull/1095)) -- Thanks @mrlubos! - fix: attach TanStack Query infinite page params only if they exist ([#1094](https://github.com/hey-api/openapi-ts/pull/1094)) + ```sh + npx @hey-api/openapi-ts \ + -c @hey-api/client-fetch \ + -i path/to/openapi.json \ + -o src/client \ + -w + ``` ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for long integers ([#1529](https://github.com/hey-api/openapi-ts/pull/1529)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `sdk.throwOnError` option ([#1512](https://github.com/hey-api/openapi-ts/pull/1512)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: preserve leading separators in enum keys ([#1525](https://github.com/hey-api/openapi-ts/pull/1525)) +- BREAKING: please update `@hey-api/client-*` packages to the latest version -## 2024-09-25 + feat: add support for basic http auth -### @hey-api/openapi-ts 0.53.4 +
+
-- Thanks @mrlubos! - fix: import handlebars instead of runtime ([#1087](https://github.com/hey-api/openapi-ts/pull/1087)) -- Thanks @mrlubos! - fix: support dynamic require in child_process ([#1086](https://github.com/hey-api/openapi-ts/pull/1086)) +# 2024-12-19 ---- +## @hey-api/openapi-ts 0.60.1 -## 2024-09-22 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle indexed access checks ([#1468](https://github.com/hey-api/openapi-ts/pull/1468)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod: generate patterns and improve plain schemas ([#1469](https://github.com/hey-api/openapi-ts/pull/1469)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add links to the experimental parser callouts ([#1471](https://github.com/hey-api/openapi-ts/pull/1471)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update types for custom plugins so defineConfig does not throw ([#1462](https://github.com/hey-api/openapi-ts/pull/1462)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export IR types ([#1464](https://github.com/hey-api/openapi-ts/pull/1464)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export utils ([#1467](https://github.com/hey-api/openapi-ts/pull/1467)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow plugins to explicitly declare whether they should be re-exported from the index file ([#1457](https://github.com/hey-api/openapi-ts/pull/1457)) -### @hey-api/openapi-ts 0.53.3 +
+
-- Thanks @mrlubos! - fix: properly handle dual publishing and type generation ([#1075](https://github.com/hey-api/openapi-ts/pull/1075)) +# 2024-12-17 ---- +## @hey-api/openapi-ts 0.60.0 -## 2024-09-19 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: require sdk.transformer to use generated transformers ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) -### @hey-api/openapi-ts 0.53.2 + ### Added `sdk.transformer` option -- Thanks @mrlubos! - fix: handle colon in operation path ([#1060](https://github.com/hey-api/openapi-ts/pull/1060)) -- Thanks @mrlubos! - fix: allow overriding generated headers from options ([#1065](https://github.com/hey-api/openapi-ts/pull/1065)) -- Thanks @mrlubos! - fix: export Operation interface ([#1068](https://github.com/hey-api/openapi-ts/pull/1068)) -- Thanks @mrlubos! - fix: handle named object property with no nested properties ([#1067](https://github.com/hey-api/openapi-ts/pull/1067)) -- Thanks @mrlubos! - fix: transform any-of nullable dates ([#1066](https://github.com/hey-api/openapi-ts/pull/1066)) + When generating SDKs, you now have to specify `transformer` in order to modify response data. By default, adding `@hey-api/transformers` to your plugins will only produce additional output. To preserve the previous functionality, set `sdk.transformer` to `true`. ---- + ```js + import { defaultPlugins } from "@hey-api/openapi-ts"; -## 2024-09-17 + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + ...defaultPlugins, + { + dates: true, + name: "@hey-api/transformers", + }, + { + name: "@hey-api/sdk", + transformer: true, // [!code ++] + }, + ], + }; + ``` -### @hey-api/openapi-ts 0.53.1 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: revert license to MIT ([#1447](https://github.com/hey-api/openapi-ts/pull/1447)) -- Thanks @mrlubos! - fix: throw error on invalid client value ([#1050](https://github.com/hey-api/openapi-ts/pull/1050)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: Zod plugin generates response schemas ([#1430](https://github.com/hey-api/openapi-ts/pull/1430)) -## 2024-09-04 +
+
-### @hey-api/openapi-ts 0.53.0 +# 2024-12-12 -- Thanks @mrlubos! - feat: rename legacy clients with 'legacy/' prefix ([#1008](https://github.com/hey-api/openapi-ts/pull/1008)) -- Thanks @mrlubos! - feat: change schemas name pattern, add schemas.name option ([#1009](https://github.com/hey-api/openapi-ts/pull/1009)) -- Thanks @jacobinu! - fix: make UserConfig interface instead of type ([#989](https://github.com/hey-api/openapi-ts/pull/989)) -- Thanks @mrlubos! - fix: set query key base url from supplied client if provided ([#1010](https://github.com/hey-api/openapi-ts/pull/1010)) +## @hey-api/openapi-ts 0.59.2 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate querySerializer options for Axios client ([#1420](https://github.com/hey-api/openapi-ts/pull/1420)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: infer responseType in SDKs for axios client ([#1419](https://github.com/hey-api/openapi-ts/pull/1419)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support oauth2 and apiKey security schemes ([#1409](https://github.com/hey-api/openapi-ts/pull/1409)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod plugin handles recursive schemas ([#1416](https://github.com/hey-api/openapi-ts/pull/1416)) -## 2024-08-27 +
+
-### @hey-api/openapi-ts 0.52.11 +# 2024-12-06 -- Thanks @mrlubos! - fix: export query key functions from TanStack Query plugin ([#981](https://github.com/hey-api/openapi-ts/pull/981)) +## @hey-api/openapi-ts 0.59.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: prefix restricted identifier names with underscore ([#1398](https://github.com/hey-api/openapi-ts/pull/1398)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: disallow additional query parameters in experimental parser output ([#1394](https://github.com/hey-api/openapi-ts/pull/1394)) -## 2024-08-26 +
+
-### @hey-api/openapi-ts 0.52.10 +# 2024-12-05 -- Thanks @jacobinu! - fix: handle tree-shakeable angular client case ([#973](https://github.com/hey-api/openapi-ts/pull/973)) +## @hey-api/openapi-ts 0.59.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs.level` option ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) -## 2024-08-18 + ### Added `logs.level` option -### @hey-api/openapi-ts 0.52.9 + You can now configure different log levels. As part of this feature, we had to introduce a breaking change by moving the `debug` option to `logs.level`. This will affect you if you're calling `@hey-api/openapi-ts` from Node.js (not CLI) or using the configuration file. -- Thanks @mrlubos! - fix: handle schemas with generics from C# ([#948](https://github.com/hey-api/openapi-ts/pull/948)) -- Thanks @mrlubos! - fix: rename infinite key in query key to \_infinite ([#949](https://github.com/hey-api/openapi-ts/pull/949)) -- Thanks @mrlubos! - chore: warn on duplicate operation ID ([#946](https://github.com/hey-api/openapi-ts/pull/946)) -- Thanks @mrlubos! - fix: correctly use parentheses around composed schemas ([#947](https://github.com/hey-api/openapi-ts/pull/947)) -- Thanks @mrlubos! - fix: correctly handle integer type in additional properties ([#944](https://github.com/hey-api/openapi-ts/pull/944)) + ```js + export default { + client: "@hey-api/client-fetch", + debug: true, // [!code --] + input: "path/to/openapi.json", + logs: { + level: "debug", // [!code ++] + }, + output: "src/client", + }; + ``` ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: remove `@hey-api/schemas` from default plugins ([#1389](https://github.com/hey-api/openapi-ts/pull/1389)) -## 2024-08-14 + ### Updated default `plugins` -### @hey-api/openapi-ts 0.52.7 + `@hey-api/schemas` has been removed from the default plugins. To continue using it, add it to your plugins array. -- Thanks @mrlubos! - fix: handle various issues with additionalProperties definitions ([#929](https://github.com/hey-api/openapi-ts/pull/929)) -- Thanks @mrlubos! - fix: update TanStack Query key to contain base URL ([#927](https://github.com/hey-api/openapi-ts/pull/927)) -- Thanks @mrlubos! - fix: change TanStack Query mutation helpers to functions for consistent API ([#927](https://github.com/hey-api/openapi-ts/pull/927)) + ```js + import { defaultPlugins } from "@hey-api/openapi-ts"; ---- + export default { + client: "@hey-api/client-fetch", + experimentalParser: true, + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + ...defaultPlugins, + "@hey-api/schemas", // [!code ++] + ], + }; + ``` -### @hey-api/openapi-ts 0.52.8 -- Thanks @mrlubos! - fix: cherry pick keys in mutation page param type ([#932](https://github.com/hey-api/openapi-ts/pull/932)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly resolve required properties in nested allOf composition ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `--silent` or `-s` CLI option for silent log level ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers handle allOf composition in experimental parser ([#1382](https://github.com/hey-api/openapi-ts/pull/1382)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs` configuration option to customize log directory ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow arbitrary object properties when additionalProperties is undefined ([#1390](https://github.com/hey-api/openapi-ts/pull/1390)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support `DEBUG` environment variable ([#1387](https://github.com/hey-api/openapi-ts/pull/1387)) ---- +
+
-## 2024-08-13 +# 2024-12-02 -### @hey-api/openapi-ts 0.52.6 +## @hey-api/openapi-ts 0.58.0 -- Thanks @mrlubos! - fix: add preview version of TanStack Query plugin ([#920](https://github.com/hey-api/openapi-ts/pull/920)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.identifierCase option ([#1353](https://github.com/hey-api/openapi-ts/pull/1353)) ---- + ### Added `typescript.identifierCase` option -## 2024-08-12 + **This change affects only the experimental parser.** By default, the generated TypeScript interfaces will follow the PascalCase naming convention. In the previous versions, we tried to preserve the original name as much as possible. To keep the previous behavior, set `typescript.identifierCase` to `preserve`. -### @hey-api/openapi-ts 0.52.5 + ```js + export default { + client: "@hey-api/client-fetch", + experimentalParser: true, + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + // ...other plugins + { + identifierCase: "preserve", // [!code ++] + name: "@hey-api/typescript", + }, + ], + }; + ``` -- Thanks @mrlubos! - fix: throw if prerequisite checks are not met ([#910](https://github.com/hey-api/openapi-ts/pull/910)) -- Thanks @mrlubos! - fix: correctly transform string to pascalcase when referenced inside schema ([#907](https://github.com/hey-api/openapi-ts/pull/907)) -- Thanks @mrlubos! - fix: do not generate types tree by default if services are enabled as it is unused ([#908](https://github.com/hey-api/openapi-ts/pull/908)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove schemas and transformers re-exports from index.ts ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) ---- + ### Removed `schemas.gen.ts` re-export -## 2024-08-10 + `index.ts` will no longer re-export `schemas.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `schemas.gen.ts` directly. -### @hey-api/openapi-ts 0.52.4 + ```js + import { mySchema } from "client"; // [!code --] + import { mySchema } from "client/schemas.gen"; // [!code ++] + ``` -- Thanks @mrlubos! - fix: define ThrowOnError generic as the last argument ([#895](https://github.com/hey-api/openapi-ts/pull/895)) + ### Removed `transformers.gen.ts` re-export ---- + `index.ts` will no longer re-export `transformers.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `transformers.gen.ts` directly. -## 2024-08-08 + ```js + import { myTransformer } from "client"; // [!code --] + import { myTransformer } from "client/transformers.gen"; // [!code ++] + ``` -### @hey-api/openapi-ts 0.52.3 +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add output.clean option ([#1360](https://github.com/hey-api/openapi-ts/pull/1360)) -- Thanks @mrlubos! - fix: generate ThrowOnError generic for class-based client methods ([#884](https://github.com/hey-api/openapi-ts/pull/884)) + ### Added `output.clean` option ---- + By default, the `output.path` folder will be emptied on every run. To preserve the previous behavior, set `output.clean` to `false`. -## 2024-08-07 + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: { + clean: false, // [!code ++] + path: "src/client", + }, + }; + ``` -### @hey-api/openapi-ts 0.52.2 +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.enumsCase option ([#1362](https://github.com/hey-api/openapi-ts/pull/1362)) -- Thanks @hougesen! - fix: check if key is schema property before removing ([#881](https://github.com/hey-api/openapi-ts/pull/881)) ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add before and after to pagination keywords ([#1361](https://github.com/hey-api/openapi-ts/pull/1361)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Plugin API namespace ([#1368](https://github.com/hey-api/openapi-ts/pull/1368)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin handles conflict with internal function name in experimental parser ([#1369](https://github.com/hey-api/openapi-ts/pull/1369)) -## 2024-08-06 +
+
-### @hey-api/openapi-ts 0.52.1 +# 2024-11-25 -- Thanks @mrlubos! - fix: define multiple errors type as union instead of intersection ([#855](https://github.com/hey-api/openapi-ts/pull/855)) -- Thanks @mrlubos! - fix: remove Content-Type header with multipart/form-data content type ([#853](https://github.com/hey-api/openapi-ts/pull/853)) -- Thanks @qqilihq! - fix: Additional properties key ([#861](https://github.com/hey-api/openapi-ts/pull/861)) -- Thanks @SamuelGuillemet! - fix: add conditionnal generation for service related types ([#869](https://github.com/hey-api/openapi-ts/pull/869)) +## @hey-api/openapi-ts 0.57.1 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers correctly handle an array ([#1335](https://github.com/hey-api/openapi-ts/pull/1335)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve camelcase with abbreviated plurals ([#1332](https://github.com/hey-api/openapi-ts/pull/1332)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser generates url inside data types ([#1333](https://github.com/hey-api/openapi-ts/pull/1333)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser transforms anyOf date and null ([#1336](https://github.com/hey-api/openapi-ts/pull/1336)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser handles empty string and null enum values in JavaScript mode ([#1330](https://github.com/hey-api/openapi-ts/pull/1330)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser exports reusable request bodies ([#1340](https://github.com/hey-api/openapi-ts/pull/1340)) -## 2024-08-01 +
+
-### @hey-api/openapi-ts 0.52.0 +# 2024-11-22 -- Thanks @LeeChSien! - feat: add namespace supporting for enums ([#835](https://github.com/hey-api/openapi-ts/pull/835)) -- Thanks @mrlubos! - fix: generate internal client for services when using standalone package ([#830](https://github.com/hey-api/openapi-ts/pull/830)) +## @hey-api/openapi-ts 0.57.0 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename Hey API plugins ([#1324](https://github.com/hey-api/openapi-ts/pull/1324)) -## 2024-07-28 + ### Renamed `@hey-api/services` plugin -### @hey-api/openapi-ts 0.51.0 + This plugin has been renamed to `@hey-api/sdk`. -- Thanks @mrlubos! - feat: make `client` config option required ([#828](https://github.com/hey-api/openapi-ts/pull/828)) -- Thanks @mrlubos! - fix: correctly process body parameter for OpenAPI 2.0 specs ([#823](https://github.com/hey-api/openapi-ts/pull/823)) -- Thanks @mrlubos! - fix: do not ignore api-version param in standalone clients ([#827](https://github.com/hey-api/openapi-ts/pull/827)) + ### Changed `sdk.output` value ---- + To align with the updated name, the `@hey-api/sdk` plugin will generate an `sdk.gen.ts` file. This will result in a breaking change if you're importing from `services.gen.ts`. Please update your imports to reflect this change. -## 2024-07-26 + ```js + import { client } from "client/services.gen"; // [!code --] + import { client } from "client/sdk.gen"; // [!code ++] + ``` -### @hey-api/openapi-ts 0.50.2 + ### Renamed `@hey-api/types` plugin -- Thanks @mrlubos! - fix: handle fully illegal schema names ([#818](https://github.com/hey-api/openapi-ts/pull/818)) + This plugin has been renamed to `@hey-api/typescript`. ---- +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.exportInlineEnums option ([#1327](https://github.com/hey-api/openapi-ts/pull/1327)) -## 2024-07-24 + ### Added `typescript.exportInlineEnums` option -### @hey-api/openapi-ts 0.50.1 + By default, inline enums (enums not defined as reusable components in the input file) will be generated only as inlined union types. You can set `exportInlineEnums` to `true` to treat inline enums as reusable components. When `true`, the exported enums will follow the style defined in `enums`. -- Thanks @mrlubos! - fix: generate types only for filtered services ([#807](https://github.com/hey-api/openapi-ts/pull/807)) -- Thanks @mrlubos! - fix: allow any key/value pair in object types with empty properties object ([#807](https://github.com/hey-api/openapi-ts/pull/807)) + This is a breaking change since in the previous versions, inline enums were always treated as reusable components. To preserve your current output, set `exportInlineEnums` to `true`. This feature works only with the experimental parser. ---- + ```js + export default { + client: "@hey-api/client-fetch", + experimentalParser: true, + input: "path/to/openapi.json", + output: "src/client", + plugins: [ + // ...other plugins + { + exportInlineEnums: true, // [!code ++] + name: "@hey-api/typescript", + }, + ], + }; + ``` -## 2024-07-21 -### @hey-api/openapi-ts 0.50.0 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve generated enum keys in experimental parser ([#1326](https://github.com/hey-api/openapi-ts/pull/1326)) -- Thanks @mrlubos! - feat: allow bundling standalone clients with `client.bundle = true` ([#790](https://github.com/hey-api/openapi-ts/pull/790)) +
+
---- +# 2024-11-21 -## 2024-07-17 +## @hey-api/openapi-ts 0.56.3 -### @hey-api/openapi-ts 0.49.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles value constraints and defaults ([#1319](https://github.com/hey-api/openapi-ts/pull/1319)) -- Thanks @mrlubos! - feat: allow filtering service endpoints with `services.filter` ([#787](https://github.com/hey-api/openapi-ts/pull/787)) -- Thanks @mrlubos! - fix: suffix illegal service names ([#784](https://github.com/hey-api/openapi-ts/pull/784)) -- Thanks @mrlubos! - fix: handle references to schemas with illegal names ([#786](https://github.com/hey-api/openapi-ts/pull/786)) -- Thanks @mrlubos! - fix: handle application/x-www-form-urlencoded content in request body ([#788](https://github.com/hey-api/openapi-ts/pull/788)) +
+
---- +# 2024-11-20 -## 2024-07-15 +## @hey-api/openapi-ts 0.56.2 -### @hey-api/openapi-ts 0.48.3 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add input.exclude option ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make Zod plugin available in plugins options ([#1316](https://github.com/hey-api/openapi-ts/pull/1316)) -- Thanks @mrlubos! - fix: use methodNameBuilder when asClass is false ([#781](https://github.com/hey-api/openapi-ts/pull/781)) -- Thanks @mrlubos! - fix: allow not generating types tree with types.tree = false ([#782](https://github.com/hey-api/openapi-ts/pull/782)) +
+
---- +# 2024-11-18 -## 2024-07-04 +## @hey-api/openapi-ts 0.56.1 -### @hey-api/openapi-ts 0.48.2 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: gracefully handle invalid schema type in experimental parser ([#1309](https://github.com/hey-api/openapi-ts/pull/1309)) -- Thanks @mrlubos! - fix: handle formData parameters in generated types ([#746](https://github.com/hey-api/openapi-ts/pull/746)) -- Thanks @mrlubos! - fix: ignore services.asClass setting for named clients ([#742](https://github.com/hey-api/openapi-ts/pull/742)) -- Thanks @mrlubos! - fix: improve default response type detection ([#744](https://github.com/hey-api/openapi-ts/pull/744)) -- Thanks @mrlubos! - fix: handle properties in one-of composition ([#745](https://github.com/hey-api/openapi-ts/pull/745)) +
+
---- +## @hey-api/openapi-ts 0.56.0 -## 2024-07-01 +### Core +- Thanks [@jacobinu](https://github.com/jacobinu)! - feat: add `fastify` plugin ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) -### @hey-api/openapi-ts 0.48.1 -- Thanks @mrlubos! - fix: generate service types when types are enabled, even if services are disabled ([#734](https://github.com/hey-api/openapi-ts/pull/734)) -- Thanks @mrlubos! - fix: support custom config file path ([#737](https://github.com/hey-api/openapi-ts/pull/737)) -- Thanks @mrlubos! - fix: handle async response transformers ([#736](https://github.com/hey-api/openapi-ts/pull/736)) +- Thanks [@jacobinu](https://github.com/jacobinu)! - fix: export a map of error and response types by status code ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) +- Thanks [@jacobinu](https://github.com/jacobinu)! - fix: deprecate types.tree option ([#1286](https://github.com/hey-api/openapi-ts/pull/1286)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle file-like content media type without explicit schema ([#1305](https://github.com/hey-api/openapi-ts/pull/1305)) ---- +
+
-## 2024-06-24 +# 2024-11-13 -### @hey-api/openapi-ts 0.48.0 +## @hey-api/openapi-ts 0.55.3 -- Thanks @anchan828! - feat: pass the Operation object to methodNameBuilder ([#696](https://github.com/hey-api/openapi-ts/pull/696)) -- Thanks @mrlubos! - fix: make getHeaders accept generic ([#708](https://github.com/hey-api/openapi-ts/pull/708)) -- Thanks @mrlubos! - fix: handle void responses in transformers ([#712](https://github.com/hey-api/openapi-ts/pull/712)) +### Core +- Thanks [@hougesen](https://github.com/hougesen)! - feat: add support for oxlint as linter ([#1283](https://github.com/hey-api/openapi-ts/pull/1283)) ---- +
+
-## 2024-06-21 +# 2024-11-10 -### @hey-api/openapi-ts 0.47.2 +## @hey-api/openapi-ts 0.55.2 -- Thanks @mrlubos! - feat: add initial implementation of prefixItems ([#701](https://github.com/hey-api/openapi-ts/pull/701)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update sponsorship links ([#1253](https://github.com/hey-api/openapi-ts/pull/1253)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly generate array when items are a oneOf array with length 1 ([#1266](https://github.com/hey-api/openapi-ts/pull/1266)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle non-exploded array query parameters ([#1265](https://github.com/hey-api/openapi-ts/pull/1265)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminators in experimental parser ([#1267](https://github.com/hey-api/openapi-ts/pull/1267)) ---- +
+
-## 2024-06-19 +# 2024-11-08 -### @hey-api/openapi-ts 0.47.1 +## @hey-api/openapi-ts 0.55.1 -- Thanks @Nick-Lucas! - Fix an issue where transforms for endpoints with array returns were not generated correctly ([#690](https://github.com/hey-api/openapi-ts/pull/690)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle nullable enums in experimental parser ([#1248](https://github.com/hey-api/openapi-ts/pull/1248)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for custom plugins ([#1251](https://github.com/hey-api/openapi-ts/pull/1251)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: render void for empty response status codes in experimental parser ([#1250](https://github.com/hey-api/openapi-ts/pull/1250)) ---- +
+
-## 2024-06-16 +# 2024-11-07 -### @hey-api/openapi-ts 0.47.0 +## @hey-api/openapi-ts 0.55.0 -- Thanks @mrlubos! - feat: add initial support for response transformers (string -> Date) ([#685](https://github.com/hey-api/openapi-ts/pull/685)) -- Thanks @Stono! - Add support for customizing method names with `services.methodNameBuilder` ([#663](https://github.com/hey-api/openapi-ts/pull/663)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add input.include option ([#1241](https://github.com/hey-api/openapi-ts/pull/1241)) ---- -## 2024-05-27 +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle pagination with basic refs ([#1239](https://github.com/hey-api/openapi-ts/pull/1239)) -### @hey-api/openapi-ts 0.46.3 +
+
-- Thanks @SimenB! - Add explicit type annotations to `Interceptors` ([#594](https://github.com/hey-api/openapi-ts/pull/594)) -- Thanks @mrlubos! - fix: handle 1XX response status codes ([#635](https://github.com/hey-api/openapi-ts/pull/635)) -- Thanks @mrlubos! - fix: improve default response status code classification ([#636](https://github.com/hey-api/openapi-ts/pull/636)) +# 2024-11-06 ---- +## @hey-api/openapi-ts 0.54.4 -## 2024-05-24 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: forbid any body, path, or query parameters if not defined in spec ([#1237](https://github.com/hey-api/openapi-ts/pull/1237)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties: boolean in experimental parser ([#1235](https://github.com/hey-api/openapi-ts/pull/1235)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update schemas plugin to handle experimental 3.0.x parser ([#1233](https://github.com/hey-api/openapi-ts/pull/1233)) -### @hey-api/openapi-ts 0.46.2 + This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today. -- do not transform property names for standalone clients ([#616](https://github.com/hey-api/openapi-ts/pull/616)) + You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI. ---- + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + experimentalParser: true, + }; + ``` -## 2024-05-23 + ```sh + npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e + ``` -### @hey-api/openapi-ts 0.46.1 + The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues). -- handle application/json content type in parameter definitions ([#614](https://github.com/hey-api/openapi-ts/pull/614)) + Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients. ---- + If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉 -## 2024-05-21 +
+
-### @hey-api/openapi-ts 0.46.0 +# 2024-11-05 -- feat: tree-shakeable services ([#602](https://github.com/hey-api/openapi-ts/pull/602)) +## @hey-api/openapi-ts 0.54.3 ---- +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 3.0.x experimental parser ([#1230](https://github.com/hey-api/openapi-ts/pull/1230)) -## 2024-05-16 + This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today. -### @hey-api/openapi-ts 0.45.1 + You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI. -- use generated types in request object instead of inlined duplicated params ([#582](https://github.com/hey-api/openapi-ts/pull/582)) + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + experimentalParser: true, + }; + ``` ---- + ```sh + npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e + ``` -## 2024-05-15 + The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues). -### @hey-api/openapi-ts 0.45.0 + Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients. -- feat: remove client inference ([#569](https://github.com/hey-api/openapi-ts/pull/569)) -- deduplicate inlined enums ([#573](https://github.com/hey-api/openapi-ts/pull/573)) -- generate correct optional key in types when using positional arguments (useOptions: false) ([#572](https://github.com/hey-api/openapi-ts/pull/572)) + If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉 ---- +
+
-## 2024-05-13 +# 2024-11-01 -### @hey-api/openapi-ts 0.44.0 +## @hey-api/openapi-ts 0.54.2 -- feat: move format and lint config options to output object ([#546](https://github.com/hey-api/openapi-ts/pull/546)) -- comment position in JavaScript enums ([#544](https://github.com/hey-api/openapi-ts/pull/544)) -- export inlined enums from components ([#563](https://github.com/hey-api/openapi-ts/pull/563)) -- remove unused enums option from CLI ([#565](https://github.com/hey-api/openapi-ts/pull/565)) -- Support typescript in peerDependencies ([#551](https://github.com/hey-api/openapi-ts/pull/551)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add support for @tanstack/angular-query-experimental package ([#1222](https://github.com/hey-api/openapi-ts/pull/1222)) ---- +
+
-## 2024-05-06 +# 2024-10-29 -### @hey-api/openapi-ts 0.43.2 +## @hey-api/openapi-ts 0.54.1 -- deduplicate exported data and response types ([#538](https://github.com/hey-api/openapi-ts/pull/538)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore name option when not used with legacy clients to avoid producing broken output ([#1211](https://github.com/hey-api/openapi-ts/pull/1211)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for OpenAPI 3.1.1 to experimental parser ([#1209](https://github.com/hey-api/openapi-ts/pull/1209)) ---- +
+
-## 2024-05-05 +# 2024-10-28 -### @hey-api/openapi-ts 0.43.1 +## @hey-api/openapi-ts 0.54.0 -- use optional chaining in bin catch block ([#528](https://github.com/hey-api/openapi-ts/pull/528)) -- broken encoding ([#532](https://github.com/hey-api/openapi-ts/pull/532)) -- fix(parser): handle type array ([#533](https://github.com/hey-api/openapi-ts/pull/533)) +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make plugins first-class citizens ([#1201](https://github.com/hey-api/openapi-ts/pull/1201)) ---- + This release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced. -## 2024-05-02 + ### Removed CLI options -### @hey-api/openapi-ts 0.43.0 + The `--types`, `--schemas`, and `--services` CLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as `--plugins ` -- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498)) -- negative numbers in numeric enums ([#470](https://github.com/hey-api/openapi-ts/pull/470)) -- escape keys in schemas starting with digit but containing non-digit characters ([#502](https://github.com/hey-api/openapi-ts/pull/502)) -- issue causing code to not generate (t.filter is not a function) ([#507](https://github.com/hey-api/openapi-ts/pull/507)) -- handle additional properties union ([#499](https://github.com/hey-api/openapi-ts/pull/499)) -- do not export inline enums ([#508](https://github.com/hey-api/openapi-ts/pull/508)) -- prefix parameter type exports to avoid conflicts ([#501](https://github.com/hey-api/openapi-ts/pull/501)) -- export operation data and response types ([#500](https://github.com/hey-api/openapi-ts/pull/500)) -- handle cases where packages are installed globally ([#471](https://github.com/hey-api/openapi-ts/pull/471)) -- handle cases where package.json does not exist ([#471](https://github.com/hey-api/openapi-ts/pull/471)) + ### Removed `*.export` option ---- + Previously, you could explicitly disable export of certain artifacts using the `*.export` option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of `plugins` and excluding the unwanted plugin. -## 2024-04-22 + ::: code-group -### @hey-api/openapi-ts 0.42.1 + ```js [shorthand] + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + schemas: false, // [!code --] + plugins: ["@hey-api/types", "@hey-api/services"], // [!code ++] + }; + ``` + + ```js [*.export] + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + schemas: { + export: false, // [!code --] + }, + plugins: ["@hey-api/types", "@hey-api/services"], // [!code ++] + }; + ``` + + ::: + + ### Renamed `schemas.name` option + + Each plugin definition contains a `name` field. This was conflicting with the `schemas.name` option. As a result, it has been renamed to `nameBuilder`. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + schemas: { + name: (name) => `${name}Schema`, // [!code --] + }, + plugins: [ + // ...other plugins + { + nameBuilder: (name) => `${name}Schema`, // [!code ++] + name: "@hey-api/schemas", + }, + ], + }; + ``` + + ### Removed `services.include` shorthand option + + Previously, you could use a string value as a shorthand for the `services.include` configuration option. You can now achieve the same result using the `include` option. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + services: "^MySchema", // [!code --] + plugins: [ + // ...other plugins + { + include: "^MySchema", // [!code ++] + name: "@hey-api/services", + }, + ], + }; + ``` + + ### Renamed `services.name` option + + Each plugin definition contains a `name` field. This was conflicting with the `services.name` option. As a result, it has been renamed to `serviceNameBuilder`. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + services: { + name: "{{name}}Service", // [!code --] + }, + plugins: [ + // ...other plugins + { + serviceNameBuilder: "{{name}}Service", // [!code ++] + name: "@hey-api/services", + }, + ], + }; + ``` + + ### Renamed `types.dates` option + + Previously, you could set `types.dates` to a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate `@hey-api/transformers` plugin. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + types: { + dates: "types+transform", // [!code --] + }, + plugins: [ + // ...other plugins + { + dates: true, // [!code ++] + name: "@hey-api/transformers", + }, + ], + }; + ``` + + ### Removed `types.include` shorthand option + + Previously, you could use a string value as a shorthand for the `types.include` configuration option. You can now achieve the same result using the `include` option. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + types: "^MySchema", // [!code --] + plugins: [ + // ...other plugins + { + include: "^MySchema", // [!code ++] + name: "@hey-api/types", + }, + ], + }; + ``` + + ### Renamed `types.name` option + + Each plugin definition contains a `name` field. This was conflicting with the `types.name` option. As a result, it has been renamed to `style`. + + ```js + export default { + client: "@hey-api/client-fetch", + input: "path/to/openapi.json", + output: "src/client", + types: { + name: "PascalCase", // [!code --] + }, + plugins: [ + // ...other plugins + { + name: "@hey-api/types", + style: "PascalCase", // [!code ++] + }, + ], + }; + ``` -- properly set formData and body when using options ([#461](https://github.com/hey-api/openapi-ts/pull/461)) +
+
---- +# 2024-10-25 -## 2024-04-21 +## @hey-api/openapi-ts 0.53.12 -### @hey-api/openapi-ts 0.42.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin using missing import for infinite query ([#1195](https://github.com/hey-api/openapi-ts/pull/1195)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: pass TanStack query signal to client call ([#1194](https://github.com/hey-api/openapi-ts/pull/1194)) -- feat: add support for biomejs as a formatter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) -- feat: move operationId config option to services object ([#441](https://github.com/hey-api/openapi-ts/pull/441)) -- feat: add operation error type mappings ([#442](https://github.com/hey-api/openapi-ts/pull/442)) -- feat: add support for biomejs as a linter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) -- feat: automatically handle dates in query string ([#443](https://github.com/hey-api/openapi-ts/pull/443)) -- do not destructure data when using use options ([#450](https://github.com/hey-api/openapi-ts/pull/450)) -- only remove core directory when export core is true ([#449](https://github.com/hey-api/openapi-ts/pull/449)) -- add jsdoc comments with use options ([#439](https://github.com/hey-api/openapi-ts/pull/439)) -- change: config option `lint: true` has changed to `lint: 'eslint'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) -- change: disable formatting with prettier by default ([#457](https://github.com/hey-api/openapi-ts/pull/457)) -- change: config option `format: true` has changed to `format: 'prettier'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +
+
---- +# 2024-10-13 -## 2024-04-19 +## @hey-api/openapi-ts 0.53.11 -### @hey-api/openapi-ts 0.41.0 +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation ([#1151](https://github.com/hey-api/openapi-ts/pull/1151)) +
+
+ +# 2024-10-11 + +## @hey-api/openapi-ts 0.53.10 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update license field in package.json to match the license, revert client packages license to MIT ([#1145](https://github.com/hey-api/openapi-ts/pull/1145)) + +
+
+ +# 2024-10-10 + +## @hey-api/openapi-ts 0.53.9 + +### Core +- Thanks [@BierDav](https://github.com/BierDav)! - Add support for passing mutation specific options to `Mutation(options)` ([#1137](https://github.com/hey-api/openapi-ts/pull/1137)) + +
+
+ +# 2024-10-06 + +## @hey-api/openapi-ts 0.53.8 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use correct relative path to bundled client when imported from nested module ([#1123](https://github.com/hey-api/openapi-ts/pull/1123)) + +
+
+ +# 2024-10-03 + +## @hey-api/openapi-ts 0.53.7 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: skip nested properties in oneOf and anyOf compositions ([#1113](https://github.com/hey-api/openapi-ts/pull/1113)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: abstract page params logic in TanStack Query plugin ([#1115](https://github.com/hey-api/openapi-ts/pull/1115)) + +
+
+ +# 2024-09-30 + +## @hey-api/openapi-ts 0.53.6 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export spec-compliant OpenAPI 3.1 interface ([#1104](https://github.com/hey-api/openapi-ts/pull/1104)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle multiple form-data parameters in Swagger 2.0 ([#1108](https://github.com/hey-api/openapi-ts/pull/1108)) + +
+
+ +# 2024-09-26 + +## @hey-api/openapi-ts 0.53.5 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make TanStack Query plugin work with class-based services ([#1096](https://github.com/hey-api/openapi-ts/pull/1096)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid printing duplicate null nodes ([#1095](https://github.com/hey-api/openapi-ts/pull/1095)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: attach TanStack Query infinite page params only if they exist ([#1094](https://github.com/hey-api/openapi-ts/pull/1094)) + +
+
+ +# 2024-09-25 + +## @hey-api/openapi-ts 0.53.4 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: import handlebars instead of runtime ([#1087](https://github.com/hey-api/openapi-ts/pull/1087)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support dynamic require in child_process ([#1086](https://github.com/hey-api/openapi-ts/pull/1086)) + +
+
+ +# 2024-09-22 + +## @hey-api/openapi-ts 0.53.3 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: properly handle dual publishing and type generation ([#1075](https://github.com/hey-api/openapi-ts/pull/1075)) + +
+
+ +# 2024-09-19 + +## @hey-api/openapi-ts 0.53.2 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle colon in operation path ([#1060](https://github.com/hey-api/openapi-ts/pull/1060)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow overriding generated headers from options ([#1065](https://github.com/hey-api/openapi-ts/pull/1065)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Operation interface ([#1068](https://github.com/hey-api/openapi-ts/pull/1068)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle named object property with no nested properties ([#1067](https://github.com/hey-api/openapi-ts/pull/1067)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transform any-of nullable dates ([#1066](https://github.com/hey-api/openapi-ts/pull/1066)) + +
+
+ +# 2024-09-17 + +## @hey-api/openapi-ts 0.53.1 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw error on invalid client value ([#1050](https://github.com/hey-api/openapi-ts/pull/1050)) + +
+
+ +# 2024-09-04 + +## @hey-api/openapi-ts 0.53.0 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename legacy clients with 'legacy/' prefix ([#1008](https://github.com/hey-api/openapi-ts/pull/1008)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change schemas name pattern, add schemas.name option ([#1009](https://github.com/hey-api/openapi-ts/pull/1009)) + + +- Thanks [@jacobinu](https://github.com/jacobinu)! - fix: make UserConfig interface instead of type ([#989](https://github.com/hey-api/openapi-ts/pull/989)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided ([#1010](https://github.com/hey-api/openapi-ts/pull/1010)) + +
+
+ +# 2024-08-27 + +## @hey-api/openapi-ts 0.52.11 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export query key functions from TanStack Query plugin ([#981](https://github.com/hey-api/openapi-ts/pull/981)) + +
+
+ +# 2024-08-26 + +## @hey-api/openapi-ts 0.52.10 + +### Core +- Thanks [@jacobinu](https://github.com/jacobinu)! - fix: handle tree-shakeable angular client case ([#973](https://github.com/hey-api/openapi-ts/pull/973)) + +
+
+ +# 2024-08-18 + +## @hey-api/openapi-ts 0.52.9 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with generics from C# ([#948](https://github.com/hey-api/openapi-ts/pull/948)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: rename infinite key in query key to \_infinite ([#949](https://github.com/hey-api/openapi-ts/pull/949)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - chore: warn on duplicate operation ID ([#946](https://github.com/hey-api/openapi-ts/pull/946)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly use parentheses around composed schemas ([#947](https://github.com/hey-api/openapi-ts/pull/947)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly handle integer type in additional properties ([#944](https://github.com/hey-api/openapi-ts/pull/944)) + +
+
+ +# 2024-08-14 + +## @hey-api/openapi-ts 0.52.8 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: cherry pick keys in mutation page param type ([#932](https://github.com/hey-api/openapi-ts/pull/932)) + +
+
+ +## @hey-api/openapi-ts 0.52.7 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle various issues with additionalProperties definitions ([#929](https://github.com/hey-api/openapi-ts/pull/929)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update TanStack Query key to contain base URL ([#927](https://github.com/hey-api/openapi-ts/pull/927)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: change TanStack Query mutation helpers to functions for consistent API ([#927](https://github.com/hey-api/openapi-ts/pull/927)) + +
+
+ +# 2024-08-13 + +## @hey-api/openapi-ts 0.52.6 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add preview version of TanStack Query plugin ([#920](https://github.com/hey-api/openapi-ts/pull/920)) + +
+
+ +# 2024-08-12 + +## @hey-api/openapi-ts 0.52.5 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if prerequisite checks are not met ([#910](https://github.com/hey-api/openapi-ts/pull/910)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly transform string to pascalcase when referenced inside schema ([#907](https://github.com/hey-api/openapi-ts/pull/907)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not generate types tree by default if services are enabled as it is unused ([#908](https://github.com/hey-api/openapi-ts/pull/908)) + +
+
+ +# 2024-08-10 + +## @hey-api/openapi-ts 0.52.4 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define ThrowOnError generic as the last argument ([#895](https://github.com/hey-api/openapi-ts/pull/895)) + +
+
+ +# 2024-08-08 + +## @hey-api/openapi-ts 0.52.3 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate ThrowOnError generic for class-based client methods ([#884](https://github.com/hey-api/openapi-ts/pull/884)) + +
+
+ +# 2024-08-07 + +## @hey-api/openapi-ts 0.52.2 + +### Core +- Thanks [@hougesen](https://github.com/hougesen)! - fix: check if key is schema property before removing ([#881](https://github.com/hey-api/openapi-ts/pull/881)) + +
+
+ +# 2024-08-06 + +## @hey-api/openapi-ts 0.52.1 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define multiple errors type as union instead of intersection ([#855](https://github.com/hey-api/openapi-ts/pull/855)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove Content-Type header with multipart/form-data content type ([#853](https://github.com/hey-api/openapi-ts/pull/853)) +- Thanks [@qqilihq](https://github.com/qqilihq)! - fix: Additional properties key ([#861](https://github.com/hey-api/openapi-ts/pull/861)) +- Thanks [@SamuelGuillemet](https://github.com/SamuelGuillemet)! - fix: add conditionnal generation for service related types ([#869](https://github.com/hey-api/openapi-ts/pull/869)) + +
+
+ +# 2024-08-01 + +## @hey-api/openapi-ts 0.52.0 + +### Core +- Thanks [@LeeChSien](https://github.com/LeeChSien)! - feat: add namespace supporting for enums ([#835](https://github.com/hey-api/openapi-ts/pull/835)) + + +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate internal client for services when using standalone package ([#830](https://github.com/hey-api/openapi-ts/pull/830)) + +
+
+ +# 2024-07-28 + +## @hey-api/openapi-ts 0.51.0 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make `client` config option required ([#828](https://github.com/hey-api/openapi-ts/pull/828)) + + +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly process body parameter for OpenAPI 2.0 specs ([#823](https://github.com/hey-api/openapi-ts/pull/823)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not ignore api-version param in standalone clients ([#827](https://github.com/hey-api/openapi-ts/pull/827)) + +
+
+ +# 2024-07-26 + +## @hey-api/openapi-ts 0.50.2 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle fully illegal schema names ([#818](https://github.com/hey-api/openapi-ts/pull/818)) + +
+
+ +# 2024-07-24 + +## @hey-api/openapi-ts 0.50.1 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate types only for filtered services ([#807](https://github.com/hey-api/openapi-ts/pull/807)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow any key/value pair in object types with empty properties object ([#807](https://github.com/hey-api/openapi-ts/pull/807)) + +
+
+ +# 2024-07-21 + +## @hey-api/openapi-ts 0.50.0 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow bundling standalone clients with `client.bundle = true` ([#790](https://github.com/hey-api/openapi-ts/pull/790)) + +
+
+ +# 2024-07-17 + +## @hey-api/openapi-ts 0.49.0 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow filtering service endpoints with `services.filter` ([#787](https://github.com/hey-api/openapi-ts/pull/787)) + + +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: suffix illegal service names ([#784](https://github.com/hey-api/openapi-ts/pull/784)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle references to schemas with illegal names ([#786](https://github.com/hey-api/openapi-ts/pull/786)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle application/x-www-form-urlencoded content in request body ([#788](https://github.com/hey-api/openapi-ts/pull/788)) + +
+
+ +# 2024-07-15 + +## @hey-api/openapi-ts 0.48.3 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use methodNameBuilder when asClass is false ([#781](https://github.com/hey-api/openapi-ts/pull/781)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow not generating types tree with types.tree = false ([#782](https://github.com/hey-api/openapi-ts/pull/782)) + +
+
+ +# 2024-07-04 + +## @hey-api/openapi-ts 0.48.2 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle formData parameters in generated types ([#746](https://github.com/hey-api/openapi-ts/pull/746)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore services.asClass setting for named clients ([#742](https://github.com/hey-api/openapi-ts/pull/742)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response type detection ([#744](https://github.com/hey-api/openapi-ts/pull/744)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle properties in one-of composition ([#745](https://github.com/hey-api/openapi-ts/pull/745)) + +
+
+ +# 2024-07-01 + +## @hey-api/openapi-ts 0.48.1 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate service types when types are enabled, even if services are disabled ([#734](https://github.com/hey-api/openapi-ts/pull/734)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support custom config file path ([#737](https://github.com/hey-api/openapi-ts/pull/737)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle async response transformers ([#736](https://github.com/hey-api/openapi-ts/pull/736)) + +
+
+ +# 2024-06-24 + +## @hey-api/openapi-ts 0.48.0 + +### Core +- Thanks [@anchan828](https://github.com/anchan828)! - feat: pass the Operation object to methodNameBuilder ([#696](https://github.com/hey-api/openapi-ts/pull/696)) + + +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make getHeaders() accept generic ([#708](https://github.com/hey-api/openapi-ts/pull/708)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle void responses in transformers ([#712](https://github.com/hey-api/openapi-ts/pull/712)) + +
+
+ +# 2024-06-21 + +## @hey-api/openapi-ts 0.47.2 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial implementation of prefixItems ([#701](https://github.com/hey-api/openapi-ts/pull/701)) + +
+
+ +# 2024-06-19 + +## @hey-api/openapi-ts 0.47.1 + +### Core +- Thanks [@Nick-Lucas](https://github.com/Nick-Lucas)! - Fix an issue where transforms for endpoints with array returns were not generated correctly ([#690](https://github.com/hey-api/openapi-ts/pull/690)) + +
+
+ +# 2024-06-16 + +## @hey-api/openapi-ts 0.47.0 + +### Core +- Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial support for response transformers (string -> Date) ([#685](https://github.com/hey-api/openapi-ts/pull/685)) +- Thanks [@Stono](https://github.com/Stono)! - Add support for customizing method names with `services.methodNameBuilder()` ([#663](https://github.com/hey-api/openapi-ts/pull/663)) + +
+
+ +# 2024-05-27 + +## @hey-api/openapi-ts 0.46.3 + +### Core +- Thanks [@SimenB](https://github.com/SimenB)! - Add explicit type annotations to `Interceptors` ([#594](https://github.com/hey-api/openapi-ts/pull/594)) + + This allows the generated code to work with TypeScript 5.5's new `isolatedDeclarations` configuration. + +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle 1XX response status codes ([#635](https://github.com/hey-api/openapi-ts/pull/635)) +- Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response status code classification ([#636](https://github.com/hey-api/openapi-ts/pull/636)) + +
+
+ +# 2024-05-24 + +## @hey-api/openapi-ts 0.46.2 + +### Core +- fix: do not transform property names for standalone clients ([#616](https://github.com/hey-api/openapi-ts/pull/616)) + +
+
+ +# 2024-05-23 + +## @hey-api/openapi-ts 0.46.1 + +### Core +- fix: handle application/json content type in parameter definitions ([#614](https://github.com/hey-api/openapi-ts/pull/614)) + +
+
+ +# 2024-05-21 + +## @hey-api/openapi-ts 0.46.0 + +### Core +- feat: tree-shakeable services ([#602](https://github.com/hey-api/openapi-ts/pull/602)) + +
+
+ +# 2024-05-16 + +## @hey-api/openapi-ts 0.45.1 + +### Core +- fix: use generated types in request object instead of inlined duplicated params ([#582](https://github.com/hey-api/openapi-ts/pull/582)) + +
+
+ +# 2024-05-15 + +## @hey-api/openapi-ts 0.45.0 + +### Core +- feat: remove client inference ([#569](https://github.com/hey-api/openapi-ts/pull/569)) + + +- fix: deduplicate inlined enums ([#573](https://github.com/hey-api/openapi-ts/pull/573)) +- fix: generate correct optional key in types when using positional arguments (useOptions: false) ([#572](https://github.com/hey-api/openapi-ts/pull/572)) + +
+
+ +# 2024-05-13 + +## @hey-api/openapi-ts 0.44.0 + +### Core +- feat: move format and lint config options to output object ([#546](https://github.com/hey-api/openapi-ts/pull/546)) + + +- fix: comment position in JavaScript enums ([#544](https://github.com/hey-api/openapi-ts/pull/544)) +- fix: export inlined enums from components ([#563](https://github.com/hey-api/openapi-ts/pull/563)) +- fix: remove unused enums option from CLI ([#565](https://github.com/hey-api/openapi-ts/pull/565)) +- fix: Support typescript in peerDependencies ([#551](https://github.com/hey-api/openapi-ts/pull/551)) + +
+
+ +# 2024-05-06 + +## @hey-api/openapi-ts 0.43.2 + +### Core +- fix: deduplicate exported data and response types ([#538](https://github.com/hey-api/openapi-ts/pull/538)) + +
+
+ +# 2024-05-05 + +## @hey-api/openapi-ts 0.43.1 + +### Core +- fix: use optional chaining in bin catch block ([#528](https://github.com/hey-api/openapi-ts/pull/528)) +- fix: broken encoding ([#532](https://github.com/hey-api/openapi-ts/pull/532)) +- fix(parser): handle type array ([#533](https://github.com/hey-api/openapi-ts/pull/533)) + +
+
+ +# 2024-05-02 + +## @hey-api/openapi-ts 0.43.0 + +### Core +- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498)) + + +- fix: negative numbers in numeric enums ([#470](https://github.com/hey-api/openapi-ts/pull/470)) +- fix: escape keys in schemas starting with digit but containing non-digit characters ([#502](https://github.com/hey-api/openapi-ts/pull/502)) +- fix: issue causing code to not generate (t.filter is not a function) ([#507](https://github.com/hey-api/openapi-ts/pull/507)) +- fix: handle additional properties union ([#499](https://github.com/hey-api/openapi-ts/pull/499)) +- fix: do not export inline enums ([#508](https://github.com/hey-api/openapi-ts/pull/508)) +- fix: prefix parameter type exports to avoid conflicts ([#501](https://github.com/hey-api/openapi-ts/pull/501)) +- fix: export operation data and response types ([#500](https://github.com/hey-api/openapi-ts/pull/500)) +- fix: handle cases where packages are installed globally ([#471](https://github.com/hey-api/openapi-ts/pull/471)) +- fix: handle cases where package.json does not exist ([#471](https://github.com/hey-api/openapi-ts/pull/471)) + +
+
+ +# 2024-04-22 + +## @hey-api/openapi-ts 0.42.1 + +### Core +- fix: properly set formData and body when using options ([#461](https://github.com/hey-api/openapi-ts/pull/461)) + +
+
+ +# 2024-04-21 + +## @hey-api/openapi-ts 0.42.0 + +### Core +- change: config option `lint: true` has changed to `lint: 'eslint'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- change: disable formatting with prettier by default ([#457](https://github.com/hey-api/openapi-ts/pull/457)) +- change: config option `format: true` has changed to `format: 'prettier'` ([#455](https://github.com/hey-api/openapi-ts/pull/455)) + + +- feat: add support for biomejs as a formatter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- feat: add operation error type mappings ([#442](https://github.com/hey-api/openapi-ts/pull/442)) +- feat: add support for biomejs as a linter ([#455](https://github.com/hey-api/openapi-ts/pull/455)) +- feat: move operationId config option to services object ([#441](https://github.com/hey-api/openapi-ts/pull/441)) +- feat: automatically handle dates in query string ([#443](https://github.com/hey-api/openapi-ts/pull/443)) +- fix: add jsdoc comments with use options ([#439](https://github.com/hey-api/openapi-ts/pull/439)) +- fix: do not destructure data when using use options ([#450](https://github.com/hey-api/openapi-ts/pull/450)) +- fix: only remove core directory when export core is true ([#449](https://github.com/hey-api/openapi-ts/pull/449)) + +
+
+ +# 2024-04-19 + +## @hey-api/openapi-ts 0.41.0 + +### Core - feat: add form type option for schemas ([#433](https://github.com/hey-api/openapi-ts/pull/433)) - feat: replace useDateType with option in types object ([#435](https://github.com/hey-api/openapi-ts/pull/435)) - feat: replace serviceResponse with option in services object ([#434](https://github.com/hey-api/openapi-ts/pull/434)) - feat: replace postfixServices with configuration object ([#430](https://github.com/hey-api/openapi-ts/pull/430)) -- properly escape backticks in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) -- transform names of referenced types ([#422](https://github.com/hey-api/openapi-ts/pull/422)) -- use config interceptors passed to constructor when using named client ([#432](https://github.com/hey-api/openapi-ts/pull/432)) -- properly escape expressions in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) -- do not export common properties as schemas ([#424](https://github.com/hey-api/openapi-ts/pull/424)) ---- -## 2024-04-18 +- fix: properly escape backticks in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) +- fix: transform names of referenced types ([#422](https://github.com/hey-api/openapi-ts/pull/422)) +- fix: use config interceptors passed to constructor when using named client ([#432](https://github.com/hey-api/openapi-ts/pull/432)) +- fix: properly escape expressions in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431)) +- fix: do not export common properties as schemas ([#424](https://github.com/hey-api/openapi-ts/pull/424)) + +
+
-### @hey-api/openapi-ts 0.40.1 +# 2024-04-18 -- revert to generating commonjs for esm and commonjs support ([#409](https://github.com/hey-api/openapi-ts/pull/409)) +## @hey-api/openapi-ts 0.40.2 ---- +### Core +- fix: unhandled SyntaxKind unknown when specification has numeric enums ([#417](https://github.com/hey-api/openapi-ts/pull/417)) -### @hey-api/openapi-ts 0.40.2 +
+
-- unhandled SyntaxKind unknown when specification has numeric enums ([#417](https://github.com/hey-api/openapi-ts/pull/417)) +## @hey-api/openapi-ts 0.40.1 ---- +### Core +- fix: revert to generating commonjs for esm and commonjs support ([#409](https://github.com/hey-api/openapi-ts/pull/409)) -## 2024-04-17 +
+
-### @hey-api/openapi-ts 0.40.0 +# 2024-04-17 +## @hey-api/openapi-ts 0.40.0 + +### Core - feat: allow choosing naming convention for types ([#402](https://github.com/hey-api/openapi-ts/pull/402)) -- rename exportModels to types ([#402](https://github.com/hey-api/openapi-ts/pull/402)) -- rename models.gen.ts to types.gen.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) -- export enums from index.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) ---- -## 2024-04-16 +- fix: rename exportModels to types ([#402](https://github.com/hey-api/openapi-ts/pull/402)) +- fix: rename models.gen.ts to types.gen.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) +- fix: export enums from index.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399)) -### @hey-api/openapi-ts 0.39.0 +
+
-- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363)) +# 2024-04-16 + +## @hey-api/openapi-ts 0.39.0 + +### Core - feat: add JSON-LD to content parsing ([#390](https://github.com/hey-api/openapi-ts/pull/390)) -- generate enums into their own file ([#358](https://github.com/hey-api/openapi-ts/pull/358)) -- remove file if no contents to write to it ([#373](https://github.com/hey-api/openapi-ts/pull/373)) -- eslint properly fixes output ([#375](https://github.com/hey-api/openapi-ts/pull/375)) -- invalid typescript Record generated with circular dependencies ([#374](https://github.com/hey-api/openapi-ts/pull/374)) -- prefer unknown type over any ([#392](https://github.com/hey-api/openapi-ts/pull/392)) -- only delete generated files instead of whole output directory ([#362](https://github.com/hey-api/openapi-ts/pull/362)) -- handle decoding models with `%` in description ([#360](https://github.com/hey-api/openapi-ts/pull/360)) -- throw error when typescript is missing ([#366](https://github.com/hey-api/openapi-ts/pull/366)) +- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363)) +- fix: generate enums into their own file ([#358](https://github.com/hey-api/openapi-ts/pull/358)) + + +- fix: remove file if no contents to write to it ([#373](https://github.com/hey-api/openapi-ts/pull/373)) +- fix: eslint properly fixes output ([#375](https://github.com/hey-api/openapi-ts/pull/375)) +- fix: invalid typescript Record generated with circular dependencies ([#374](https://github.com/hey-api/openapi-ts/pull/374)) +- fix: prefer unknown type over any ([#392](https://github.com/hey-api/openapi-ts/pull/392)) +- fix: only delete generated files instead of whole output directory ([#362](https://github.com/hey-api/openapi-ts/pull/362)) +- fix: handle decoding models with `%` in description ([#360](https://github.com/hey-api/openapi-ts/pull/360)) +- fix: throw error when typescript is missing ([#366](https://github.com/hey-api/openapi-ts/pull/366)) + +
+
+ +# 2024-04-11 ---- +## @hey-api/openapi-ts 0.38.1 -## 2024-04-11 +### Core +- fix: inconsistent indentation in models file when not using `format: true` ([#349](https://github.com/hey-api/openapi-ts/pull/349)) +- fix: output path no longer required to be within cwd ([#353](https://github.com/hey-api/openapi-ts/pull/353)) -### @hey-api/openapi-ts 0.38.0 +
+
-- rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326)) -- generate constant size array types properly ([#345](https://github.com/hey-api/openapi-ts/pull/345)) -- support x-enumNames for custom enum names ([#334](https://github.com/hey-api/openapi-ts/pull/334)) -- export service types from single namespace ([#341](https://github.com/hey-api/openapi-ts/pull/341)) -- generate models with proper indentation when formatting is false ([#340](https://github.com/hey-api/openapi-ts/pull/340)) -- log errors to file ([#329](https://github.com/hey-api/openapi-ts/pull/329)) -- cleanup some styling issues when generating client without formatting ([#330](https://github.com/hey-api/openapi-ts/pull/330)) +## @hey-api/openapi-ts 0.38.0 ---- +### Core +- fix: rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326)) -### @hey-api/openapi-ts 0.38.1 -- inconsistent indentation in models file when not using `format: true` ([#349](https://github.com/hey-api/openapi-ts/pull/349)) -- output path no longer required to be within cwd ([#353](https://github.com/hey-api/openapi-ts/pull/353)) +- fix: generate constant size array types properly ([#345](https://github.com/hey-api/openapi-ts/pull/345)) +- fix: support x-enumNames for custom enum names ([#334](https://github.com/hey-api/openapi-ts/pull/334)) +- fix: export service types from single namespace ([#341](https://github.com/hey-api/openapi-ts/pull/341)) +- fix: generate models with proper indentation when formatting is false ([#340](https://github.com/hey-api/openapi-ts/pull/340)) +- fix: log errors to file ([#329](https://github.com/hey-api/openapi-ts/pull/329)) +- fix: cleanup some styling issues when generating client without formatting ([#330](https://github.com/hey-api/openapi-ts/pull/330)) ---- +
+
-## 2024-04-09 +# 2024-04-09 -### @hey-api/openapi-ts 0.36.1 +## @hey-api/openapi-ts 0.37.3 -- do not throw when failing to decode URI ([#296](https://github.com/hey-api/openapi-ts/pull/296)) +### Core +- fix: do not ignore additionalProperties when object with properties object ([#323](https://github.com/hey-api/openapi-ts/pull/323)) ---- +
+
-### @hey-api/openapi-ts 0.36.2 +## @hey-api/openapi-ts 0.37.2 -- move service types into models file ([#292](https://github.com/hey-api/openapi-ts/pull/292)) +### Core +- fix: escape schema names ([#317](https://github.com/hey-api/openapi-ts/pull/317)) +- fix: escape backticks in strings starting with backtick ([#315](https://github.com/hey-api/openapi-ts/pull/315)) ---- +
+
-### @hey-api/openapi-ts 0.37.0 +## @hey-api/openapi-ts 0.37.1 -- escape dollar sign in operation names ([#307](https://github.com/hey-api/openapi-ts/pull/307)) +### Core +- fix: ensure strings with both single/double quotes and backticks are escaped properly ([#310](https://github.com/hey-api/openapi-ts/pull/310)) + +
+
+ +## @hey-api/openapi-ts 0.37.0 + +### Core +- fix: escape dollar sign in operation names ([#307](https://github.com/hey-api/openapi-ts/pull/307)) - remove: `generics` as valid option for serviceResponse ([#299](https://github.com/hey-api/openapi-ts/pull/299)) ---- +
+
+ +## @hey-api/openapi-ts 0.36.2 + +### Core +- fix: move service types into models file ([#292](https://github.com/hey-api/openapi-ts/pull/292)) -### @hey-api/openapi-ts 0.37.1 +
+
-- ensure strings with both single/double quotes and backticks are escaped properly ([#310](https://github.com/hey-api/openapi-ts/pull/310)) +# 2024-04-08 ---- +## @hey-api/openapi-ts 0.36.1 -### @hey-api/openapi-ts 0.37.2 +### Core +- fix: do not throw when failing to decode URI ([#296](https://github.com/hey-api/openapi-ts/pull/296)) -- escape schema names ([#317](https://github.com/hey-api/openapi-ts/pull/317)) -- escape backticks in strings starting with backtick ([#315](https://github.com/hey-api/openapi-ts/pull/315)) +
+
---- +## @hey-api/openapi-ts 0.36.0 -### @hey-api/openapi-ts 0.37.3 +### Core +- feat: export schemas directly from OpenAPI specification (ie. support exporting JSON schemas draft 2020-12 ([#285](https://github.com/hey-api/openapi-ts/pull/285)) -- do not ignore additionalProperties when object with properties object ([#323](https://github.com/hey-api/openapi-ts/pull/323)) ---- +- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288)) -## 2024-04-08 +
+
-### @hey-api/openapi-ts 0.35.0 +## @hey-api/openapi-ts 0.35.0 -- fix(config): remove postfixModels option ([#266](https://github.com/hey-api/openapi-ts/pull/266)) -- fix(client): do not send default params ([#267](https://github.com/hey-api/openapi-ts/pull/267)) +### Core - fix(api): use TypeScript Compiler API to create schemas ([#271](https://github.com/hey-api/openapi-ts/pull/271)) +- fix(client): do not send default params ([#267](https://github.com/hey-api/openapi-ts/pull/267)) + + - fix(client): export APIResult when using serviceResponse as 'response' ([#283](https://github.com/hey-api/openapi-ts/pull/283)) +- fix(config): remove postfixModels option ([#266](https://github.com/hey-api/openapi-ts/pull/266)) - fix(parser): use only isRequired to determine if field is required ([#264](https://github.com/hey-api/openapi-ts/pull/264)) ---- +
+
-### @hey-api/openapi-ts 0.36.0 +# 2024-04-04 -- feat: export schemas directly from OpenAPI specification (ie. support exporting JSON schemas draft 2020-12 ([#285](https://github.com/hey-api/openapi-ts/pull/285)) -- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288)) +## @hey-api/openapi-ts 0.34.5 ---- +### Core +- fix(client): access service data type in namespace properly ([#258](https://github.com/hey-api/openapi-ts/pull/258)) -## 2024-04-04 +
+
-### @hey-api/openapi-ts 0.34.2 +## @hey-api/openapi-ts 0.34.4 -- fix(config): support ts config files and `defineConfig` syntax -- docs(readme): update broken contributing link ([#236](https://github.com/hey-api/openapi-ts/pull/236)) +### Core +- fix(client): namespace service data types ([#246](https://github.com/hey-api/openapi-ts/pull/246)) ---- +
+
-### @hey-api/openapi-ts 0.34.3 +## @hey-api/openapi-ts 0.34.3 +### Core - fix(docs): link to docs hosted on vercel ([#244](https://github.com/hey-api/openapi-ts/pull/244)) ---- +
+
-### @hey-api/openapi-ts 0.34.4 +## @hey-api/openapi-ts 0.34.2 -- fix(client): namespace service data types ([#246](https://github.com/hey-api/openapi-ts/pull/246)) +### Core +- docs(readme): update broken contributing link ([#236](https://github.com/hey-api/openapi-ts/pull/236)) +- fix(config): support ts config files and `defineConfig` syntax ---- +
+
-### @hey-api/openapi-ts 0.34.5 +# 2024-04-03 -- fix(client): access service data type in namespace properly ([#258](https://github.com/hey-api/openapi-ts/pull/258)) +## @hey-api/openapi-ts 0.34.1 ---- +### Core +- fix(docs): ensure README is shown on NPMJS ([#229](https://github.com/hey-api/openapi-ts/pull/229)) -## 2024-04-03 +
+
-### @hey-api/openapi-ts 0.34.0 +## @hey-api/openapi-ts 0.34.0 +### Core - feat(client): generate all services in single `services.ts` file ([#215](https://github.com/hey-api/openapi-ts/pull/215)) - feat(schema): add support for default values ([#197](https://github.com/hey-api/openapi-ts/pull/197)) - feat(schema): add array of enum values for enums ([#197](https://github.com/hey-api/openapi-ts/pull/197)) + + - fix(axios): use builtin form data to ensure blob form data works in node environment ([#211](https://github.com/hey-api/openapi-ts/pull/211)) - fix(enum): append index number on duplicate name ([#220](https://github.com/hey-api/openapi-ts/pull/220)) ---- +
+
-### @hey-api/openapi-ts 0.34.1 +# 2024-04-02 -- fix(docs): ensure README is shown on NPMJS ([#229](https://github.com/hey-api/openapi-ts/pull/229)) +## @hey-api/openapi-ts 0.33.2 + +### Core +- fix(axios): properly type content-type headers assignment ([#206](https://github.com/hey-api/openapi-ts/pull/206)) + +
+
+ +# 2024-04-01 + +## @hey-api/openapi-ts 0.33.1 + +### Core +- fix(axios): set content type to multipart/form-data when using form data ([#204](https://github.com/hey-api/openapi-ts/pull/204)) + +
+
+ +## @hey-api/openapi-ts 0.33.0 + +### Core +- client(angular/fetch/xhr): detect all application/json or +json as JSON ([#195](https://github.com/hey-api/openapi-ts/pull/195)) +- feat(fetch): add application/octet-stream, application/pdf, and application/zip as binary response types ([#195](https://github.com/hey-api/openapi-ts/pull/195)) + + +- feat(fetch): detect form data repsonses properly ([#195](https://github.com/hey-api/openapi-ts/pull/195)) +- fix(client): do not create or export empty files ([#200](https://github.com/hey-api/openapi-ts/pull/200)) + +
+
+ +# 2024-03-30 + +## @hey-api/openapi-ts 0.32.1 + +### Core +- fix(axios): let axios handle serializing form data ([#192](https://github.com/hey-api/openapi-ts/pull/192)) +- fix(schema): allow minimums/maximums to be 0 ([#194](https://github.com/hey-api/openapi-ts/pull/194)) + +
+
+ +## @hey-api/openapi-ts 0.32.0 + +### Core +- Support all HTTP error codes ([#188](https://github.com/hey-api/openapi-ts/pull/188)) +- Use File or Blob type for binary types ([#186](https://github.com/hey-api/openapi-ts/pull/186)) +- Check value instanceof Blob when using isBlob ([#186](https://github.com/hey-api/openapi-ts/pull/186)) + + +- Attempt to use body type as content type when sending Blob in node client ([#185](https://github.com/hey-api/openapi-ts/pull/185)) +- fix(api): add experimental flag ([#191](https://github.com/hey-api/openapi-ts/pull/191)) +- fix(cli): properly handle booleans ([#190](https://github.com/hey-api/openapi-ts/pull/190)) + +
+
+ +# 2024-03-29 + +## @hey-api/openapi-ts 0.31.1 + +### Core +- merge enums and useLegacyEnums into one option ([#178](https://github.com/hey-api/openapi-ts/pull/178)) +- use FormData from node-fetch in node client ([#173](https://github.com/hey-api/openapi-ts/pull/173)) + +
+
+ +## @hey-api/openapi-ts 0.31.0 + +### Core +- fix async response interceptors when using angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167)) +- fix deprecation warning on `throwError` in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167)) +- Fix issue causing type error when targeting lower than ES2015 ([#171](https://github.com/hey-api/openapi-ts/pull/171)) +- fix various warnings in generated client code ([#164](https://github.com/hey-api/openapi-ts/pull/164)) +- fix providing interceptors in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167)) +- Import all required models for a service in one import ([#172](https://github.com/hey-api/openapi-ts/pull/172)) +- generate all models in single `models.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168)) +- generate all schemas in single `schemas.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168)) + + +- Do not create or export CancelablePromise when using Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167)) + +
+
+ +# 2024-03-27 + +## @hey-api/openapi-ts 0.30.0 + +### Core +- add support for interceptors ([#153](https://github.com/hey-api/openapi-ts/pull/153)) + +
+
+ +## @hey-api/openapi-ts 0.29.2 + +### Core +- Fix export types as type only when using useLegacyEnums ([#160](https://github.com/hey-api/openapi-ts/pull/160)) + +
+
+ +## @hey-api/openapi-ts 0.29.1 + +### Core +- Properly export enums when using useLegacyEnums ([#158](https://github.com/hey-api/openapi-ts/pull/158)) + +
+
+ +# 2024-03-26 + +## @hey-api/openapi-ts 0.29.0 + +### Core +- Add useLegacyEnums options to generate TypeScript enums ([#147](https://github.com/hey-api/openapi-ts/pull/147)) + +
+
+ +# 2024-03-25 + +## @hey-api/openapi-ts 0.28.0 + +### Core +- Add `index.ts` file to models, schemas, and services ([#137](https://github.com/hey-api/openapi-ts/pull/137)) + +
+
+ +# 2024-03-24 + +## @hey-api/openapi-ts 0.27.39 + +### Core +- Warn users about missing dependencies used in the generated client ([#124](https://github.com/hey-api/openapi-ts/pull/124)) +- Use AbortController in Axios client instead of deprecated CancelToken ([#124](https://github.com/hey-api/openapi-ts/pull/124)) ---- \ No newline at end of file +
+
\ No newline at end of file diff --git a/scripts/changelog/assemble/grouper.ts b/scripts/changelog/assemble/grouper.ts index c49e520f4e..87d2642be8 100644 --- a/scripts/changelog/assemble/grouper.ts +++ b/scripts/changelog/assemble/grouper.ts @@ -1,177 +1,237 @@ import { execSync } from 'node:child_process'; -import { packageOrder } from '../config.js'; -import type { PackageChangelog } from './reader.js'; +import { getChangelogPackages } from '../config'; +import type { Changelogs } from './reader'; export interface ReleaseGroup { date: string; - packages: Array<{ - content: string; - entries: Array; - hasUserFacingChanges: boolean; - name: string; - version: string; - }>; + packages: Array; tag: string; } +export interface ReleasePackage { + content: string; + entries: Array; + hasUserFacingChanges: boolean; + packageName: string; + version: string; +} + export interface ParsedEntry { category: 'Breaking' | 'Added' | 'Fixed' | 'Changed'; description: string; - prNumber: number | null; - scope: string | null; - section: 'Core' | 'Plugins' | 'Other'; + prNumber: number | undefined; + scope: string | undefined; + section: string | undefined; } interface TagInfo { + /** The date of the tag in YYYY-MM-DD format. */ date: string; - package: string; + /** The name of the package associated with the tag. */ + packageName: string; + /** Parsed timestamp used for deterministic sorting. */ + timestamp: number; + /** The version of the package associated with the tag. */ version: string; } +const LEGACY_TAG_MAIN_PACKAGE = '@hey-api/openapi-ts'; + +function getPackageBaseName(packageName: string): string { + if (packageName.startsWith('@') && packageName.includes('/')) { + return packageName.split('/')[1]!; + } + return packageName; +} + +export function isFlagshipPackage(packageName: string): boolean { + const baseName = getPackageBaseName(packageName); + return baseName.startsWith('openapi-'); +} + +function getPackageGroupRank(packageName: string): number { + return isFlagshipPackage(packageName) ? 0 : 1; +} + +function getTagDate(tag: string): Pick { + const fullDate = execSync(`git log -1 --format=%ci ${tag}`, { encoding: 'utf-8' }).trim(); + + const timestamp = getTimestamp(fullDate); + if (timestamp > 0) { + const normalized = new Date(timestamp).toISOString(); + const date = normalized.slice(0, 10); + return { + date, + timestamp, + }; + } + + const match = fullDate.match(/^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})/); + const date = match?.[1] ?? fullDate; + return { + date, + timestamp: 0, + }; +} + +function getTimestamp(fullDate: string): number { + const match = fullDate.match(/^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})\s+([+-]\d{2})(\d{2})$/); + if (!match) { + return Date.parse(fullDate) || 0; + } + + const [, date, time, offsetHour, offsetMinute] = match; + const iso = `${date}T${time}${offsetHour}:${offsetMinute}`; + return Date.parse(iso) || 0; +} + +function getLegacyTagPackageName(): string | undefined { + const packages = getChangelogPackages(); + return packages.find((pkg) => pkg.name === LEGACY_TAG_MAIN_PACKAGE)?.name; +} + function getGitTags(): Array { try { const output = execSync('git tag --list', { encoding: 'utf-8' }); const tags = output.split('\n').filter(Boolean); + const legacyTagPackage = getLegacyTagPackageName(); - const result: Array = []; + const results: Array = []; for (const tag of tags) { - // Match pattern: @hey-api/package@version (e.g., @hey-api/openapi-ts@0.95.0) - const match = tag.match(/^@hey-api\/([^@]+)@(\d+\.\d+\.\d+)$/); - if (match) { - // Get tag date - const dateOutput = execSync(`git log -1 --format=%ci ${tag}`, { encoding: 'utf-8' }); - const date = dateOutput.trim().split(' ')[0]; // Get YYYY-MM-DD - - result.push({ - date, - package: `@hey-api/${match[1]}`, - version: match[2], + // Match pattern: @ (e.g., @hey-api/types@0.1.4) + const packageTagMatch = tag.match(/^(.+)@(\d+\.\d+\.\d+)$/); + if (packageTagMatch) { + results.push({ + ...getTagDate(tag), + packageName: packageTagMatch[1], + version: packageTagMatch[2], }); + + continue; + } + + if (legacyTagPackage) { + // Match legacy pattern: v (e.g., v0.29.0) + const legacyTagMatch = tag.match(/^v(\d+\.\d+\.\d+)$/); + if (legacyTagMatch) { + results.push({ + ...getTagDate(tag), + packageName: legacyTagPackage, + version: legacyTagMatch[1], + }); + } } } - return result; + return results; } catch { return []; } } -function parseEntryFromLine(line: string): ParsedEntry | null { - // Match changelog entry format: - // Old: - **scope**: description [#PR](url) [`commit`](url) by [@author](url) - // New: - **scope**: description (#PR) - - // Extract scope from **scope**: pattern - const scopeMatch = line.match(/^\s*-\s+\*\*([^:]+)\*\*:?\s*/); - const scope = scopeMatch ? scopeMatch[1] : null; - - // Get the content after the scope (or after dash for no-scope) - const contentMatch = scope - ? line.match(/^\s*-\s+\*\*[^:]+\*\*:?\s+(.+)$/) - : line.match(/^\s*-\s+(.+)$/); - - if (!contentMatch) return null; +function parseEntryFromLine(line: string): ParsedEntry | undefined { + let scope: string | undefined; + let content: string | undefined; - let content = contentMatch[1]; - - // Step 1: Extract PR number - look for patterns like [#1234](url) or (#1234) - let prNumber: number | null = null; - const prMatch1 = content.match(/\[#(\d+)\]\([^)]+\)/); - if (prMatch1) { - prNumber = parseInt(prMatch1[1], 10); + // - **scope**: content + const boldScopeMatch = line.match(/^\s*-\s+\*\*([^:]+)\*\*:\s+(.+)$/); + if (boldScopeMatch) { + scope = boldScopeMatch[1]; + content = boldScopeMatch[2]; } else { - const prMatch2 = content.match(/\(#(\d+)\)/); - if (prMatch2) { - prNumber = parseInt(prMatch2[1], 10); + // - scope: content + const plainScopeMatch = line.match(/^\s*-\s+([^:]+):\s+(.+)$/); + if (plainScopeMatch) { + scope = plainScopeMatch[1]; + content = plainScopeMatch[2]; + } else { + // - content + const noScopeMatch = line.match(/^\s*-\s+(.+)$/); + if (noScopeMatch) { + content = noScopeMatch[1]; + } } } - // Step 2: Clean up in specific order - // A. Remove author patterns: " by [@user]" OR "[by @user](url)" OR " by [@user](url)" - content = content.replace(/\s+by\s+\[@[^\]]+\](?:\([^)]+\))?/gi, ''); - content = content.replace(/\[by\s+@[^\]]+\]\([^)]+\)/gi, ''); + if (!content) return; - // B. Remove PR link patterns: [#PR](url) OR (#PR) - content = content.replace(/\[#\d+\]\([^)]+\)/g, ''); - content = content.replace(/\(\s*#\d+\s*\)/g, ''); + // [#1234](url) or (#1234) + const prMatch = content.match(/\[#(\d+)\]\([^)]+\)|\(#(\d+)\)/); + const prValue = prMatch?.[1] ?? prMatch?.[2]; + const prNumber = prValue ? Number.parseInt(prValue, 10) : undefined; - // C. Remove commit patterns: [`commit`](url) OR `commit` - content = content.replace(/\[`[a-f0-9]+`\]\([^)]+\)/gi, ''); - content = content.replace(/`[a-f0-9]+`/gi, ''); + // remove trailing author pattern: " by [@user]" or " by [@user](url)" + content = content.replace(/\s+by\s+\[@[^\]]+\](?:\([^)]+\))?/gi, ''); - // D. Remove any remaining markdown links keeping text - content = content.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1'); + // remove PR link patterns, optionally wrapped in extra parentheses + content = content.replace(/\(?\s*(?:\[#\d+\]\([^)]+\)|\(\s*#\d+\s*\))\s*\)?/g, ''); - // E. Clean up: remove empty parentheses, whitespace, and leading punctuation - content = content.replace(/\(\s*\)/g, ''); // Remove empty () - content = content.replace(/\s+/g, ' ').trim(); - content = content.replace(/^[-:]\s*/, '').trim(); + // remove commit patterns, optionally wrapped in extra parentheses + content = content.replace(/\(?\s*(?:\[`[a-f0-9]+`\]\([^)]+\)|`[a-f0-9]+`)\s*\)?/gi, ''); - const description = content; + // remove only a leading '- ' prefix + content = content.replace(/^- /, '').trim(); - // Filter out dependency-only entries (e.g., "- @hey-api/shared@0.3.0") - if (!scope && /^@hey-api\/[^@]+@\d+\.\d+\.\d+$/.test(description)) { - return null; - } + if (!content) return; - if (!description) return null; - - // Detect section from scope - let section: 'Core' | 'Plugins' | 'Other' = 'Other'; + let section: string | undefined; if (scope && /^plugin\(/.test(scope)) { section = 'Plugins'; - } else if ( - scope && - [ - 'cli', - 'config', - 'error', - 'input', - 'internal', - 'output', - 'parser', - 'planner', - 'project', - 'symbols', - 'build', - ].includes(scope) - ) { - section = 'Core'; } - // Detect category from description keywords or scope + // Detect category from content keywords or scope let category: 'Breaking' | 'Added' | 'Fixed' | 'Changed' = 'Changed'; - if (/BREAKING/i.test(description) || (scope && /BREAKING/i.test(scope))) { + if (/BREAKING/i.test(content) || (scope && /BREAKING/i.test(scope))) { category = 'Breaking'; - } else if (/^feat[\s:]/i.test(description) || /^(feat|add)\b/i.test(description)) { + } else if (/^feat[\s:]/i.test(content) || /^(feat|add)\b/i.test(content)) { category = 'Added'; - } else if (/^fix[\s:]/i.test(description) || /^fix\b/i.test(description)) { + } else if (/^fix[\s:]/i.test(content) || /^fix\b/i.test(content)) { category = 'Fixed'; } - return { category, description, prNumber, scope, section }; + return { category, description: content, prNumber, scope, section }; } function extractEntries(content: string): Array { const entries: Array = []; - const lines = content.split('\n'); + // Strip changelog structural headings before parsing so they don't attach to entry bodies + const cleanedContent = content.replace(/^### (?:Minor|Major|Patch) Changes\s*$/gm, ''); + const lines = cleanedContent.split('\n'); + + let currentBlock: Array = []; + + const flushCurrentBlock = () => { + if (!currentBlock.length) return; + + const parsed = parseEntryFromLine(currentBlock[0]!); + if (parsed) { + entries.push({ + ...parsed, + description: [parsed.description, currentBlock.slice(1).join('\n')] + .filter(Boolean) + .join('\n'), + }); + } + + currentBlock = []; + }; for (const line of lines) { - const entry = parseEntryFromLine(line.trim()); - if (entry) { - entries.push(entry); + if (/^-\s+/.test(line)) { + flushCurrentBlock(); } + currentBlock.push(line); } + flushCurrentBlock(); + return entries; } -export function groupByRelease(changelogs: Map): Array { - // Get all git tags with dates +export function groupByRelease(changelogs: Changelogs): Array { const tags = getGitTags(); - // Group tags by date const dateGroups = new Map>(); for (const tag of tags) { if (!dateGroups.has(tag.date)) { @@ -180,51 +240,54 @@ export function groupByRelease(changelogs: Map): Array dateGroups.get(tag.date)!.push(tag); } - // Sort dates descending (newest first) - const sortedDates = Array.from(dateGroups.keys()).sort().reverse(); + const sortedDates = Array.from(dateGroups.keys()).sort((a, b) => { + const aLatest = Math.max(...dateGroups.get(a)!.map((tag) => tag.timestamp)); + const bLatest = Math.max(...dateGroups.get(b)!.map((tag) => tag.timestamp)); + if (aLatest === bLatest) return b.localeCompare(a); + return bLatest - aLatest; + }); + const knownPackages = new Set(getChangelogPackages().map((pkg) => pkg.name)); const releaseGroups: Array = []; for (const date of sortedDates) { - const tagsInGroup = dateGroups.get(date)!; - - // Sort packages by packageOrder - const sortedPackages = tagsInGroup + const sortedPackages = dateGroups + .get(date)! + .filter((tag) => knownPackages.has(tag.packageName)) .sort((a, b) => { - const aIdx = packageOrder.indexOf(a.package as (typeof packageOrder)[number]); - const bIdx = packageOrder.indexOf(b.package as (typeof packageOrder)[number]); - return aIdx - bIdx; - }) - .filter((t) => packageOrder.includes(t.package as (typeof packageOrder)[number])); + const aGroup = getPackageGroupRank(a.packageName); + const bGroup = getPackageGroupRank(b.packageName); + if (aGroup !== bGroup) return aGroup - bGroup; + + const nameCompare = a.packageName.localeCompare(b.packageName); + if (nameCompare !== 0) return nameCompare; - // Build package list from tags - const packages: ReleaseGroup['packages'] = []; + return b.timestamp - a.timestamp; + }); + + const packages: Array = []; for (const tagInfo of sortedPackages) { - const changelog = changelogs.get(tagInfo.package); + const changelog = changelogs.get(tagInfo.packageName); if (!changelog) continue; - const versionData = changelog.versions.find((v) => v.version === tagInfo.version); - if (!versionData) continue; - - const entries = extractEntries(versionData.content); + const release = changelog.releases.find((r) => r.version === tagInfo.version); + if (!release) continue; packages.push({ - content: versionData.content, - entries, - hasUserFacingChanges: versionData.hasUserFacingChanges, - name: tagInfo.package, + content: release.content, + entries: extractEntries(release.content), + hasUserFacingChanges: release.hasUserFacingChanges, + packageName: tagInfo.packageName, version: tagInfo.version, }); } - if (packages.length > 0) { - // Generate tag from date + sequence (placeholder for release workflow) + if (packages.length) { releaseGroups.push({ date, packages, - // Placeholder - will be overridden by release tag - tag: `${date}.${packages.length}`, + tag: `${date}.${packages.length}`, // placeholder, will be overridden by release tag }); } } diff --git a/scripts/changelog/assemble/index.ts b/scripts/changelog/assemble/index.ts index 4e67d615c8..594c0d97da 100644 --- a/scripts/changelog/assemble/index.ts +++ b/scripts/changelog/assemble/index.ts @@ -1,7 +1,8 @@ import { writeFileSync } from 'node:fs'; -import { groupByRelease, type ParsedEntry, type ReleaseGroup } from './grouper.js'; -import { readAllPackageChangelogs } from './reader.js'; +import type { ParsedEntry, ReleaseGroup, ReleasePackage } from './grouper'; +import { groupByRelease, isFlagshipPackage } from './grouper'; +import { readAllPackageChangelogs } from './reader'; const sectionOrder: Array<'Breaking' | 'Core' | 'Plugins' | 'Other'> = [ 'Breaking', @@ -10,9 +11,7 @@ const sectionOrder: Array<'Breaking' | 'Core' | 'Plugins' | 'Other'> = [ 'Other', ]; -const IS_OPENAPI_TS = '@hey-api/openapi-ts'; - -function transformScope(scope: string | null): string { +function transformScope(scope: string | undefined): string { if (!scope) return ''; if (scope.startsWith('plugin(') && scope.endsWith(')')) { return scope.slice(7, -1); @@ -24,43 +23,37 @@ function transformDescription(description: string): string { return description.replace(/^fix:\s*/i, ''); } -function formatEntry(entry: ParsedEntry): string { - const parts: Array = []; - - const displayScope = entry.scope ? transformScope(entry.scope) : null; - const displayDescription = transformDescription(entry.description); +function formatEntry(entry: ParsedEntry, options?: { hideScope?: boolean }): string { + const displayScope = entry.scope ? transformScope(entry.scope) : undefined; + const [firstLine = '', ...bodyLines] = entry.description.split('\n'); + const displayDescription = transformDescription(firstLine); + const hideScope = options?.hideScope === true; - if (displayScope) { - parts.push(`**${displayScope}**: ${displayDescription}`); - } else { - parts.push(displayDescription); + let header = + displayScope && !hideScope ? `${displayScope}: ${displayDescription}` : displayDescription; + if (entry.prNumber) { + header += ` ([#${entry.prNumber}](https://github.com/hey-api/openapi-ts/pull/${entry.prNumber}))`; } - if (entry.prNumber) { - parts.push( - `([#${entry.prNumber}](https://github.com/hey-api/openapi-ts/pull/${entry.prNumber}))`, - ); + if (!bodyLines.length) { + return `- ${header}`; } - return `- ${parts.join(' ')}`; + return `- ${header}\n${bodyLines.join('\n')}`; } -function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { +function formatPackageBlock(pkg: ReleasePackage): string { const lines: Array = []; - const useSections = pkg.name === IS_OPENAPI_TS; - lines.push(`### @hey-api/${pkg.name.replace('@hey-api/', '')} ${pkg.version}`); - lines.push(''); + lines.push(`## ${pkg.packageName} ${pkg.version}\n`); if (!pkg.hasUserFacingChanges) { - lines.push('No user-facing changes.'); - lines.push(''); + lines.push('No user-facing changes.\n'); return lines.join('\n'); } - if (pkg.entries.length === 0) { - lines.push('(No parsed entries)'); - lines.push(''); + if (!pkg.entries.length) { + lines.push('(No parsed entries)\n'); return lines.join('\n'); } @@ -75,19 +68,20 @@ function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { const categoryOrder: Array = ['Breaking', 'Added', 'Fixed', 'Changed']; - if (useSections) { - const sectionEntries: Map> = new Map(); + if (isFlagshipPackage(pkg.packageName)) { + const sectionEntries: Map> = new Map(); for (const entry of pkg.entries) { - if (!sectionEntries.has(entry.section)) { - sectionEntries.set(entry.section, []); + const section = entry.section || 'Core'; + if (!sectionEntries.has(section)) { + sectionEntries.set(section, []); } - sectionEntries.get(entry.section)!.push({ category: entry.category, entry }); + sectionEntries.get(section)!.push(entry); } const breakingEntries = entriesByCategory.get('Breaking') ?? []; - if (breakingEntries.length > 0) { + if (breakingEntries.length) { lines.push('### ⚠️ Breaking'); for (const entry of breakingEntries) { lines.push(formatEntry(entry)); @@ -100,21 +94,20 @@ function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { if (!entriesWithCategory?.length) continue; if (section === 'Plugins') { - const pluginEntries: Map< - string, - Array<{ category: string, entry: ParsedEntry; }> - > = new Map(); + const pluginEntries: Map> = new Map(); - for (const { category, entry } of entriesWithCategory) { + for (const entry of entriesWithCategory) { const pluginName = transformScope(entry.scope); if (!pluginEntries.has(pluginName)) { pluginEntries.set(pluginName, []); } - pluginEntries.get(pluginName)!.push({ category, entry }); + pluginEntries.get(pluginName)!.push(entry); } const sortedPlugins = Array.from(pluginEntries.keys()).sort(); + lines.push(`### ${section}\n`); + for (const pluginName of sortedPlugins) { lines.push(`#### ${pluginName}`); @@ -128,20 +121,20 @@ function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { }); let lastCategory = ''; - for (const { category, entry } of pluginCategoryEntries) { - if (category !== lastCategory) { - lines.push(`###### ${category}`); - lastCategory = category; + for (const entry of pluginCategoryEntries) { + if (entry.category !== lastCategory) { + // lines.push(`###### ${entry.category}`); + lastCategory = entry.category; } - lines.push(formatEntry(entry)); + lines.push(formatEntry(entry, { hideScope: true })); } lines.push(''); } } else { entriesWithCategory.sort((a, b) => { - const scopeA = a.entry.scope ? transformScope(a.entry.scope) : ''; - const scopeB = b.entry.scope ? transformScope(b.entry.scope) : ''; + const scopeA = a.scope ? transformScope(a.scope) : ''; + const scopeB = b.scope ? transformScope(b.scope) : ''; const cmp = scopeA.localeCompare(scopeB); if (cmp !== 0) return cmp; const catOrder = { Added: 1, Breaking: 0, Changed: 3, Fixed: 2 }; @@ -152,12 +145,12 @@ function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { }); if (section === 'Breaking') { - lines.push('#### ⚠️ Breaking'); + lines.push('### ⚠️ Breaking'); } else if (section !== 'Other') { - lines.push(`#### ${section}`); + lines.push(`### ${section}`); } - for (const { entry } of entriesWithCategory) { + for (const entry of entriesWithCategory) { lines.push(formatEntry(entry)); } @@ -192,34 +185,31 @@ function formatPackageBlock(pkg: ReleaseGroup['packages'][number]): string { return lines.join('\n').trim(); } -export function formatRootChangelog(releaseGroups: ReturnType): string { - const lines: Array = []; - - lines.push('# Changelog'); - lines.push(''); +function formatRootChangelog(releaseGroups: Array): string { + const lines: Array = ['# Changelog\n']; for (const group of releaseGroups) { - lines.push(`## ${group.date}`); - lines.push(''); + lines.push(`# ${group.date}\n`); for (const pkg of group.packages) { - lines.push(formatPackageBlock(pkg)); - lines.push(''); - lines.push('---'); - lines.push(''); + lines.push(`${formatPackageBlock(pkg)}\n`, '
\n
\n'); } } return lines.join('\n').trim(); } -export async function assembleRootChangelog(): Promise { +async function assembleRootChangelog(): Promise { const changelogs = readAllPackageChangelogs(); const groups = groupByRelease(changelogs); + writeFileSync('DEBUG_CHANGELOG.json', `${JSON.stringify(groups, null, 2)}\n`, 'utf-8'); return formatRootChangelog(groups); } -export async function writeRootChangelog(): Promise { +async function writeRootChangelog(): Promise { const content = await assembleRootChangelog(); writeFileSync('CHANGELOG.md', content, 'utf-8'); + console.log('Root CHANGELOG.md has been updated.'); } + +writeRootChangelog(); diff --git a/scripts/changelog/assemble/reader.ts b/scripts/changelog/assemble/reader.ts index 2e20c70245..d7a542d401 100644 --- a/scripts/changelog/assemble/reader.ts +++ b/scripts/changelog/assemble/reader.ts @@ -1,98 +1,94 @@ -import { existsSync, readFileSync } from 'node:fs'; -import { join } from 'node:path'; +import fs from 'node:fs'; -import { packageOrder } from '../config.js'; +import type { ChangelogPackage } from '../config'; +import { getChangelogPackages } from '../config'; + +export type Changelogs = Map; export interface PackageChangelog { package: string; - versions: Array<{ - content: string; - hasUserFacingChanges: boolean; - version: string; - }>; + releases: Array; } -function extractVersionBlock(content: string): { +export interface ReleaseBlock { content: string; hasUserFacingChanges: boolean; version: string; -} | null { - // Match version header like "## 0.95.0" or "## @hey-api/openapi-ts 0.95.0" - const versionMatch = content.match(/^##\s+(?:@hey-api\/[^ ]+\s+)?(\d+\.\d+\.\d+)/m); - if (!versionMatch) return null; - - const version = versionMatch[1]; - const versionStart = content.indexOf(`##`); - - // Find next version header or end of file - const afterVersion = content.slice(versionStart + 2); - const nextVersionMatch = afterVersion.match(/^##\s+/m); - const nextVersionStart = nextVersionMatch - ? versionStart + 2 + (nextVersionMatch.index ?? 0) + versionHeading: string; +} + +const versionHeadingPattern = new RegExp( + `^##\\s+(?:@hey-api\\/[^ ]+\\s+)?(\\d+\\.\\d+\\.\\d+)`, + 'm', +); + +function extractReleaseBlock(content: string): ReleaseBlock | undefined { + const versionMatch = content.match(versionHeadingPattern); + if (!versionMatch) return; + + const versionStartIndex = versionMatch.index ?? 0; + const versionHeading = versionMatch[0]; + const versionEndIndex = versionStartIndex + versionHeading.length; + + // find next version header (or end of file) + const nextVersionMatch = content.slice(versionEndIndex).match(versionHeadingPattern); + const nextVersionStartIndex = nextVersionMatch + ? versionEndIndex + (nextVersionMatch.index ?? 0) : content.length; - const blockContent = content.slice(versionStart, nextVersionStart).trim(); + const versionBlockContent = content.slice(versionStartIndex, nextVersionStartIndex).trim(); + const contentWithoutUpdatedDependencies = versionBlockContent + .replace(/\n###\s+Updated Dependencies:?\s*(?:\n[\s\S]*?)?(?=\n#{2,6}\s|$)/gi, '') + .trim(); - // Check for "Updated dependencies" only (no user-facing changes) - const hasUserFacingChanges = !( - blockContent.includes('### Updated Dependencies') && - !blockContent.match(/^##\s+[^#]*\n### (?!Updated Dependencies)/m) + // Check for "Updated dependencies" only (no user-facing changes, changelogs quirk) + const hasUpdatedDependencies = /^###\s+Updated Dependencies:?\s*$/im.test(versionBlockContent); + const hasOtherSectionHeadings = /^###\s+(?!Updated Dependencies:?\s*$).+/im.test( + versionBlockContent, ); - - return { content: blockContent, hasUserFacingChanges, version }; + const hasUserFacingChanges = !(hasUpdatedDependencies && !hasOtherSectionHeadings); + + return { + content: contentWithoutUpdatedDependencies, + hasUserFacingChanges, + version: versionMatch[1], + versionHeading, + }; } -export function readPackageChangelog(packagePath: string): PackageChangelog | null { - const changelogPath = join(packagePath, 'CHANGELOG.md'); +function readPackageChangelog(pkg: ChangelogPackage): PackageChangelog | undefined { + if (!pkg.changelogPath) return; - if (!existsSync(changelogPath)) { - return null; - } + const content = fs.readFileSync(pkg.changelogPath, 'utf-8'); + const releases: PackageChangelog['releases'] = []; - const content = readFileSync(changelogPath, 'utf-8'); + let remaining = content.replace(/^#\s+.*\n\n?/, ''); // strip title + while (remaining.trim()) { + const release = extractReleaseBlock(remaining); + if (!release) break; - // Skip the package title "# @hey-api/package-name" - const body = content.replace(/^#\s+@hey-api\/[^ ]+\n\n?/, ''); + releases.push(release); - const versions: PackageChangelog['versions'] = []; - let remaining = body; + // move past this release + const releaseStart = remaining.indexOf(release.versionHeading); + const afterVersionHeading = remaining.slice(releaseStart + release.versionHeading.length); + const nextVersionMatch = afterVersionHeading.match(versionHeadingPattern); + if (!nextVersionMatch) break; - while (remaining.trim()) { - const block = extractVersionBlock(remaining); - if (!block) break; - - versions.push(block); - - // Move past this block - const blockStart = remaining.indexOf(`## ${block.version}`); - const afterBlock = remaining.slice(blockStart + 2); - const nextVersionMatch = afterBlock.match(/^##\s+/m); - const nextStart = nextVersionMatch - ? blockStart + 2 + (nextVersionMatch.index ?? 0) - : remaining.length; - remaining = remaining.slice(nextStart); + const nextStart = releaseStart + release.versionHeading.length + (nextVersionMatch.index ?? 0); + remaining = remaining.slice(nextStart).trimStart(); } - return { package: '', versions }; + return { package: pkg.name, releases }; } -export function readAllPackageChangelogs(): Map { - const results = new Map(); +export function readAllPackageChangelogs(): Changelogs { + const changelogs: Changelogs = new Map(); - for (const packageName of packageOrder) { - // Convert package name to path (e.g., @hey-api/openapi-ts -> packages/openapi-ts) - const packagePath = packageName.replace('@hey-api/', 'packages/'); - const changelog = readPackageChangelog(packagePath); - - if (changelog) { - changelog.package = packageName; - results.set(packageName, changelog); - } + for (const pkg of getChangelogPackages()) { + const changelog = readPackageChangelog(pkg); + if (changelog) changelogs.set(pkg.name, changelog); } - return results; -} - -export function getChangelogPath(packageName: string): string { - return packageName.replace('@hey-api/', 'packages/') + '/CHANGELOG.md'; + return changelogs; } diff --git a/scripts/changelog/breaking.ts b/scripts/changelog/breaking.ts index 5e777ae8e3..c141913587 100644 --- a/scripts/changelog/breaking.ts +++ b/scripts/changelog/breaking.ts @@ -1,4 +1,5 @@ -import { type SemverType, v0MinorBreakingSignals } from './config.js'; +import type { SemverType } from './config'; +import { v0MinorBreakingSignals } from './config'; export interface ParsedChangeset { description: string; diff --git a/scripts/changelog/config.ts b/scripts/changelog/config.ts index 66b6ecdc66..4bad7d12c0 100644 --- a/scripts/changelog/config.ts +++ b/scripts/changelog/config.ts @@ -1,19 +1,51 @@ +import fs from 'node:fs'; +import path from 'node:path'; + export type SemverType = 'major' | 'minor' | 'patch'; -export const packageOrder = [ - '@hey-api/openapi-ts', - '@hey-api/vite-plugin', - '@hey-api/nuxt', - '@hey-api/openapi-python', - '@hey-api/custom-client', - '@hey-api/json-schema-ref-parser', - '@hey-api/codegen-core', - '@hey-api/shared', - '@hey-api/types', - '@hey-api/spec-types', -] as const; - -export type PackageName = (typeof packageOrder)[number]; +export interface ChangelogPackage { + changelogPath?: string; + name: string; + path: string; +} + +interface PackageJson { + name?: string; + private?: boolean; +} + +let changelogPackagesCache: Array | undefined; + +export function getChangelogPackages(): Array { + if (changelogPackagesCache) return changelogPackagesCache; + + const packagesDirectory = path.join(process.cwd(), 'packages'); + const packageDirectories = fs.readdirSync(packagesDirectory, { withFileTypes: true }); + + changelogPackagesCache = packageDirectories.flatMap((entry) => { + if (!entry.isDirectory()) return []; + + const packageJsonPath = path.join(packagesDirectory, entry.name, 'package.json'); + if (!fs.existsSync(packageJsonPath)) return []; + + const packageManifest = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')) as PackageJson; + if (packageManifest.private || !packageManifest.name) return []; + + const packagePath = path.join(packagesDirectory, entry.name); + let changelogPath: string | undefined = path.join(packagePath, 'CHANGELOG.md'); + if (!fs.existsSync(changelogPath)) changelogPath = undefined; + + return [ + { + changelogPath, + name: packageManifest.name, + path: packagePath, + }, + ]; + }); + + return changelogPackagesCache; +} export const sectionMap: Record = { build: 'Core', diff --git a/scripts/changelog/format.ts b/scripts/changelog/format.ts index f7f6409b58..8255623241 100644 --- a/scripts/changelog/format.ts +++ b/scripts/changelog/format.ts @@ -1,4 +1,4 @@ -import type { SemverType } from './config.js'; +import type { SemverType } from './config'; import { breakingPatterns, repo, @@ -6,7 +6,7 @@ import { sectionOrder, sectionPatterns, semverFallback, -} from './config.js'; +} from './config'; export type Category = 'Breaking' | 'Added' | 'Fixed' | 'Changed'; @@ -83,7 +83,7 @@ export function entryToMarkdown(entry: FormattedEntry): string { const parts: Array = []; if (entry.scope) { - parts.push(`**${entry.scope}**: ${entry.description}`); + parts.push(`${entry.scope}: ${entry.description}`); } else { parts.push(entry.description); } diff --git a/scripts/changelog/index.ts b/scripts/changelog/index.ts index c77c1834f8..dd5f027124 100644 --- a/scripts/changelog/index.ts +++ b/scripts/changelog/index.ts @@ -1,7 +1,7 @@ import type { ChangelogFunctions } from '@changesets/types'; -import type { SemverType } from './config.js'; -import { getReleaseLine } from './format.js'; +import type { SemverType } from './config'; +import { getReleaseLine } from './format'; const changelogFunctions: ChangelogFunctions = { getDependencyReleaseLine: async () => '', diff --git a/scripts/changelog/parse.ts b/scripts/changelog/parse.ts index c660b874bc..eccc6abb7b 100644 --- a/scripts/changelog/parse.ts +++ b/scripts/changelog/parse.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'node:fs'; -import type { SemverType } from './config.js'; +import type { SemverType } from './config'; export interface ParsedChangeset { description: string; diff --git a/scripts/changelog/release/contributors.ts b/scripts/changelog/release/contributors.ts index f5f3a0d565..57b42f6418 100644 --- a/scripts/changelog/release/contributors.ts +++ b/scripts/changelog/release/contributors.ts @@ -39,7 +39,7 @@ export async function extractContributors(prNumbers: Array): Promise): string { - if (contributors.length === 0) return ''; + if (!contributors.length) return ''; const names = contributors.map((c) => `@${c.username}`); if (names.length === 1) { diff --git a/scripts/changelog/release/format.ts b/scripts/changelog/release/format.ts index 9651e9c4a6..13fb4dd02f 100644 --- a/scripts/changelog/release/format.ts +++ b/scripts/changelog/release/format.ts @@ -1,6 +1,6 @@ -import type { ReleaseGroup } from '../assemble/grouper.js'; -import { repo } from '../config.js'; -import type { Contributor } from './contributors.js'; +import type { ReleaseGroup } from '../assemble/grouper'; +import { repo } from '../config'; +import type { Contributor } from './contributors'; export interface ReleaseNotes { body: string; @@ -28,7 +28,7 @@ function extractEntriesFromContent(content: string): Array { // Start of new section or version header if (line.match(/^#{1,3}\s/)) { - if (currentEntry.length > 0) { + if (currentEntry.length) { entries.push(currentEntry.join('\n').trim()); currentEntry = []; } @@ -37,19 +37,19 @@ function extractEntriesFromContent(content: string): Array { // Bullet points are entries if (line.match(/^-\s/) || line.match(/^\*\s/)) { - if (currentEntry.length > 0 && !currentEntry[currentEntry.length - 1].match(/^-\s/)) { + if (currentEntry.length && !currentEntry[currentEntry.length - 1].match(/^-\s/)) { // Previous was description, save it entries.push(currentEntry.join('\n').trim()); currentEntry = []; } currentEntry.push(line); - } else if (currentEntry.length > 0) { + } else if (currentEntry.length) { // Continuation of previous entry currentEntry.push(line); } } - if (currentEntry.length > 0) { + if (currentEntry.length) { entries.push(currentEntry.join('\n').trim()); } @@ -69,7 +69,7 @@ export function formatReleaseNotes( const packagesWithChanges = releaseGroup.packages.filter((p) => p.hasUserFacingChanges); for (const pkg of packagesWithChanges) { - lines.push(`### @hey-api/${pkg.name.replace('@hey-api/', '')} ${pkg.version}`); + lines.push(`### @hey-api/${pkg.packageName.replace('@hey-api/', '')} ${pkg.version}`); lines.push(''); // Extract entries from content @@ -87,7 +87,7 @@ export function formatReleaseNotes( } // Add contributors - if (contributors.length > 0) { + if (contributors.length) { lines.push('## Contributors'); lines.push(''); // Just list contributors without PR numbers (cleaner for release notes) diff --git a/scripts/changelog/release/notes.ts b/scripts/changelog/release/notes.ts index e39b6f9e2d..5f3ead1520 100644 --- a/scripts/changelog/release/notes.ts +++ b/scripts/changelog/release/notes.ts @@ -1,16 +1,15 @@ -import { groupByRelease } from '../assemble/grouper.js'; -import { readAllPackageChangelogs } from '../assemble/reader.js'; -import { extractContributors } from './contributors.js'; -import { formatReleaseNotes } from './format.js'; - -async function getAllPrNumbers( - changelogs: ReturnType, -): Promise> { +import { groupByRelease } from '../assemble/grouper'; +import type { Changelogs } from '../assemble/reader'; +import { readAllPackageChangelogs } from '../assemble/reader'; +import { extractContributors } from './contributors'; +import { formatReleaseNotes } from './format'; + +async function getAllPrNumbers(changelogs: Changelogs): Promise> { const prNumbers = new Set(); for (const changelog of changelogs.values()) { - for (const version of changelog.versions) { - const matches = version.content.match(/#(\d+)/g); + for (const release of changelog.releases) { + const matches = release.content.match(/#(\d+)/g); if (matches) { for (const match of matches) { const num = parseInt(match.slice(1), 10); @@ -29,7 +28,7 @@ export async function generateReleaseNotes(): Promise { const changelogs = readAllPackageChangelogs(); const groups = groupByRelease(changelogs); - if (groups.length === 0) { + if (!groups.length) { return 'No releases found.'; }