@@ -97,7 +97,7 @@ import { tanstackQuery } from '@genapi/presets'
9797
9898export default defineConfig ({
9999 preset: tanstackQuery .react ,
100- input: ' http ://example.com /api-docs ' ,
100+ input: ' https ://petstore3.swagger.io /api/v3/openapi.json ' ,
101101 output: { main: ' src/api/index.ts' },
102102})
103103```
@@ -125,7 +125,7 @@ import { tanstackQuery } from '@genapi/presets'
125125
126126export default defineConfig ({
127127 preset: tanstackQuery .vue ,
128- input: ' http ://example.com /api-docs ' ,
128+ input: ' https ://petstore3.swagger.io /api/v3/openapi.json ' ,
129129 output: { main: ' src/api/index.ts' },
130130})
131131```
@@ -134,24 +134,13 @@ export default defineConfig({
134134
135135Uses [ @pinia/colada ] ( https://pinia-colada.esm.dev/ ) for type-safe query/mutation with Vue + Pinia (API: ` key ` + ` query ` / ` mutation ` ):
136136
137- ``` ts
138- import { colada } from ' @genapi/presets'
139-
140- export default defineConfig ({
141- preset: colada ,
142- input: ' http://example.com/api-docs' ,
143- output: { main: ' src/api/index.ts' },
144- })
145- ```
146-
147- Or use from the tanstack namespace:
148-
149137``` ts
150138import { tanstackQuery } from ' @genapi/presets'
151139
152140export default defineConfig ({
153141 preset: tanstackQuery .colada ,
154- // ...
142+ input: ' https://petstore3.swagger.io/api/v3/openapi.json' ,
143+ output: { main: ' src/api/index.ts' },
155144})
156145```
157146
@@ -185,7 +174,7 @@ export function usePostPets() {
185174| UniApp | ` uni.ts ` |
186175| React + server state | ` tanstackQuery.react ` |
187176| Vue + server state | ` tanstackQuery.vue ` |
188- | Vue + Pinia data layer | ` colada ` or ` tanstackQuery.colada ` |
177+ | Vue + Pinia data layer | ` tanstackQuery.colada ` |
189178
190179## Next Steps
191180
0 commit comments