Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

client not exported? #184

Open
Open
@lindesvard

Description

Describe the bug
Im probably stupid but client is not exported from services.gen.ts

From docs

import { client } from "../openapi/requests/services.gen";
client.setConfig({
 baseUrl: "YOUR_BASE_URL",
 throwOnError: true, // If you want to handle errors on `onError` callback of `useQuery` and `useMutation`, set this to `true`
});
client.interceptors.request.use((config) => {
 // Add your request interceptor logic here
 return config;
});
client.interceptors.response.use((response) => {
 // Add your response interceptor logic here
 return response;
});

To Reproduce
Just added "codegen": "openapi-rq -i https://raw.githubusercontent.com/7nohe/openapi-react-query-codegen/refs/heads/main/examples/petstore.yaml --client axios", to scripts and run it.

Do not have any client in the generated files.

OpenAPI spec file
Have tried our own but also petstore.yaml same result

Expected behavior
That client is exported or update documentation

  • OS: macos
  • Version: "@7nohe/openapi-react-query-codegen": "^1.6.2",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /