Closed finas closed 2 weeks ago
Start a new pull request in StackBlitz Codeflow.
Heh, funny how the issues always seem to come in bulk. I believe this one reported yesterday is the same underlying problem https://github.com/hey-api/openapi-ts/issues/765
@mrlubos Thanks. Is there workaround or plan to fix it?
Also, should i close this ticket?
Feel free to keep it, I don't mind. Of course it would be good to fix, it's only a question of priority. I am open to a pull request too, will see if I have time to look at this
Maybe I can help with that. Let me try to set up local development. Can you give me some advice on what files I should look at to fix this?
Not exactly, the first thing I'd look at is why the parser seems to be discarding the generic from names. It's possible this will be fixed simply by resolving names better
If you do work on this, I highly suspect it has something to do with the brackets [
and ]
. That is where both my and your variables get cut off. Maybe a regex that isn't including that or something like that.
@finas what would be the expected result for you?
In unrelated news, I found the matcher responsible for this issue, but waiting for your response before prioritising this
Description
Thank you all for this fantastic project that has greatly improved my coding experience Recently I created two classes with similar names:
![image](https://github.com/hey-api/openapi-ts/assets/4711027/6ba6e090-065f-439c-966f-383f01e8b09a)
WebApi.Dto.Response.PageRespWrapper``1[[A......]]
andWebApi.Dto.Response.PageRespWrapper``1[[B......]]
. Both are convert toWebApi_Dto_Response_PageRespWrapper_1
which cause the different api refer to the same response type.Any help will be appreciated!
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example-vn31nb?file=services%2Ftypes.gen.ts
OpenAPI specification (optional)
https://stackblitz.com/edit/hey-api-client-fetch-example-vn31nb?file=swagger.json![image](https://github.com/hey-api/openapi-ts/assets/4711027/e0e15ac2-8f5f-4f0c-8bbb-39f66e1888a6)
System information (optional)
No response