openapi-react-query-codegen icon indicating copy to clipboard operation
openapi-react-query-codegen copied to clipboard

Duplicate endpoints create conflicting data types

Open CHE1RON opened this issue 1 year ago • 0 comments

Describe the bug When having endpoints of the same name, eg tags/{tag}/export and labels/{label}/export, only one data type is generated (here ExportData) for all services, which is correct for the first, but wrong for all subsequent services.

To Reproduce

  1. Create API with endpoints tags/{tag}/export and labels/{label}/export
  2. Run script
  3. Inspect type errors in services.gen.ts

OpenAPI spec file routes.json

Expected behavior Data types free of conflicts, eg ExportData, ExportData1, etc

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

  • OS: macOS v14.4
  • Version 1.6.3

CHE1RON avatar Sep 30 '24 11:09 CHE1RON