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

Configure Feed

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

docs: add vite plugin

Lubos 6b2c666d 549a42e1

+194 -7
+4
docs/.vitepress/config/en.ts
··· 44 44 link: '/openapi-ts/configuration/parser', 45 45 text: 'Parser', 46 46 }, 47 + { 48 + link: '/openapi-ts/configuration/vite', 49 + text: 'Vite', 50 + }, 47 51 ], 48 52 link: '/openapi-ts/configuration', 49 53 text: 'Configuration',
+1 -1
docs/openapi-ts/clients/nuxt.md
··· 41 41 ::: code-group 42 42 43 43 ```sh [npm] 44 - npm install @hey-api/nuxt 44 + npm add @hey-api/nuxt 45 45 ``` 46 46 47 47 ```sh [pnpm]
+84
docs/openapi-ts/configuration/vite.md
··· 1 + --- 2 + title: Vite Plugin 3 + description: Integrate @hey-api/openapi-ts into your Vite build pipeline with the official Vite plugin. 4 + --- 5 + 6 + # Vite 7 + 8 + ### About 9 + 10 + [Vite](https://vite.dev) is a blazing fast frontend build tool powering the next generation of web applications. 11 + 12 + The Vite plugin integrates `@hey-api/openapi-ts` into the Vite build pipeline, running automatically whenever Vite resolves its configuration – no separate script or manual step required. 13 + 14 + ## Features 15 + 16 + - runs automatically as part of your Vite build 17 + - reads your existing [configuration](/openapi-ts/get-started) (or accepts inline config) 18 + - works with any Vite-based project 19 + 20 + ## Installation 21 + 22 + You can download `@hey-api/vite-plugin` from npm using your favorite package manager. 23 + 24 + ::: code-group 25 + 26 + ```sh [npm] 27 + npm add @hey-api/vite-plugin -D -E 28 + ``` 29 + 30 + ```sh [pnpm] 31 + pnpm add @hey-api/vite-plugin -D -E 32 + ``` 33 + 34 + ```sh [yarn] 35 + yarn add @hey-api/vite-plugin -D -E 36 + ``` 37 + 38 + ```sh [bun] 39 + bun add @hey-api/vite-plugin -D -E 40 + ``` 41 + 42 + ::: 43 + 44 + ## Usage 45 + 46 + Add the plugin to your `vite.config.ts`: 47 + 48 + ::: code-group 49 + 50 + ```ts [vite.config.ts] 51 + import { heyApiPlugin } from '@hey-api/vite-plugin'; 52 + import { defineConfig } from 'vite'; 53 + 54 + export default defineConfig({ 55 + plugins: [heyApiPlugin()], 56 + }); 57 + ``` 58 + 59 + ::: 60 + 61 + The plugin will automatically pick up your [configuration](/openapi-ts/configuration) file. You can also pass options inline using the `config` option: 62 + 63 + ::: code-group 64 + 65 + ```ts [vite.config.ts] 66 + import { heyApiPlugin } from '@hey-api/vite-plugin'; 67 + import { defineConfig } from 'vite'; 68 + 69 + export default defineConfig({ 70 + plugins: [ 71 + heyApiPlugin({ 72 + config: { 73 + input: 'hey-api/backend', // sign up at app.heyapi.dev 74 + output: 'src/client', 75 + }, 76 + }), 77 + ], 78 + }); 79 + ``` 80 + 81 + ::: 82 + 83 + <!--@include: ../../partials/examples.md--> 84 + <!--@include: ../../partials/sponsors.md-->
+49 -1
docs/openapi-ts/get-started.md
··· 51 51 ::: code-group 52 52 53 53 ```sh [npm] 54 - npm install @hey-api/openapi-ts -D -E 54 + npm add @hey-api/openapi-ts -D -E 55 55 ``` 56 56 57 57 ```sh [pnpm] ··· 104 104 ``` 105 105 106 106 ::: 107 + 108 + ### Vite 109 + 110 + If you're using [Vite](https://vite.dev), you can integrate `@hey-api/openapi-ts` directly into your build pipeline with `@hey-api/vite-plugin`. Install it alongside the main package: 111 + 112 + ::: code-group 113 + 114 + ```sh [npm] 115 + npm add @hey-api/vite-plugin -D -E 116 + ``` 117 + 118 + ```sh [pnpm] 119 + pnpm add @hey-api/vite-plugin -D -E 120 + ``` 121 + 122 + ```sh [yarn] 123 + yarn add @hey-api/vite-plugin -D -E 124 + ``` 125 + 126 + ```sh [bun] 127 + bun add @hey-api/vite-plugin -D -E 128 + ``` 129 + 130 + ::: 131 + 132 + Then add the plugin to your Vite configuration: 133 + 134 + ::: code-group 135 + 136 + ```ts [vite.config.ts] 137 + import { heyApiPlugin } from '@hey-api/vite-plugin'; 138 + import { defineConfig } from 'vite'; 139 + 140 + export default defineConfig({ 141 + plugins: [ 142 + heyApiPlugin({ 143 + config: { 144 + input: 'hey-api/backend', // sign up at app.heyapi.dev 145 + output: 'src/client', 146 + }, 147 + }), 148 + ], 149 + }); 150 + ``` 151 + 152 + ::: 153 + 154 + See the [Vite](/openapi-ts/configuration/vite) page for full configuration options. 107 155 108 156 ### Configuration 109 157
+1 -1
docs/openapi-ts/migrating.md
··· 479 479 480 480 ### Bundle `@hey-api/client-*` plugins 481 481 482 - In previous releases, you had to install a separate client package to generate a fully working output, e.g., `npm install @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`. 482 + 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`. 483 483 484 484 ```sh 485 485 npm uninstall @hey-api/client-fetch
+1 -1
docs/openapi-ts/plugins/sdk.md
··· 540 540 541 541 ### Display 542 542 543 - Enabling examples does not produce visible output on its own. Examples are written into the source specification and can be consumed by documentation tools such as [Mintlify](https://kutt.to/6vrYy9) or [Scalar](https://kutt.to/skQUVd). To persist that specification, enable [Source](/openapi-ts/configuration/output#source) generation. 543 + Enabling examples does not produce visible output on its own. Examples are written into the source specification and can be consumed by documentation tools such as [Scalar](https://kutt.to/skQUVd). To persist that specification, enable [Source](/openapi-ts/configuration/output#source) generation. 544 544 545 545 ## API 546 546
+2 -1
packages/json-schema-ref-parser/README.md
··· 7 7 Install using [npm](https://docs.npmjs.com/about-npm/): 8 8 9 9 ```bash 10 - npm install @hey-api/json-schema-ref-parser 10 + npm add @hey-api/json-schema-ref-parser 11 + pnpm add @hey-api/json-schema-ref-parser 11 12 yarn add @hey-api/json-schema-ref-parser 12 13 bun add @hey-api/json-schema-ref-parser 13 14 ```
+1 -1
packages/openapi-ts/CHANGELOG.md
··· 1636 1636 1637 1637 ### Bundle `@hey-api/client-*` plugins 1638 1638 1639 - In previous releases, you had to install a separate client package to generate a fully working output, e.g. `npm install @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`. 1639 + 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`. 1640 1640 1641 1641 ```sh 1642 1642 npm uninstall @hey-api/client-fetch
+51 -1
packages/openapi-ts/README.md
··· 171 171 #### npm 172 172 173 173 ```sh 174 - npm install @hey-api/openapi-ts -D -E 174 + npm add @hey-api/openapi-ts -D -E 175 175 ``` 176 176 177 177 #### pnpm ··· 226 226 output: 'src/client', 227 227 }); 228 228 ``` 229 + 230 + ### Vite 231 + 232 + If you're using [Vite](https://vite.dev), you can integrate `@hey-api/openapi-ts` directly into your build pipeline with `@hey-api/vite-plugin`. Install it alongside the main package: 233 + 234 + #### npm 235 + 236 + ```sh 237 + npm add @hey-api/vite-plugin -D -E 238 + ``` 239 + 240 + #### pnpm 241 + 242 + ```sh 243 + pnpm add @hey-api/vite-plugin -D -E 244 + ``` 245 + 246 + #### yarn 247 + 248 + ```sh 249 + yarn add @hey-api/vite-plugin -D -E 250 + ``` 251 + 252 + #### bun 253 + 254 + ```sh 255 + bun add @hey-api/vite-plugin -D -E 256 + ``` 257 + 258 + Then add the plugin to your Vite configuration: 259 + 260 + #### `vite.config.ts` 261 + 262 + ```ts 263 + import { heyApiPlugin } from '@hey-api/vite-plugin'; 264 + import { defineConfig } from 'vite'; 265 + 266 + export default defineConfig({ 267 + plugins: [ 268 + heyApiPlugin({ 269 + config: { 270 + input: 'hey-api/backend', // sign up at app.heyapi.dev 271 + output: 'src/client', 272 + }, 273 + }), 274 + ], 275 + }); 276 + ``` 277 + 278 + See the [Vite](https://heyapi.dev/openapi-ts/configuration/vite) page for full configuration options. 229 279 230 280 ## Configuration 231 281