From 78bbeba3a5e1393db5b3b13307819e3ec12fb36a Mon Sep 17 00:00:00 2001 From: Jordan Shatford Date: Sat, 23 Mar 2024 09:47:49 +1100 Subject: [PATCH] chore(client): generate using new maintained package Signed-off-by: Jordan Shatford --- README.md | 2 +- packages/client/openapi-ts.config.js | 5 ++--- packages/client/package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f8742e77..90540dc5 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,6 @@ Please refer to the [contributing guide](CONTRIBUTING.md) for how to install the - `web`: A web application developed in [SvelteKit](https://kit.svelte.dev/). ### Packages: -- `client`: A TypeScript API client generated from the OpenAPI specification for the API using [OpenAPI TypeScript Codegen](https://github.com/nicolas-chaulet/openapi-typescript-codegen). +- `client`: A TypeScript API client generated from the OpenAPI specification for the API using [openapi-ts](https://github.com/hey-api/openapi-ts). - `config`: Common configs shared between other packages and apps in the monorepo. - `ui`: A UI library used by the project developed in [Svelte](https://svelte.dev/). diff --git a/packages/client/openapi-ts.config.js b/packages/client/openapi-ts.config.js index a9c9fbca..71933c43 100644 --- a/packages/client/openapi-ts.config.js +++ b/packages/client/openapi-ts.config.js @@ -1,9 +1,8 @@ -/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */ +/** @type {import('@hey-api/openapi-ts').UserConfig} */ module.exports = { input: require('@yd/api'), output: './src/generated', client: 'fetch', enums: true, - exportSchemas: false, - useOptions: true + exportSchemas: false }; diff --git a/packages/client/package.json b/packages/client/package.json index 1322751a..1773a3cd 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -12,7 +12,7 @@ "format": "prettier --write ." }, "devDependencies": { - "@nicolas-chaulet/openapi-typescript-codegen": "^0.27.36", + "@hey-api/openapi-ts": "^0.27.38", "@yd/api": "workspace:*", "@yd/config": "workspace:*", "prettier": "^3.2.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48390d2c..8a2b2ff8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,9 +129,9 @@ importers: packages/client: devDependencies: - '@nicolas-chaulet/openapi-typescript-codegen': - specifier: ^0.27.36 - version: 0.27.36 + '@hey-api/openapi-ts': + specifier: ^0.27.38 + version: 0.27.38 '@yd/api': specifier: workspace:* version: link:../../apps/api @@ -940,6 +940,17 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@hey-api/openapi-ts@0.27.38: + resolution: {integrity: sha512-b3xO+SrJEQR9bP/ckvdWAlpvd+x8O1Y62zzBbYpchwYjIPgp2lLsZulLKOWE2EAIKFyI2JWIxiqS3RMsr78TdA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + dependencies: + '@apidevtools/json-schema-ref-parser': 11.5.4 + camelcase: 8.0.0 + commander: 12.0.0 + handlebars: 4.7.8 + dev: true + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1020,17 +1031,6 @@ packages: read-yaml-file: 1.1.0 dev: true - /@nicolas-chaulet/openapi-typescript-codegen@0.27.36: - resolution: {integrity: sha512-rX5o+NcI36ffqzBh+idBJsS7bFrEsX96EhOr4/U9I9JpDJa5xAHzrcV9YNJ9l+RsDa5u4SeppMrT5WrDIgy4jg==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - dependencies: - '@apidevtools/json-schema-ref-parser': 11.5.4 - camelcase: 8.0.0 - commander: 12.0.0 - handlebars: 4.7.8 - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'}