这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wet-vans-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hey-api/openapi-ts': patch
---

fix(tanstack-query): correctly access instantiated SDKs
15 changes: 8 additions & 7 deletions dev/openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ export default defineConfig(() => {
// 'circular.yaml',
// 'dutchie.json',
// 'invalid',
// 'openai.yaml',
// 'full.yaml',
'opencode.yaml',
// 'sdk-circular-bug.yaml',
'openai.yaml',
// 'opencode.yaml',
// 'sdk-instance.yaml',
// 'string-with-format.yaml',
// 'transformers.json',
Expand Down Expand Up @@ -217,8 +216,7 @@ export default defineConfig(() => {
{
// baseUrl: false,
// exportFromIndex: true,
// name: '@hey-api/client-fetch',
// name: 'legacy/angular',
name: '@hey-api/client-fetch',
// runtimeConfigPath: path.resolve(__dirname, 'hey-api.ts'),
// runtimeConfigPath: './src/hey-api.ts',
// strictBaseUrl: true,
Expand Down Expand Up @@ -256,7 +254,7 @@ export default defineConfig(() => {
// classNameBuilder: '{{name}}',
// classNameBuilder: '{{name}}Service',
// classStructure: 'off',
// client: false,
client: false,
// getSignature: ({ fields, signature, operation }) => {
// // ...
// fields.unwrap('path')
Expand All @@ -265,7 +263,7 @@ export default defineConfig(() => {
instance: true,
name: '@hey-api/sdk',
// operationId: false,
paramsStructure: 'flat',
// paramsStructure: 'flat',
// responseStyle: 'data',
// signature: 'auto',
// signature: 'client',
Expand Down Expand Up @@ -299,6 +297,9 @@ export default defineConfig(() => {
{
// name: 'fastify',
},
{
name: 'swr',
},
{
// case: 'SCREAMING_SNAKE_CASE',
// comments: false,
Expand Down
1 change: 1 addition & 0 deletions dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@tanstack/svelte-query": "5.73.3",
"@tanstack/vue-query": "5.73.3",
"arktype": "2.1.25",
"swr": "2.3.6",
"typescript": "5.9.3",
"valibot": "1.1.0",
"zod": "4.1.12"
Expand Down
12 changes: 3 additions & 9 deletions examples/openapi-ts-angular/src/client/sdk.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export type Options<
meta?: Record<string, unknown>;
};

@Injectable({
providedIn: 'root',
})
@Injectable({ providedIn: 'root' })
export class PetService {
/**
* Add a new pet to the store.
Expand Down Expand Up @@ -295,9 +293,7 @@ export class PetService {
}
}

@Injectable({
providedIn: 'root',
})
@Injectable({ providedIn: 'root' })
export class StoreService {
/**
* Returns pet inventories by status.
Expand Down Expand Up @@ -382,9 +378,7 @@ export class StoreService {
}
}

@Injectable({
providedIn: 'root',
})
@Injectable({ providedIn: 'root' })
export class UserService {
/**
* Create user.
Expand Down
Loading
Loading