Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"--operationId" still includes service name #133

Closed
maxoosterveen opened this issue Jul 23, 2024 · 6 comments · May be fixed by #151
Closed

"--operationId" still includes service name #133

maxoosterveen opened this issue Jul 23, 2024 · 6 comments · May be fixed by #151
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@maxoosterveen
Copy link

Describe the bug
When running the generator command with the option --operationId still includes the service names in the hooks

To Reproduce
Steps to reproduce the behavior:
pnpm exec openapi-rq -i ./internal.json --operationId

OpenAPI spec file
If possible, please upload the OpenAPI spec file.

Expected behavior
A clear and concise description of what you expected to happen.
Instead of having the service name in the function hook, I would like it to only use the operation id. useServiceNameOperationId > useOperationId

Screenshots
If applicable, add screenshots or logs to help explain your problem.

  • OS: [e.g. macOS]
  • macOS
  • Version [e.g. v1.0.0]
  • 1.4.1

Additional context
Add any other context about the problem here.

@7nohe
Copy link
Owner

7nohe commented Aug 6, 2024

@maxoosterveen
Thank you for the report. The --operationId is an option from @hey-api/openapi-ts, but it seems we haven't been able to pass it correctly from our library. I will fix it.

@7nohe 7nohe added bug Something isn't working good first issue Good for newcomers labels Aug 6, 2024
@JoeHillyard
Copy link

This is blocking for me on migrating over - any pointers on where to start looking?

@7nohe
Copy link
Owner

7nohe commented Sep 24, 2024

@maxoosterveen @JoeHillyard
Sorry for the delayed response.
The issue has been fixed in #151. A pre-release version has been published, so you can test it by installing the following version.

npm i -D @7nohe/openapi-react-query-codegen@0.0.0-ef2157e65a33494afbc157e7e72b47353a84e49a

If there are no issues, I will merge this PR and release it.

@JoeHillyard
Copy link

Hmm i don't seem to be having any luck - service name is still coming through

@nickdaugherty
Copy link

Same - still getting service names when using version 0.0.0-ef2157e65a33494afbc157e7e72b47353a84e49a

@7nohe
Copy link
Owner

7nohe commented Oct 14, 2024

We have adopted Flat Services from version 2 to support tree-shaking, and as a result, service names have been deprecated.

@7nohe 7nohe closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants