···11+---
22+'@example/openapi-ts-tanstack-vue-query': patch
33+---
44+55+docs: add TanStack Vue Query example
+9-8
eslint.config.js
···11import eslint from '@eslint/js';
22-import eslintConfigPrettier from 'eslint-config-prettier';
33-import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
44-import eslintPluginSortKeysFix from 'eslint-plugin-sort-keys-fix';
55-import eslintPluginTypeScriptSortKeys from 'eslint-plugin-typescript-sort-keys';
22+import configPrettier from 'eslint-config-prettier';
33+import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
44+import pluginSortKeysFix from 'eslint-plugin-sort-keys-fix';
55+import pluginTypeScriptSortKeys from 'eslint-plugin-typescript-sort-keys';
66+// import pluginVue from 'eslint-plugin-vue'
67import globals from 'globals';
78import tseslint from 'typescript-eslint';
89···1718 },
1819 },
1920 plugins: {
2020- 'simple-import-sort': eslintPluginSimpleImportSort,
2121- 'sort-keys-fix': eslintPluginSortKeysFix,
2222- 'typescript-sort-keys': eslintPluginTypeScriptSortKeys,
2121+ 'simple-import-sort': pluginSimpleImportSort,
2222+ 'sort-keys-fix': pluginSortKeysFix,
2323+ 'typescript-sort-keys': pluginTypeScriptSortKeys,
2324 },
2425 rules: {
2526 '@typescript-eslint/ban-ts-comment': 'off',
···4243 'typescript-sort-keys/string-enum': 'warn',
4344 },
4445 },
4545- eslintConfigPrettier,
4646+ configPrettier,
4647 {
4748 ignores: [
4849 '**/dist/',
+1-11
examples/openapi-ts-axios/src/App.tsx
···1818import { useState } from 'react';
19192020import { $Pet } from './client/schemas.gen';
2121-import { addPet, client, getPetById, updatePet } from './client/services.gen';
2121+import { addPet, getPetById, updatePet } from './client/services.gen';
2222import type { Pet } from './client/types.gen';
2323-2424-// configure internal service client
2525-client.setConfig({
2626- // set default base url for requests
2727- baseURL: 'https://petstore3.swagger.io/api/v3',
2828- // set default headers for requests
2929- headers: {
3030- Authorization: 'Bearer <token_from_service_client>',
3131- },
3232-});
33233424const localClient = createClient({
3525 // set default base url for requests made by this client
+11
examples/openapi-ts-axios/src/main.tsx
···55import ReactDOM from 'react-dom/client';
6677import App from './App.tsx';
88+import { client } from './client/services.gen';
99+1010+// configure internal service client
1111+client.setConfig({
1212+ // set default base url for requests
1313+ baseURL: 'https://petstore3.swagger.io/api/v3',
1414+ // set default headers for requests
1515+ headers: {
1616+ Authorization: 'Bearer <token_from_service_client>',
1717+ },
1818+});
819920ReactDOM.createRoot(document.getElementById('root')!).render(
1021 <React.StrictMode>
+1-11
examples/openapi-ts-fetch/src/App.tsx
···1818import { useState } from 'react';
19192020import { $Pet } from './client/schemas.gen';
2121-import { addPet, client, getPetById, updatePet } from './client/services.gen';
2121+import { addPet, getPetById, updatePet } from './client/services.gen';
2222import type { Pet } from './client/types.gen';
2323-2424-// configure internal service client
2525-client.setConfig({
2626- // set default base url for requests
2727- baseUrl: 'https://petstore3.swagger.io/api/v3',
2828- // set default headers for requests
2929- headers: {
3030- Authorization: 'Bearer <token_from_service_client>',
3131- },
3232-});
33233424const localClient = createClient({
3525 // set default base url for requests made by this client
+11
examples/openapi-ts-fetch/src/main.tsx
···55import ReactDOM from 'react-dom/client';
6677import App from './App.tsx';
88+import { client } from './client/services.gen';
99+1010+// configure internal service client
1111+client.setConfig({
1212+ // set default base url for requests
1313+ baseUrl: 'https://petstore3.swagger.io/api/v3',
1414+ // set default headers for requests
1515+ headers: {
1616+ Authorization: 'Bearer <token_from_service_client>',
1717+ },
1818+});
819920ReactDOM.createRoot(document.getElementById('root')!).render(
1021 <React.StrictMode>
···2424 updatePetMutation,
2525} from './client/@tanstack/react-query.gen';
2626import { $Pet } from './client/schemas.gen';
2727-import { client } from './client/services.gen';
2827import type { Pet } from './client/types.gen';
2929-3030-// configure internal service client
3131-client.setConfig({
3232- // set default base url for requests
3333- baseUrl: 'https://petstore3.swagger.io/api/v3',
3434- // set default headers for requests
3535- headers: {
3636- Authorization: 'Bearer <token_from_service_client>',
3737- },
3838-});
39284029const localClient = createClient({
4130 // set default base url for requests made by this client
···11+# vue-project
22+33+This template should help get you started developing with Vue 3 in Vite.
44+55+## Recommended IDE Setup
66+77+[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
88+99+## Type Support for `.vue` Imports in TS
1010+1111+TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
1212+1313+## Customize configuration
1414+1515+See [Vite Configuration Reference](https://vitejs.dev/config/).
1616+1717+## Project Setup
1818+1919+```sh
2020+pnpm install
2121+```
2222+2323+### Compile and Hot-Reload for Development
2424+2525+```sh
2626+pnpm dev
2727+```
2828+2929+### Type-Check, Compile and Minify for Production
3030+3131+```sh
3232+pnpm build
3333+```
3434+3535+### Run Unit Tests with [Vitest](https://vitest.dev/)
3636+3737+```sh
3838+pnpm test:unit
3939+```
4040+4141+### Lint with [ESLint](https://eslint.org/)
4242+4343+```sh
4444+pnpm lint
4545+```
···11+// This file is auto-generated by @hey-api/openapi-ts
22+export * from './schemas.gen'
33+export * from './services.gen'
44+export * from './types.gen'
···11+<script setup lang="ts">
22+import WelcomeItem from './WelcomeItem.vue'
33+import DocumentationIcon from './icons/IconDocumentation.vue'
44+import ToolingIcon from './icons/IconTooling.vue'
55+import EcosystemIcon from './icons/IconEcosystem.vue'
66+import CommunityIcon from './icons/IconCommunity.vue'
77+import SupportIcon from './icons/IconSupport.vue'
88+</script>
99+1010+<template>
1111+ <WelcomeItem>
1212+ <template #icon>
1313+ <DocumentationIcon />
1414+ </template>
1515+ <template #heading>Documentation</template>
1616+1717+ Vue’s
1818+ <a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a>
1919+ provides you with all information you need to get started.
2020+ </WelcomeItem>
2121+2222+ <WelcomeItem>
2323+ <template #icon>
2424+ <ToolingIcon />
2525+ </template>
2626+ <template #heading>Tooling</template>
2727+2828+ This project is served and bundled with
2929+ <a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The
3030+ recommended IDE setup is
3131+ <a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> +
3232+ <a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If
3333+ you need to test your components and web pages, check out
3434+ <a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and
3535+ <a href="https://on.cypress.io/component" target="_blank" rel="noopener"
3636+ >Cypress Component Testing</a
3737+ >.
3838+3939+ <br />
4040+4141+ More instructions are available in <code>README.md</code>.
4242+ </WelcomeItem>
4343+4444+ <WelcomeItem>
4545+ <template #icon>
4646+ <EcosystemIcon />
4747+ </template>
4848+ <template #heading>Ecosystem</template>
4949+5050+ Get official tools and libraries for your project:
5151+ <a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>,
5252+ <a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>,
5353+ <a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and
5454+ <a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If
5555+ you need more resources, we suggest paying
5656+ <a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a>
5757+ a visit.
5858+ </WelcomeItem>
5959+6060+ <WelcomeItem>
6161+ <template #icon>
6262+ <CommunityIcon />
6363+ </template>
6464+ <template #heading>Community</template>
6565+6666+ Got stuck? Ask your question on
6767+ <a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official
6868+ Discord server, or
6969+ <a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener"
7070+ >StackOverflow</a
7171+ >. You should also subscribe to
7272+ <a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow
7373+ the official
7474+ <a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a>
7575+ twitter account for latest news in the Vue world.
7676+ </WelcomeItem>
7777+7878+ <WelcomeItem>
7979+ <template #icon>
8080+ <SupportIcon />
8181+ </template>
8282+ <template #heading>Support Vue</template>
8383+8484+ As an independent project, Vue relies on community backing for its sustainability. You can help
8585+ us by
8686+ <a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>.
8787+ </WelcomeItem>
8888+</template>