- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When i generate my client code, absolute paths are used instead of relative.
Example of output
export const useLocalizationServiceGetTranslationTexts = <TData = Common.LocalizationServiceGetTranslationTextsDefaultResponse, TError = unknown, TQueryKey extends Array<unknown> = unknown[]>({ language, module }: {
language: import("C:/Projekt/test/test_3.0/Frontend/src/openapi/requests/models").Language;
module: import("C:/Projekt/test/test_3.0/Frontend/src/openapi/requests/models").Module;
}
- OS: Windows 11 22H2
- Version v1.1.0
seriouslag
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Static paths are generated?[/-][+]Absolute paths are generated?[/+]AnderssonPeter commentedon Apr 22, 2024
The wierd thing here is that both
Language
andModule
are imported using a normal import further up in the file.import { ...., Language, Module, .... } from "../requests/models";
All invalid imports have one thing in common, they are enums, generated using
--enums typescript
seriouslag commentedon Apr 22, 2024
@AnderssonPeter, this is fixed in #84
AnderssonPeter commentedon Apr 22, 2024
It's for both queries and suspense, I don't have access to the spec right now but will try to get you an example tomorrow.
In this PR:
AnderssonPeter commentedon Apr 23, 2024
@seriouslag the following specification causes the issue:
seriouslag commentedon Apr 23, 2024
This was fixed in 1.2.0
AnderssonPeter commentedon Apr 24, 2024
@seriouslag I just tested it and it works as expected, thanks for the quick fix!!