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/shaky-rings-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openapi-qraft/tanstack-query-react-plugin': patch
---

Fix incorrect service basename in TSDoc examples.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/tanstack-query-react-plugin/src/generateCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const generateServices = async (
const code = astToString(
getServiceFactory(
{
name,
typeName,
variableName,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type ServiceFactoryOptions = {
queryableWriteOperations: boolean;
};

type Service = { typeName: string; variableName: string };
type Service = { name: string; typeName: string; variableName: string };

export const getServiceFactory = (
service: Service,
Expand Down Expand Up @@ -173,7 +173,7 @@ const getServiceInterfaceOperationFactory = (
const operationCustomTSDoc = createOperationMethodTSDocExample(
operation,
{
serviceVariableName: service.variableName,
serviceVariableName: service.name,
operationMethodName: node.name.text,
},
options
Expand Down
Loading